Class UnsafeBufferStatusIndicator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getAcquire()
      Get the current status indication of a component with acquire semantics.
      long getOpaque()
      Get the current status indication of a component with opaque semantics.
      long getVolatile()
      Get the current status indication of a component with volatile semantics.
      int id()
      Identifier for this status indicator.
      void setOpaque​(long value)
      Sets the current status indication of the component with opaque memory semantics.
      void setOrdered​(long value)
      Sets the current status indication of the component with ordered memory semantics.
      void setRelease​(long value)
      Sets the current status indication of the component with release memory semantics.
      void setVolatile​(long value)
      Sets the current status indication of the component with volatile memory semantics.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • counterId

        private final int counterId
      • addressOffset

        private final long addressOffset
      • byteArray

        private final byte[] byteArray
      • byteBuffer

        private final java.nio.ByteBuffer byteBuffer
    • Constructor Detail

      • 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 Detail

      • id

        public int id()
        Identifier for this status indicator.
        Specified by:
        id in class StatusIndicatorReader
        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:
        setVolatile in class StatusIndicator
        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:
        setOrdered in class StatusIndicator
        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:
        setRelease in class StatusIndicator
        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:
        setOpaque 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.
      • getAcquire

        public long getAcquire()
        Get the current status indication of a component with acquire semantics.
        Specified by:
        getAcquire in class StatusIndicatorReader
        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:
        getOpaque in class StatusIndicatorReader
        Returns:
        the current status indication of a component.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object