Package org.agrona.concurrent.status
Class UnsafeBufferStatusIndicator
java.lang.Object
org.agrona.concurrent.status.StatusIndicatorReader
org.agrona.concurrent.status.StatusIndicator
org.agrona.concurrent.status.UnsafeBufferStatusIndicator
StatusIndicator
which wraps an AtomicBuffer
with a given counter id.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final long
private final byte[]
private final ByteBuffer
private final int
-
Constructor Summary
ConstructorsConstructorDescriptionUnsafeBufferStatusIndicator
(AtomicBuffer buffer, int counterId) Map a status indicator over a buffer. -
Method Summary
Modifier and TypeMethodDescriptionlong
Get the current status indication of a component with volatile semantics.int
id()
Identifier for this status indicator.void
setOrdered
(long value) Sets the current status indication of the component with ordered atomic memory semantics.toString()
-
Field Details
-
counterId
private final int counterId -
addressOffset
private final long addressOffset -
byteArray
private final byte[] byteArray -
byteBuffer
-
-
Constructor Details
-
UnsafeBufferStatusIndicator
Map a status indicator over a buffer.- Parameters:
buffer
- containing the indicator.counterId
- identifier of the indicator.
-
-
Method Details
-
id
public int id()Identifier for this status indicator.- Specified by:
id
in classStatusIndicatorReader
- Returns:
- the identifier for this status indicator.
-
setOrdered
public void setOrdered(long value) Sets the current status indication of the component with ordered atomic memory semantics.- Specified by:
setOrdered
in classStatusIndicator
- Parameters:
value
- the current status indication of the component.
-
getVolatile
public long getVolatile()Get the current status indication of a component with volatile semantics.- Specified by:
getVolatile
in classStatusIndicatorReader
- Returns:
- the current status indication of a component with volatile semantics.
-
toString
-