Class ReadablePosition

java.lang.Object
org.agrona.concurrent.status.ReadablePosition
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
Position

public abstract class ReadablePosition extends Object implements AutoCloseable
Indicates how far through an abstract task a component has progressed as a counter value.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    abstract long
    get()
    Get the current position of a component with plain memory semantics.
    abstract long
    Get the current position of a component with acquire memory semantics.
    abstract long
    Get the current position of a component with opaque memory semantics.
    abstract long
    Get the current position of a component with volatile memory semantics.
    abstract int
    id()
    Identifier for this position.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ReadablePosition

      public ReadablePosition()
      Default constructor.
  • Method Details

    • id

      public abstract int id()
      Identifier for this position.
      Returns:
      the identifier for this position.
    • get

      public abstract long get()
      Get the current position of a component with plain memory semantics.
      Returns:
      the current position of a component
    • getVolatile

      public abstract long getVolatile()
      Get the current position of a component with volatile memory semantics.
      Returns:
      the current position of a component.
    • getAcquire

      public abstract long getAcquire()
      Get the current position of a component with acquire memory semantics.
      Returns:
      the current position of a component.
      Since:
      2.1.0
    • getOpaque

      public abstract long getOpaque()
      Get the current position of a component with opaque memory semantics.
      Returns:
      the current position of a component
      Since:
      2.1.0
    • close

      public abstract void close()
      Specified by:
      close in interface AutoCloseable