Class LogStreamImpl
java.lang.Object
io.camunda.zeebe.logstreams.impl.log.LogStreamImpl
- All Implemented Interfaces:
LogStream,LogStorage.CommitListener,AutoCloseable
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Returns the name of the log stream.intvoidonCommit()Called when a new record is committed in the storagevoidregisterRecordAvailableListener(LogRecordAwaiter recordAwaiter) Registers a listener that will be notified when new records are available to read from the logstream.voidremoveRecordAvailableListener(LogRecordAwaiter recordAwaiter) Removes the listener.
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceLogStream
-
getPartitionId
public int getPartitionId()- Specified by:
getPartitionIdin interfaceLogStream- Returns:
- the partition id of the log stream
-
getLogName
Description copied from interface:LogStreamReturns the name of the log stream.- Specified by:
getLogNamein interfaceLogStream- Returns:
- the log stream name
-
newLogStreamReader
- Specified by:
newLogStreamReaderin interfaceLogStream- Returns:
- a future, when successfully completed it returns a newly created log stream reader
-
newLogStreamWriter
- Specified by:
newLogStreamWriterin interfaceLogStream- Returns:
- a future, when successfully completed it returns a newly created log stream record writer
-
getFlowControl
- Specified by:
getFlowControlin interfaceLogStream- Returns:
- a handle to the flow control used by this log stream.
-
registerRecordAvailableListener
Description copied from interface:LogStreamRegisters a listener that will be notified when new records are available to read from the logstream.- Specified by:
registerRecordAvailableListenerin interfaceLogStream- Parameters:
recordAwaiter- the listener to be notified
-
removeRecordAvailableListener
Description copied from interface:LogStreamRemoves the listener.- Specified by:
removeRecordAvailableListenerin interfaceLogStream- Parameters:
recordAwaiter- the listener to remove
-
onCommit
public void onCommit()Description copied from interface:LogStorage.CommitListenerCalled when a new record is committed in the storage- Specified by:
onCommitin interfaceLogStorage.CommitListener
-