Interface LogSession


public interface LogSession
Log session.
  • Method Details

    • partitionId

      PartitionId partitionId()
      Returns the session partition ID.
      Returns:
      the session partition ID
    • sessionId

      SessionId sessionId()
      Returns the session identifier.
      Returns:
      the session identifier
    • context

      io.atomix.utils.concurrent.ThreadContext context()
      Returns the partition thread context.
      Returns:
      the partition thread context
    • producer

      LogProducer producer()
      Returns the log producer.
      Returns:
      the log producer
    • consumer

      LogConsumer consumer()
      Returns the log consumer.
      Returns:
      the log consumer
    • getState

      PrimitiveState getState()
      Returns the current session state.
      Returns:
      the current session state
    • addStateChangeListener

      void addStateChangeListener​(java.util.function.Consumer<PrimitiveState> listener)
      Registers a session state change listener.
      Parameters:
      listener - The callback to call when the session state changes.
    • removeStateChangeListener

      void removeStateChangeListener​(java.util.function.Consumer<PrimitiveState> listener)
      Removes a state change listener.
      Parameters:
      listener - the state change listener to remove
    • connect

      Connects the log session.
      Returns:
      a future to be completed once the log session has been connected
    • close

      Closes the log session.
      Returns:
      a future to be completed once the log session has been closed