|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=FIELD) public @interface 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.
Optional Element Summary | |
---|---|
boolean |
after
When true, cache-line padding will be inserted after the field. |
boolean |
before
When true, cache-line padding will be inserted before the field. |
public abstract boolean before
public abstract boolean after
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |