Top Description Methods
org.lwjgl.util.mapped

public @Interface CacheLinePad

extends Annotation
Annotations
@Retention:RUNTIME
@Target:FIELD
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

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

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if cache-line padding will be inserted after the field
after
()

When true, cache-line padding will be inserted after the field.

public boolean

Returns:

true if cache-line padding will be inserted before the field
before
()

When true, cache-line padding will be inserted before the field.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

afterback to summary
public boolean after()

When true, cache-line padding will be inserted after the field.

Returns:boolean

true if cache-line padding will be inserted after the field

beforeback to summary
public boolean before()

When true, cache-line padding will be inserted before the field.

Returns:boolean

true if cache-line padding will be inserted before the field