class DbSequencerStore extends SequencerStore with DbSequencerStorePruning with DbStore with NamedLogging with FlagCloseable

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DbSequencerStore
  2. DbStore
  3. HasCloseContext
  4. PromiseUnlessShutdownFactory
  5. FlagCloseable
  6. PerformUnlessClosing
  7. HasSynchronizeWithReaders
  8. OnShutdownRunner
  9. HasRunOnClosing
  10. HasUnlessClosing
  11. DbSequencerStorePruning
  12. SequencerStore
  13. AutoCloseable
  14. NamedLogging
  15. SequencerMemberValidator
  16. AnyRef
  17. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new DbSequencerStore(storage: DbStorage, protocolVersion: ProtocolVersion, bufferedEventsMaxMemory: BytesUnit, bufferedEventsPreloadBatchSize: PositiveInt, timeouts: ProcessingTimeout, loggerFactory: NamedLoggerFactory, sequencerMember: Member, blockSequencerMode: Boolean, cachingConfigs: CachingConfigs, batchingConfig: BatchingConfig, sequencerMetrics: SequencerMetrics, overrideCloseContext: Option[CloseContext] = None)(implicit executionContext: ExecutionContext)

Type Members

  1. case class DeliverStoreEventRow[P](timestamp: CantonTimestamp, instanceIndex: Int, eventType: EventTypeDiscriminator, messageIdO: Option[MessageId] = None, senderO: Option[SequencerMemberId] = None, recipientsO: Option[NonEmpty[SortedSet[SequencerMemberId]]] = None, payloadO: Option[P] = None, topologyTimestampO: Option[CantonTimestamp] = None, traceContext: TraceContext, errorO: Option[ByteString], trafficReceiptO: Option[TrafficReceipt]) extends Product with Serializable

    trafficReceiptO

    If traffic management is enabled, there should always be traffic information for the sender. The information might be discarded later though, in case the event is being processed as part of a subscription for any of the recipients that isn't the sender.

  2. sealed abstract class EventTypeDiscriminator extends AnyRef

    Single char that is persisted with the event to indicate the type of event

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def acknowledge(member: SequencerMemberId, timestamp: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]

    Write an acknowledgement that member has processed earlier timestamps.

    Write an acknowledgement that member has processed earlier timestamps. Only the latest timestamp needs to be stored. Earlier timestamps can be overwritten. Acknowledgements of earlier timestamps should be ignored.

    Definition Classes
    DbSequencerStoreSequencerStore
  5. def addReader(reader: String)(implicit traceContext: TraceContext): UnlessShutdown[ReaderHandle]

    TODO(#16601) Make this method private once PerformUnlessClosing doesn't need it any more

    TODO(#16601) Make this method private once PerformUnlessClosing doesn't need it any more

    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val batchingConfig: BatchingConfig
  8. val blockSequencerMode: Boolean

    Whether the sequencer store operates is used for a block sequencer or a standalone database sequencer.

    Whether the sequencer store operates is used for a block sequencer or a standalone database sequencer.

    Definition Classes
    DbSequencerStoreSequencerStore
  9. final def bufferEvents(events: NonEmpty[Seq[Sequenced[BytesPayload]]]): Unit

    In case of single instance sequencer we can use in-memory fanout buffer for events

    In case of single instance sequencer we can use in-memory fanout buffer for events

    Definition Classes
    SequencerStore
  10. val bufferedEventsMaxMemory: BytesUnit

    Maximum memory usage by the events in the buffer before it starts dropping events.

    Maximum memory usage by the events in the buffer before it starts dropping events. If set to 0, caching is disabled and all requests go to the underlying store (e.g. database).

    Definition Classes
    DbSequencerStoreSequencerStore
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  12. final def close(): Unit

    Blocks until all earlier tasks have completed and then prevents further tasks from being run.

    Blocks until all earlier tasks have completed and then prevents further tasks from being run.

    Definition Classes
    FlagCloseableOnShutdownRunner → AutoCloseable
  13. implicit val closeContext: CloseContext
    Definition Classes
    DbSequencerStoreHasCloseContext
  14. def closingTimeout: FiniteDuration
    Attributes
    protected
    Definition Classes
    FlagCloseablePerformUnlessClosing
  15. def countRecords(implicit traceContext: TraceContext): FutureUnlessShutdown[SequencerStoreRecordCounts]

    Count records currently stored by the sequencer.

    Count records currently stored by the sequencer. Used for pruning tests.

    Attributes
    protected[canton]
    Definition Classes
    DbSequencerStoreSequencerStore
    Annotations
    @VisibleForTesting()
  16. def deleteEventsPastWatermark(instanceIndex: Int)(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[CantonTimestamp]]

    Delete all events that are ahead of the watermark of this sequencer.

    Delete all events that are ahead of the watermark of this sequencer. These events will not have been read and should be removed before returning the sequencer online. Should not be called alongside updating the watermark for this sequencer and only while the sequencer is offline. Returns the watermark that was used for the deletion.

    Definition Classes
    DbSequencerStoreSequencerStore
  17. def disableMember(member: Member)(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]

    Prevents member from sending and reading from the sequencer, and allows unread data for this member to be pruned.

    Prevents member from sending and reading from the sequencer, and allows unread data for this member to be pruned. It however won't stop any sends addressed to this member.

    Definition Classes
    SequencerStore
  18. def disableMemberInternal(member: SequencerMemberId)(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]
    Attributes
    protected
    Definition Classes
    DbSequencerStoreSequencerStore
  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  21. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  22. val eventsBuffer: EventsBuffer
    Attributes
    protected
    Definition Classes
    SequencerStore
  23. lazy val eventsBufferEnabled: Boolean
    Definition Classes
    SequencerStore
    Annotations
    @VisibleForTesting()
  24. implicit val executionContext: ExecutionContext
    Attributes
    protected
    Definition Classes
    DbSequencerStoreSequencerStore
  25. def fetchLowerBound()(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[(CantonTimestamp, Option[CantonTimestamp])]]

    Fetch the lower bound of events that can be read.

    Fetch the lower bound of events that can be read. Returns None if all events can be read.

    Definition Classes
    DbSequencerStoreSequencerStore
  26. def fetchOnlineInstances(implicit traceContext: TraceContext): FutureUnlessShutdown[SortedSet[Int]]

    Fetch the indexes of all sequencers that are currently online

    Fetch the indexes of all sequencers that are currently online

    Definition Classes
    DbSequencerStoreSequencerStore
  27. def fetchPreviousEventTimestamp(memberId: SequencerMemberId, timestampInclusive: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[CantonTimestamp]]

    Fetch previous event timestamp for a member for a given inclusive timestamp.

    Fetch previous event timestamp for a member for a given inclusive timestamp.

    Definition Classes
    DbSequencerStoreSequencerStore
  28. def fetchWatermark(instanceIndex: Int, maxRetries: Int = retry.Forever)(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[Watermark]]

    Read the watermark for this sequencer and its online/offline status.

    Read the watermark for this sequencer and its online/offline status. Currently only used for testing.

    Definition Classes
    DbSequencerStoreSequencerStore
  29. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  30. def goOffline(instanceIndex: Int)(implicit traceContext: TraceContext, callerCloseContext: CloseContext): FutureUnlessShutdown[Unit]

    Flag that we're going offline (likely due to a shutdown)

    Flag that we're going offline (likely due to a shutdown)

    Definition Classes
    DbSequencerStoreSequencerStore
  31. def goOnline(instanceIndex: Int, now: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[CantonTimestamp]

    Mark the sequencer as online and return a timestamp for when this sequencer can start safely producing events.

    Mark the sequencer as online and return a timestamp for when this sequencer can start safely producing events.

    now

    Now according to this sequencer's clock which will be used if it is ahead of the lowest available timestamp from other sequencers.

    Definition Classes
    DbSequencerStoreSequencerStore
  32. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  33. def initializeFromSnapshot(initialState: SequencerInitialState)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, String, Unit]
    Definition Classes
    SequencerStore
  34. def isClosing: Boolean

    Check whether we're closing.

    Check whether we're closing. Susceptible to race conditions; unless you're using this as a flag to the retry lib or you really know what you're doing, prefer performUnlessClosing and friends.

    Definition Classes
    OnShutdownRunnerHasUnlessClosing
  35. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  36. def isMemberRegisteredAt(member: Member, time: CantonTimestamp)(implicit tc: TraceContext): FutureUnlessShutdown[Boolean]
  37. def keepTrackOfReaderCallStack: Boolean

    Set this to true to get detailed information about all futures that did not complete during shutdown.

    Set this to true to get detailed information about all futures that did not complete during shutdown.

    Attributes
    protected[this]
    Definition Classes
    PerformUnlessClosingHasSynchronizeWithReaders
  38. def latestAcknowledgements()(implicit traceContext: TraceContext): FutureUnlessShutdown[Map[SequencerMemberId, CantonTimestamp]]

    Return the latest acknowledgements for all members

    Return the latest acknowledgements for all members

    Definition Classes
    DbSequencerStoreSequencerStore
  39. def latestTopologyClientRecipientTimestamp(member: Member, timestampExclusive: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[CantonTimestamp]]

    For a given member and timestamp, return the latest timestamp of a potential topology change, that reached both the sequencer and the member.

    For a given member and timestamp, return the latest timestamp of a potential topology change, that reached both the sequencer and the member. To be used by the topology snapshot awaiting, should there be a topology change expected to need to be taken into account for timestampExclusive sequencing timestamp.

    Definition Classes
    DbSequencerStoreSequencerStore
  40. def locatePruningTimestamp(skip: NonNegativeInt)(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[CantonTimestamp]]

    Locate a timestamp relative to the earliest available event based on a skip index starting at 0.

    Locate a timestamp relative to the earliest available event based on a skip index starting at 0. Useful to monitor the progress of pruning and for pruning in batches.

    returns

    The timestamp of the (skip+1)'th event if it exists, None otherwise.

    Definition Classes
    DbSequencerStoreSequencerStore
  41. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  42. val loggerFactory: NamedLoggerFactory
    Attributes
    protected
    Definition Classes
    DbSequencerStoreNamedLogging
  43. final def lookupMember(member: Member)(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[RegisteredMember]]

    Lookup an existing member id for the given member.

    Lookup an existing member id for the given member. Will return a cached value if available. Return scala.None if no id exists.

    Definition Classes
    SequencerStore
  44. def lookupMemberInternal(member: Member)(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[RegisteredMember]]

    Lookup member directly without caching.

    Lookup member directly without caching.

    Attributes
    protected
    Definition Classes
    DbSequencerStoreSequencerStore
  45. def markLaggingSequencersOffline(cutoffTime: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]

    Flag any sequencers that have a last updated watermark on or before the given cutoffTime as offline.

    Flag any sequencers that have a last updated watermark on or before the given cutoffTime as offline.

    Definition Classes
    DbSequencerStoreSequencerStore
  46. def maxSleepMillis: Long

    How often to poll to check that all tasks have completed.

    How often to poll to check that all tasks have completed.

    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  47. def mkPromise[A](description: String, futureSupervisor: FutureSupervisor, logAfter: Duration = 10.seconds, logLevel: Level = Level.DEBUG)(implicit elc: ErrorLoggingContext): PromiseUnlessShutdown[A]

    Use this method to create a PromiseUnlessShutdown that will automatically be cancelled when the close context is closed.

    Use this method to create a PromiseUnlessShutdown that will automatically be cancelled when the close context is closed. This allows proper clean up of stray promises when the node is transitioning to a passive state.

    Note: you should *not* invoke success on the returned promise but rather use trySuccess. The reason is that the call to success may fail in case of shutdown.

    Definition Classes
    PromiseUnlessShutdownFactory
  48. def nameInternal: String
    Attributes
    protected[this]
    Definition Classes
    PerformUnlessClosingHasSynchronizeWithReaders
  49. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  50. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  51. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  52. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  53. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  54. def onCloseFailure(e: Throwable): Unit
    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  55. def onClosed(): Unit
    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  56. final def onFirstClose(): Unit

    Blocks until all earlier tasks have completed and then prevents further tasks from being run.

    Blocks until all earlier tasks have completed and then prevents further tasks from being run.

    Definition Classes
    PerformUnlessClosingOnShutdownRunner
    Annotations
    @SuppressWarnings()
  57. def performUnlessClosing[A](name: String)(f: => A)(implicit traceContext: TraceContext): UnlessShutdown[A]

    Performs the task given by f unless a shutdown has been initiated.

    Performs the task given by f unless a shutdown has been initiated. The shutdown will only begin after f completes, but other tasks may execute concurrently with f, if started using this function, or one of the other variants (performUnlessClosingF and performUnlessClosingEitherT). The tasks are assumed to take less than closingTimeout to complete.

    DO NOT CALL this.close as part of f, because it will result in a deadlock. DO NOT PUT retries, especially indefinite ones, inside f.

    f

    The task to perform

    returns

    scala.None$ if a shutdown has been initiated. Otherwise the result of the task.

    Definition Classes
    PerformUnlessClosing
  58. def performUnlessClosingCheckedT[A, N, R](name: String, onClosing: => Checked[A, N, R])(etf: => CheckedT[Future, A, N, R])(implicit ec: ExecutionContext, traceContext: TraceContext): CheckedT[Future, A, N, R]
    Definition Classes
    PerformUnlessClosing
  59. def performUnlessClosingCheckedUST[A, N, R](name: String, onClosing: => Checked[A, N, R])(etf: => CheckedT[FutureUnlessShutdown, A, N, R])(implicit ec: ExecutionContext, traceContext: TraceContext): CheckedT[FutureUnlessShutdown, A, N, R]
    Definition Classes
    PerformUnlessClosing
  60. def performUnlessClosingEitherT[E, R](name: String, onClosing: => E)(etf: => EitherT[Future, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[Future, E, R]

    Performs the EitherT[Future] given by etf unless a shutdown has been initiated, in which case the provided error is returned instead.

    Performs the EitherT[Future] given by etf unless a shutdown has been initiated, in which case the provided error is returned instead. Both etf and the error are lazy; etf is only evaluated if there is no shutdown, the error only if we're shutting down. The shutdown will only begin after etf completes, but other tasks may execute concurrently with etf, if started using this function, or one of the other variants (performUnlessClosing and performUnlessClosingF). The tasks are assumed to take less than closingTimeout to complete.

    DO NOT CALL this.close as part of etf, because it will result in a deadlock. DO NOT PUT retries, especially indefinite ones, inside f.

    etf

    The task to perform

    Definition Classes
    PerformUnlessClosing
  61. def performUnlessClosingEitherU[E, R](name: String)(etf: => EitherT[Future, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]
    Definition Classes
    PerformUnlessClosing
  62. def performUnlessClosingEitherUSF[E, R](name: String)(etf: => EitherT[FutureUnlessShutdown, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]
    Definition Classes
    PerformUnlessClosing
  63. def performUnlessClosingEitherUSFAsync[E, R](name: String)(etf: => EitherT[FutureUnlessShutdown, E, R])(asyncResultToWaitForF: (R) => FutureUnlessShutdown[_])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]

    Use this method if closing/shutdown of the object should wait for asynchronous computation to finish too.

    Use this method if closing/shutdown of the object should wait for asynchronous computation to finish too.

    etf

    closing of this object will wait for all such spawned Futures to finish

    asyncResultToWaitForF

    closing of this object will wait also wait for all such asynchronous Futures to finish too

    returns

    the future spawned by etf

    Definition Classes
    PerformUnlessClosing
  64. def performUnlessClosingF[A](name: String)(f: => Future[A])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]

    Performs the Future given by f unless a shutdown has been initiated.

    Performs the Future given by f unless a shutdown has been initiated. The future is lazy and not evaluated during shutdown. The shutdown will only begin after f completes, but other tasks may execute concurrently with f, if started using this function, or one of the other variants (performUnlessClosing and performUnlessClosingEitherT). The tasks are assumed to take less than closingTimeout to complete.

    DO NOT CALL this.close as part of f, because it will result in a deadlock. DO NOT PUT retries, especially indefinite ones, inside f.

    f

    The task to perform

    returns

    The future completes with com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown if a shutdown has been initiated. Otherwise the result of the task wrapped in com.digitalasset.canton.lifecycle.UnlessShutdown.Outcome.

    Definition Classes
    PerformUnlessClosing
  65. def performUnlessClosingOptionUSF[R](name: String)(otf: => OptionT[FutureUnlessShutdown, R])(implicit ec: ExecutionContext, traceContext: TraceContext): OptionT[FutureUnlessShutdown, R]
    Definition Classes
    PerformUnlessClosing
  66. def performUnlessClosingUSF[A](name: String)(f: => FutureUnlessShutdown[A])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]
    Definition Classes
    PerformUnlessClosing
  67. def performUnlessClosingUSFAsync[A](name: String)(f: => FutureUnlessShutdown[A])(asyncResultToWaitForF: (A) => FutureUnlessShutdown[_])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]

    Use this method if closing/shutdown of the object should wait for asynchronous computation to finish too.

    Use this method if closing/shutdown of the object should wait for asynchronous computation to finish too.

    f

    closing of this object will wait for all such spawned Futures to finish

    asyncResultToWaitForF

    closing of this object will wait also wait for all such asynchronous Futures to finish too

    returns

    the future spawned by f

    Definition Classes
    PerformUnlessClosing
  68. def preloadBufferInternal()(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]
    Attributes
    protected
    Definition Classes
    DbSequencerStoreSequencerStore
  69. def previousEventTimestamp(memberId: SequencerMemberId, timestampExclusive: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[CantonTimestamp]]

    For a given member find the timestamp of the last event that the member has received before timestampExclusive.

    For a given member find the timestamp of the last event that the member has received before timestampExclusive.

    Definition Classes
    DbSequencerStoreSequencerStore
  70. def prune(requestedTimestamp: CantonTimestamp, status: SequencerPruningStatus, payloadToEventMargin: NonNegativeFiniteDuration)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, PruningError, SequencerPruningResult]

    Prune as much data as safely possible from before the given timestamp.

    Prune as much data as safely possible from before the given timestamp.

    requestedTimestamp

    the timestamp that we would like to prune up to (see docs on using the pruning status and disabling members for picking this value)

    status

    the pruning status that should be used for determining a safe to prune time for validation

    payloadToEventMargin

    the maximum time margin between payloads and events. once we have a safe to prune timestamp we simply prune all payloads at safeTimestamp - margin to ensure no payloads are removed where events will remain. typically sourced from SequencerWriterConfig.payloadToEventMargin.

    returns

    the timestamp up to which the database sequencer has been pruned (lower than requestedTimestamp) and a human readable report on what has been removed.

    Definition Classes
    SequencerStore
  71. def pruneEvents(beforeExclusive: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Int]

    Prune events before the given timestamp

    Prune events before the given timestamp

    returns

    a best efforts count of how many events were removed. this value can be less than the number of events actually removed if technical issues prevent a full count from being returned (e.g. with a database we may retry a delete after a connectivity issue and find that all events were successfully removed and have 0 rows removed returned).

    Attributes
    protected[store]
    Definition Classes
    DbSequencerStoreSequencerStore
  72. def pruneIntervalsInBatches(intervals: Seq[(CantonTimestamp, CantonTimestamp)], table: String, indexedTimestampColumn: String, functionName: String = functionFullName)(implicit ec: ExecutionContext, tc: TraceContext): FutureUnlessShutdown[Seq[Int]]
    Attributes
    protected
    Definition Classes
    DbSequencerStorePruning
  73. def prunePayloads(beforeExclusive: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Int]

    Prune payloads before the given timestamp

    Prune payloads before the given timestamp

    returns

    a best efforts count of how many events were removed. this value can be less than the number of payloads actually removed if technical issues prevent a full count from being returned.

    Attributes
    protected[store]
    Definition Classes
    DbSequencerStoreSequencerStore
  74. def pruningIntervalsDBIO(table: String, indexedTimestampColumn: String, upperBound: CantonTimestamp)(implicit ec: ExecutionContext): resource.DbStorage.Profile.DbStorageAPI.DBIOAction[Seq[(CantonTimestamp, CantonTimestamp)], resource.DbStorage.Profile.DbStorageAPI.NoStream, Read]
    Attributes
    protected
    Definition Classes
    DbSequencerStorePruning
  75. def readEvents(memberId: SequencerMemberId, member: Member, fromExclusiveO: Option[CantonTimestamp], limit: Int)(implicit traceContext: TraceContext, metricsContext: MetricsContext): FutureUnlessShutdown[ReadEvents]

    Read all events of which a member is a recipient from the provided timestamp but no greater than the earliest watermark.

    Read all events of which a member is a recipient from the provided timestamp but no greater than the earliest watermark. Passing both member and memberId to avoid a database query for the lookup.

    Definition Classes
    SequencerStore
  76. def readEventsInternal(memberId: SequencerMemberId, fromTimestampExclusiveO: Option[CantonTimestamp], limit: Int)(implicit traceContext: TraceContext): FutureUnlessShutdown[ReadEvents]

    Internal non-buffered implementation of readEvents.

    Internal non-buffered implementation of readEvents.

    Attributes
    protected
    Definition Classes
    DbSequencerStoreSequencerStore
  77. def readPayloads(payloadIds: Seq[IdOrPayload], member: Member)(implicit traceContext: TraceContext): FutureUnlessShutdown[Map[PayloadId, Batch[ClosedEnvelope]]]
    Definition Classes
    DbSequencerStoreSequencerStore
  78. def readStateAtTimestamp(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[SequencerSnapshot]

    The state returned here is used to initialize a separate database sequencer (that does not share the same database as this one) using initializeFromSnapshot such that this new sequencer has enough information (registered members, previous event timestamps, etc) to be able to process new events from the same point as this sequencer to the same clients.

    The state returned here is used to initialize a separate database sequencer (that does not share the same database as this one) using initializeFromSnapshot such that this new sequencer has enough information (registered members, previous event timestamps, etc) to be able to process new events from the same point as this sequencer to the same clients. This is typically used by block sequencers that use the database sequencer as local storage such that they will process the same events in the same order and they need to be able to spin up new block sequencers from a specific point in time.

    returns

    state at the given time

    Definition Classes
    DbSequencerStoreSequencerStore
  79. def registerMember(member: Member, timestamp: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[SequencerMemberId]

    Register the provided member.

    Register the provided member. Should be idempotent if member is already registered and return the existing id.

    Definition Classes
    DbSequencerStoreSequencerStore
  80. def remainingReaders(): Seq[String]
    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  81. def removeReader(handle: ReaderHandle): Unit

    TODO(#16601) Make this method private once PerformUnlessClosing doesn't need it any more

    TODO(#16601) Make this method private once PerformUnlessClosing doesn't need it any more

    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  82. final def resetAndPreloadBuffer()(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]
    Definition Classes
    SequencerStore
  83. def resetWatermark(instanceIndex: Int, ts: CantonTimestamp)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SaveWatermarkError, Unit]

    Reset the watermark to an earlier value, i.e.

    Reset the watermark to an earlier value, i.e. in case of working as a part of block sequencer. Also sets the sequencer as offline. If current watermark value is before ts, it will be left unchanged. If a watermark doesn't yet exist, it won't be inserted, because it would effectively mean setting it to a future value.

    Definition Classes
    DbSequencerStoreSequencerStore
  84. def runOnClose(task: RunOnClosing): UnlessShutdown[LifeCycleRegistrationHandle]

    Schedules the given task to be run upon closing.

    Schedules the given task to be run upon closing.

    returns

    An com.digitalasset.canton.lifecycle.UnlessShutdown.Outcome indicates that the task will have been run when the LifeCycleManager's closeAsync method completes or when AutoCloseable's close method returns, unless the returned LifeCycleRegistrationHandle was used to cancel the task or the task has been done beforehand. com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown if the task is not run due to closing. This always happens if isClosing returns true.

    Definition Classes
    OnShutdownRunnerHasRunOnClosing
  85. def runOnOrAfterClose(task: RunOnClosing)(implicit traceContext: TraceContext): LifeCycleRegistrationHandle

    Register a task to run when closing is initiated, or run it immediately if closing is already ongoing.

    Register a task to run when closing is initiated, or run it immediately if closing is already ongoing. Unlike runOnClose, this method does not guarantee that this task will have run by the time the LifeCycleManager's closeAsync method completes or AutoCloseable's close returns. This is because the task is run immediately if the component has already been closed.

    Definition Classes
    HasRunOnClosing
  86. final def runOnOrAfterClose_(task: RunOnClosing)(implicit traceContext: TraceContext): Unit

    Variant of runOnOrAfterClose that does not return a com.digitalasset.canton.lifecycle.LifeCycleRegistrationHandle.

  87. def runTaskUnlessDone(task: RunOnClosing)(implicit traceContext: TraceContext): Unit
    Attributes
    protected[this]
    Definition Classes
    OnShutdownRunnerHasRunOnClosing
  88. def safeWatermark(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[CantonTimestamp]]

    Return the minimum watermark across all online sequencers

    Return the minimum watermark across all online sequencers

    Definition Classes
    DbSequencerStoreSequencerStore
  89. def saveEvents(instanceIndex: Int, events: NonEmpty[Seq[Sequenced[PayloadId]]])(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]

    Save a series of events to the store.

    Save a series of events to the store. Callers should determine batch size. No batching is done within the store. Callers MUST ensure that event-ids are unique as no errors will be returned if a duplicate is present (for the sequencer writer see sequencer.PartitionedTimestampGenerator for use with their instance index).

    Definition Classes
    DbSequencerStoreSequencerStore
  90. def saveLowerBound(ts: CantonTimestamp, latestTopologyClientTimestamp: Option[CantonTimestamp])(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SaveLowerBoundError, Unit]

    Save an updated lower bound of events that can be read.

    Save an updated lower bound of events that can be read. Must be equal or greater than any prior set lower bound.

    Definition Classes
    DbSequencerStoreSequencerStore
    Exceptions thrown

    java.lang.IllegalArgumentException if timestamp is lower than existing lower bound

  91. def savePayloads(payloads: NonEmpty[Seq[BytesPayload]], instanceDiscriminator: UUID)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SavePayloadsError, Unit]

    Save a series of payloads to the store.

    Save a series of payloads to the store. Is up to the caller to determine a reasonable batch size and no batching is done within the store.

    payloads

    the payloads to save

    instanceDiscriminator

    a unique ephemeral value to ensure that no other sequencer instances are writing conflicting payloads without having to check the payload body

    Definition Classes
    DbSequencerStoreSequencerStore
  92. def saveWatermark(instanceIndex: Int, ts: CantonTimestamp)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SaveWatermarkError, Unit]

    Write the watermark that we promise not to write anything earlier than.

    Write the watermark that we promise not to write anything earlier than. Does not indicate that there is an event written by this sequencer for this timestamp as there may be no activity at the sequencer, but updating the timestamp allows the sequencer to indicate that it's still alive. Return an error if we find our sequencer is offline.

    Definition Classes
    DbSequencerStoreSequencerStore
  93. val sequencerMember: Member
    Definition Classes
    DbSequencerStoreSequencerStore
  94. val sequencerMetrics: SequencerMetrics
    Attributes
    protected
    Definition Classes
    DbSequencerStoreSequencerStore
  95. def status(now: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[SequencerPruningStatus]

    Build a status object representing the current state of the sequencer.

    Build a status object representing the current state of the sequencer.

    Definition Classes
    DbSequencerStoreSequencerStore
  96. val storage: DbStorage
    Attributes
    protected
    Definition Classes
    DbSequencerStoreDbStore
  97. def synchronizeWithClosingPatience: FiniteDuration
    Attributes
    protected[this]
    Definition Classes
    PerformUnlessClosingHasSynchronizeWithReaders
  98. def synchronizeWithReaders()(implicit traceContext: TraceContext): Boolean
    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  99. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  100. val timeouts: ProcessingTimeout
    Attributes
    protected
    Definition Classes
    DbSequencerStoreFlagCloseable
  101. def toString(): String
    Definition Classes
    AnyRef → Any
  102. final def unlessClosing[F[_], A](fa: => F[A])(implicit F: CanAbortDueToShutdown[F]): F[A]

    Runs the computation fa unless isClosing returns true.

    Runs the computation fa unless isClosing returns true.

    This method does not delay the closing while fa is running, unlike the methods in HasSynchronizeWithClosing. Accordingly, this method is useful for intermittent checks whether the result of the computation is still relevant.

    returns

    The result of fa or com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown if isClosing is true

    Definition Classes
    HasUnlessClosing
    Annotations
    @inline()
  103. def updatePrunedPreviousEventTimestamps(updatedPreviousTimestamps: Map[Member, Option[CantonTimestamp]])(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]

    Set the "pruned" previous event timestamp for a member.

    Set the "pruned" previous event timestamp for a member. This timestamp is used to serve the oldest (earliest) event that sequencer has for the member:

    • after pruning
    • after the sequencer's onboarding
    Definition Classes
    SequencerStore
  104. def updatePrunedPreviousEventTimestampsInternal(updatedPreviousTimestamps: Map[SequencerMemberId, CantonTimestamp])(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]
    Attributes
    protected
    Definition Classes
    DbSequencerStoreSequencerStore
  105. def validateCommitMode(configuredCommitMode: CommitMode)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, String, Unit]

    Validate that the commit mode of a session is inline with the configured expected commit mode.

    Validate that the commit mode of a session is inline with the configured expected commit mode. Return a human readable message about the mismatch in commit modes if not.

    Definition Classes
    DbSequencerStoreSequencerStore
  106. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  107. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  108. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  109. def withReader[F[_], A](name: String)(f: => F[A])(implicit traceContext: TraceContext, F: Thereafter[F]): UnlessShutdown[F[A]]
    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  110. object DeliverStoreEventRow extends Serializable
  111. object EventTypeDiscriminator

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from DbStore

Inherited from HasCloseContext

Inherited from FlagCloseable

Inherited from PerformUnlessClosing

Inherited from OnShutdownRunner

Inherited from HasRunOnClosing

Inherited from HasUnlessClosing

Inherited from SequencerStore

Inherited from AutoCloseable

Inherited from NamedLogging

Inherited from AnyRef

Inherited from Any

Ungrouped