Package io.camunda.zeebe.logstreams.log
Interface LogStreamBuilder
- All Known Implementing Classes:
LogStreamBuilderImpl
public interface LogStreamBuilder
Builder pattern for the
LogStream-
Method Summary
Modifier and TypeMethodDescriptionReturns a future which, when completed, contains a log stream that can be read from/written to.withActorSchedulingService(ActorSchedulingService actorSchedulingService) The actor scheduler to use for theLogStreamand its child actorswithLogName(String logName) The log stream name - primarily used for contextualizing as well, e.g.withLogStorage(LogStorage logStorage) The underlying log storage to read from/write to.withMaxFragmentSize(int maxFragmentSize) The maximum fragment size read from the shared write buffer; this should be aligned with the maximum underlying storage block size.withNodeId(int nodeId) The node ID - to indicate on which node the log stream is runningwithPartitionId(int partitionId) The partition ID - primarily used for contextualizing the different log stream components
-
Method Details
-
withActorSchedulingService
The actor scheduler to use for theLogStreamand its child actors- Parameters:
actorSchedulingService- the scheduler to use- Returns:
- this builder
-
withMaxFragmentSize
The maximum fragment size read from the shared write buffer; this should be aligned with the maximum underlying storage block size.- Parameters:
maxFragmentSize- the maximum fragment size in bytes- Returns:
- this builder
-
withLogStorage
The underlying log storage to read from/write to.- Parameters:
logStorage- the underlying log storage- Returns:
- this builder
-
withPartitionId
The partition ID - primarily used for contextualizing the different log stream components- Parameters:
partitionId- the log stream's partition ID- Returns:
- this builder
-
withNodeId
The node ID - to indicate on which node the log stream is running- Parameters:
nodeId- the node id- Returns:
- this builder
-
withLogName
The log stream name - primarily used for contextualizing as well, e.g. loggers, actor name, etc.- Parameters:
logName- the current log name- Returns:
- this builder
-
buildAsync
ActorFuture<LogStream> buildAsync()Returns a future which, when completed, contains a log stream that can be read from/written to.- Returns:
- a future which on complete contains the log stream
-