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 TypeMethodDescriptionbuild()Returns 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 actorswithClock(InstantSource clock) Clock used to assign record timestampswithLogName(String logName) The log stream name - primarily used for contextualizing as well, e.g. loggers, actor name, etc.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.withPartitionId(int partitionId) The partition ID - primarily used for contextualizing the different log stream componentswithRequestLimit(com.netflix.concurrency.limits.Limit requestLimit) withWriteRateLimit(RateLimit writeRateLimit)
-
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
-
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
-
withClock
Clock used to assign record timestamps -
withRequestLimit
-
withWriteRateLimit
-
withMeterRegistry
Sets the meter registry to collect metrics on.- Parameters:
meterRegistry- the new meter registry to collect metrics on- Returns:
- this builder
-
build
LogStream build()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
-