Package org.lwjgl.util.mapped
Annotation Type CacheLinePad
When this annotation is used on a field, automatic cache-line-sized padding
will be inserted around the field. This is useful in multi-threaded algorithms
to avoid cache line false sharing. The annotation defaults to padding after
the field, but can be changed to before or both before and after. It can be
applied to both mapped object fields and POJO primitive fields.
- Author:
- Spasi
-
Optional Element Summary
Optional Elements
-
Element Details
-
before
boolean beforeWhen true, cache-line padding will be inserted before the field.- Returns:
- true if cache-line padding will be inserted before the field
- Default:
- false
-
after
boolean afterWhen true, cache-line padding will be inserted after the field.- Returns:
- true if cache-line padding will be inserted after the field
- Default:
- true
-