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:
-
Constructor Summary
ConstructorsConstructorDescriptionUnsafeBufferStatusIndicator(AtomicBuffer buffer, int counterId) Map a status indicator over a buffer. -
Method Summary
Modifier and TypeMethodDescriptionlongGet the current status indication of a component with volatile semantics.intid()Identifier for this status indicator.voidsetOrdered(long value) Sets the current status indication of the component with ordered atomic memory semantics.toString()
-
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:
idin 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:
setOrderedin 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:
getVolatilein classStatusIndicatorReader- Returns:
- the current status indication of a component with volatile semantics.
-
toString
-