Class LogStreamBuilderImpl

java.lang.Object
io.camunda.zeebe.logstreams.impl.log.LogStreamBuilderImpl
All Implemented Interfaces:
LogStreamBuilder

public final class LogStreamBuilderImpl extends Object implements LogStreamBuilder
  • Constructor Details

    • LogStreamBuilderImpl

      public LogStreamBuilderImpl()
  • Method Details

    • withActorSchedulingService

      public LogStreamBuilder withActorSchedulingService(ActorSchedulingService actorSchedulingService)
      Description copied from interface: LogStreamBuilder
      The actor scheduler to use for the LogStream and its child actors
      Specified by:
      withActorSchedulingService in interface LogStreamBuilder
      Parameters:
      actorSchedulingService - the scheduler to use
      Returns:
      this builder
    • withMaxFragmentSize

      public LogStreamBuilder withMaxFragmentSize(int maxFragmentSize)
      Description copied from interface: LogStreamBuilder
      The maximum fragment size read from the shared write buffer; this should be aligned with the maximum underlying storage block size.
      Specified by:
      withMaxFragmentSize in interface LogStreamBuilder
      Parameters:
      maxFragmentSize - the maximum fragment size in bytes
      Returns:
      this builder
    • withLogStorage

      public LogStreamBuilder withLogStorage(LogStorage logStorage)
      Description copied from interface: LogStreamBuilder
      The underlying log storage to read from/write to.
      Specified by:
      withLogStorage in interface LogStreamBuilder
      Parameters:
      logStorage - the underlying log storage
      Returns:
      this builder
    • withPartitionId

      public LogStreamBuilder withPartitionId(int partitionId)
      Description copied from interface: LogStreamBuilder
      The partition ID - primarily used for contextualizing the different log stream components
      Specified by:
      withPartitionId in interface LogStreamBuilder
      Parameters:
      partitionId - the log stream's partition ID
      Returns:
      this builder
    • withNodeId

      public LogStreamBuilder withNodeId(int nodeId)
      Description copied from interface: LogStreamBuilder
      The node ID - to indicate on which node the log stream is running
      Specified by:
      withNodeId in interface LogStreamBuilder
      Parameters:
      nodeId - the node id
      Returns:
      this builder
    • withLogName

      public LogStreamBuilder withLogName(String logName)
      Description copied from interface: LogStreamBuilder
      The log stream name - primarily used for contextualizing as well, e.g. loggers, actor name, etc.
      Specified by:
      withLogName in interface LogStreamBuilder
      Parameters:
      logName - the current log name
      Returns:
      this builder
    • withMeterRegistry

      public LogStreamBuilder withMeterRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry)
      Description copied from interface: LogStreamBuilder
      Sets the meter registry to collect metrics on.
      Specified by:
      withMeterRegistry in interface LogStreamBuilder
      Parameters:
      meterRegistry - the new meter registry to collect metrics on
      Returns:
      this builder
    • buildAsync

      public ActorFuture<LogStream> buildAsync()
      Description copied from interface: LogStreamBuilder
      Returns a future which, when completed, contains a log stream that can be read from/written to.
      Specified by:
      buildAsync in interface LogStreamBuilder
      Returns:
      a future which on complete contains the log stream