Class UnsafeBufferStatusIndicator


public class UnsafeBufferStatusIndicator extends StatusIndicator
StatusIndicator which wraps an AtomicBuffer with a given counter id.
See Also:
  • Field Details

    • counterId

      private final int counterId
    • addressOffset

      private final long addressOffset
    • byteArray

      private final byte[] byteArray
    • byteBuffer

      private final ByteBuffer byteBuffer
  • Constructor Details

    • UnsafeBufferStatusIndicator

      public UnsafeBufferStatusIndicator(AtomicBuffer buffer, int counterId)
      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 class StatusIndicatorReader
      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 class StatusIndicator
      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 class StatusIndicatorReader
      Returns:
      the current status indication of a component with volatile semantics.
    • toString

      public String toString()
      Overrides:
      toString in class Object