Class LogStreamBuilderImpl
java.lang.Object
io.camunda.zeebe.logstreams.impl.log.LogStreamBuilderImpl
- All Implemented Interfaces:
LogStreamBuilder
-
Constructor Summary
Constructors -
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.withMeterRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry) Sets the meter registry to collect metrics on.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
-
Constructor Details
-
LogStreamBuilderImpl
public LogStreamBuilderImpl()
-
-
Method Details
-
withActorSchedulingService
Description copied from interface:LogStreamBuilderThe actor scheduler to use for theLogStreamand its child actors- Specified by:
withActorSchedulingServicein interfaceLogStreamBuilder- Parameters:
actorSchedulingService- the scheduler to use- Returns:
- this builder
-
withMaxFragmentSize
Description copied from interface:LogStreamBuilderThe maximum fragment size read from the shared write buffer; this should be aligned with the maximum underlying storage block size.- Specified by:
withMaxFragmentSizein interfaceLogStreamBuilder- Parameters:
maxFragmentSize- the maximum fragment size in bytes- Returns:
- this builder
-
withLogStorage
Description copied from interface:LogStreamBuilderThe underlying log storage to read from/write to.- Specified by:
withLogStoragein interfaceLogStreamBuilder- Parameters:
logStorage- the underlying log storage- Returns:
- this builder
-
withPartitionId
Description copied from interface:LogStreamBuilderThe partition ID - primarily used for contextualizing the different log stream components- Specified by:
withPartitionIdin interfaceLogStreamBuilder- Parameters:
partitionId- the log stream's partition ID- Returns:
- this builder
-
withNodeId
Description copied from interface:LogStreamBuilderThe node ID - to indicate on which node the log stream is running- Specified by:
withNodeIdin interfaceLogStreamBuilder- Parameters:
nodeId- the node id- Returns:
- this builder
-
withLogName
Description copied from interface:LogStreamBuilderThe log stream name - primarily used for contextualizing as well, e.g. loggers, actor name, etc.- Specified by:
withLogNamein interfaceLogStreamBuilder- Parameters:
logName- the current log name- Returns:
- this builder
-
withMeterRegistry
public LogStreamBuilder withMeterRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry) Description copied from interface:LogStreamBuilderSets the meter registry to collect metrics on.- Specified by:
withMeterRegistryin interfaceLogStreamBuilder- Parameters:
meterRegistry- the new meter registry to collect metrics on- Returns:
- this builder
-
buildAsync
Description copied from interface:LogStreamBuilderReturns a future which, when completed, contains a log stream that can be read from/written to.- Specified by:
buildAsyncin interfaceLogStreamBuilder- Returns:
- a future which on complete contains the log stream
-