Interface LogStream

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
LogStreamImpl

public interface LogStream extends AutoCloseable
Represents a stream of events. New events are append to the end of the log. With newLogStreamWriter() new writers can be created, which can be used to append new events to the log.

To read events, the newLogStreamReader() ()} can be used.

  • Method Details

    • close

      void close()
      Specified by:
      close in interface AutoCloseable
    • builder

      static LogStreamBuilder builder()
      Returns:
      a new default LogStream builder
    • getPartitionId

      int getPartitionId()
      Returns:
      the partition id of the log stream
    • getLogName

      String getLogName()
      Returns the name of the log stream.
      Returns:
      the log stream name
    • newLogStreamReader

      LogStreamReader newLogStreamReader()
      Returns:
      a future, when successfully completed it returns a newly created log stream reader
    • newLogStreamWriter

      LogStreamWriter newLogStreamWriter()
      Returns:
      a future, when successfully completed it returns a newly created log stream record writer
    • getFlowControl

      FlowControl getFlowControl()
      Returns:
      a handle to the flow control used by this log stream.
    • registerRecordAvailableListener

      void registerRecordAvailableListener(LogRecordAwaiter recordAwaiter)
      Registers a listener that will be notified when new records are available to read from the logstream.
      Parameters:
      recordAwaiter - the listener to be notified
    • removeRecordAvailableListener

      void removeRecordAvailableListener(LogRecordAwaiter recordAwaiter)
      Removes the listener.
      Parameters:
      recordAwaiter - the listener to remove