Interface LogStreamBuilder

All Known Implementing Classes:
LogStreamBuilderImpl

public interface LogStreamBuilder
Builder pattern for the LogStream
  • Method Details

    • withActorSchedulingService

      LogStreamBuilder withActorSchedulingService(ActorSchedulingService actorSchedulingService)
      The actor scheduler to use for the LogStream and its child actors
      Parameters:
      actorSchedulingService - the scheduler to use
      Returns:
      this builder
    • withMaxFragmentSize

      LogStreamBuilder withMaxFragmentSize(int maxFragmentSize)
      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

      LogStreamBuilder withLogStorage(LogStorage logStorage)
      The underlying log storage to read from/write to.
      Parameters:
      logStorage - the underlying log storage
      Returns:
      this builder
    • withPartitionId

      LogStreamBuilder withPartitionId(int partitionId)
      The partition ID - primarily used for contextualizing the different log stream components
      Parameters:
      partitionId - the log stream's partition ID
      Returns:
      this builder
    • withNodeId

      LogStreamBuilder withNodeId(int nodeId)
      The node ID - to indicate on which node the log stream is running
      Parameters:
      nodeId - the node id
      Returns:
      this builder
    • withLogName

      LogStreamBuilder withLogName(String logName)
      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
    • withMeterRegistry

      LogStreamBuilder withMeterRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry)
      Sets the meter registry to collect metrics on.
      Parameters:
      meterRegistry - the new meter registry to collect metrics on
      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