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 acquire semantics.longGet the current status indication of a component with opaque semantics.longGet the current status indication of a component with volatile semantics.intid()Identifier for this status indicator.voidsetOpaque(long value) Sets the current status indication of the component with opaque memory semantics.voidsetOrdered(long value) Sets the current status indication of the component with ordered memory semantics.voidsetRelease(long value) Sets the current status indication of the component with release memory semantics.voidsetVolatile(long value) Sets the current status indication of the component with volatile 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.
-
setVolatile
public void setVolatile(long value) Sets the current status indication of the component with volatile memory semantics.- Specified by:
setVolatilein classStatusIndicator- Parameters:
value- the current status indication of the component.
-
setOrdered
public void setOrdered(long value) Sets the current status indication of the component with ordered memory semantics.This method is identical to
StatusIndicator.setRelease(long)and that method should be used instead.- Specified by:
setOrderedin classStatusIndicator- Parameters:
value- the current status indication of the component.
-
setRelease
public void setRelease(long value) Sets the current status indication of the component with release memory semantics.- Specified by:
setReleasein classStatusIndicator- Parameters:
value- the current status indication of the component.
-
setOpaque
public void setOpaque(long value) Sets the current status indication of the component with opaque memory semantics.- Specified by:
setOpaquein 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.
-
getAcquire
public long getAcquire()Get the current status indication of a component with acquire semantics.- Specified by:
getAcquirein classStatusIndicatorReader- Returns:
- the current status indication of a component.
-
getOpaque
public long getOpaque()Get the current status indication of a component with opaque semantics.- Specified by:
getOpaquein classStatusIndicatorReader- Returns:
- the current status indication of a component.
-
toString
-