class DbMultiDomainEventLog extends MultiDomainEventLog with FlagCloseableAsync with HasCloseContext with NamedLogging with HasFlushFuture

Must be created by factory methods on DbSingleDimensionEventLog for optionality on how to perform the required async initialization of current head.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DbMultiDomainEventLog
  2. HasFlushFuture
  3. NamedLogging
  4. HasCloseContext
  5. PromiseUnlessShutdownFactory
  6. FlagCloseableAsync
  7. FlagCloseable
  8. PerformUnlessClosing
  9. OnShutdownRunner
  10. MultiDomainEventLog
  11. AutoCloseable
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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 addToFlushAndLogError(name: String)(future: Future[_])(implicit loggingContext: ErrorLoggingContext): Unit

    Adds the task future to the flush future so that doFlush completes only after future has completed.

    Adds the task future to the flush future so that doFlush completes only after future has completed. Logs an error if the future fails with an exception.

    Attributes
    protected
    Definition Classes
    HasFlushFuture
  5. def addToFlushWithoutLogging(name: String)(future: Future[_]): Unit

    Adds the task future to the flush future so that doFlush completes only after future has completed.

    Adds the task future to the flush future so that doFlush completes only after future has completed. The caller is responsible for logging any exceptions thrown inside the future.

    Attributes
    protected
    Definition Classes
    HasFlushFuture
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def cancelShutdownTask(token: Long): Unit

    Removes a shutdown task from the list using a token returned by runOnShutdown

    Removes a shutdown task from the list using a token returned by runOnShutdown

    Definition Classes
    OnShutdownRunner
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  9. 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
  10. def closeAsync(): Seq[AsyncOrSyncCloseable]

    closeAsync asynchronously releases resources held by a future

    closeAsync asynchronously releases resources held by a future

    returns

    an ordered sequence of async and sync closeables with async closeables made up of future and timeout

    Attributes
    protected
    Definition Classes
    DbMultiDomainEventLogFlagCloseableAsync
  11. implicit val closeContext: CloseContext
    Definition Classes
    HasCloseContext
  12. def closingTimeout: FiniteDuration
    Attributes
    protected
    Definition Classes
    FlagCloseablePerformUnlessClosing
  13. def containsShutdownTask(token: Long): Boolean
    Definition Classes
    OnShutdownRunner
  14. def doFlush(): Future[Unit]

    Returns a future that completes after all added futures have completed.

    Returns a future that completes after all added futures have completed. The returned future never fails.

    Attributes
    protected
    Definition Classes
    HasFlushFuture
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  18. implicit val executionContext: ExecutionContext
    Attributes
    protected
    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  19. def fetchUnpublished(id: EventLogId, upToInclusiveO: Option[LocalOffset])(implicit traceContext: TraceContext): Future[List[PendingPublish]]

    Finds unpublished events in the single dimension event log.

    Finds unpublished events in the single dimension event log. More precisely, finds all events from id with:

    • local offset strictly greater than the local offset of the last published event from id
    • local offset smaller than or equal to upToInclusiveO (if defined).
    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  20. def flush(): Future[Unit]

    Returns a future that completes after all publications have happened whose publish future has completed before the call to flush.

    Returns a future that completes after all publications have happened whose publish future has completed before the call to flush.

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  21. def flushCloseable(name: String, timeout: NonNegativeDuration): SyncCloseable
    Attributes
    protected
    Definition Classes
    HasFlushFuture
  22. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  23. def getOffsetByTimeAtOrAfter(fromInclusive: CantonTimestamp)(implicit traceContext: TraceContext): OptionT[Future, (GlobalOffset, EventLogId, LocalOffset)]

    Yields the smallest global offset whose publication time is at or after fromInclusive, if any.

    Yields the smallest global offset whose publication time is at or after fromInclusive, if any. The publication time is measured on the participant's local clock.

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  24. def getOffsetByTimeUpTo(upToInclusive: CantonTimestamp)(implicit traceContext: TraceContext): OptionT[Future, GlobalOffset]

    Yields the largest global offset whose publication time is before or at upToInclusive, if any.

    Yields the largest global offset whose publication time is before or at upToInclusive, if any. The publication time is measured on the participant's local clock.

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  25. def globalOffsetFor(eventLogId: EventLogId, localOffset: LocalOffset)(implicit traceContext: TraceContext): Future[Option[(GlobalOffset, CantonTimestamp)]]

    Returns the com.digitalasset.canton.participant.GlobalOffset under which the given local offset of the given event log was published, if any, along with its publication time

    Returns the com.digitalasset.canton.participant.GlobalOffset under which the given local offset of the given event log was published, if any, along with its publication time

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  27. val indexedStringStore: IndexedStringStore
  28. def internalPerformUnlessClosingF[A](name: String)(f: => Future[A])(implicit ec: ExecutionContext, traceContext: TraceContext): UnlessShutdown[Future[A]]
    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  29. 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
    OnShutdownRunner
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. def keepTrackOfOpenFutures: Boolean

    track running futures on shutdown

    track running futures on shutdown

    set to true to get detailed information about all futures that did not complete during shutdown. if set to false, we don't do anything.

    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  32. def lastDomainOffsetsBeforeOrAtGlobalOffset(upToInclusive: GlobalOffset, domainIds: List[DomainId], participantEventLogId: ParticipantEventLogId)(implicit traceContext: TraceContext): Future[(Map[DomainId, Option[LocalOffset]], Option[LocalOffset])]

    Yields the greatest local offsets for the underlying SingleDimensionEventLog with global offset less than or equal to upToInclusive.

    Yields the greatest local offsets for the underlying SingleDimensionEventLog with global offset less than or equal to upToInclusive.

    returns

    (domainLastOffsets, participantLastOffset), where domainLastOffsets maps the domains in domainIds to the greatest local offset and the greatest request offset of the corresponding domain event log and participantLastOffset is the greatest participant offset.

    Definition Classes
    MultiDomainEventLog
  33. def lastGlobalOffset(upToInclusive: Option[GlobalOffset] = None)(implicit traceContext: TraceContext): OptionT[Future, GlobalOffset]

    Yields the highest global offset up to the given bound, if any.

    Yields the highest global offset up to the given bound, if any.

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  34. def lastLocalOffset(eventLogId: EventLogId, upToInclusive: Option[GlobalOffset] = None)(implicit traceContext: TraceContext): Future[Option[LocalOffset]]

    Returns the greatest local offset of the SingleDimensionEventLog given by eventLogId, if any, such that the following holds:

    Returns the greatest local offset of the SingleDimensionEventLog given by eventLogId, if any, such that the following holds:

    • The assigned global offset is below or at upToInclusive.
    • The record time of the event is below or at timestampInclusive (if defined)
    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  35. def lastLocalOffsetBeforeOrAt(eventLogId: EventLogId, upToInclusive: GlobalOffset, timestampInclusive: CantonTimestamp)(implicit traceContext: TraceContext): Future[Option[LocalOffset]]

    Returns the greatest local offset of the SingleDimensionEventLog given by eventLogId, if any, such that the following holds:

    Returns the greatest local offset of the SingleDimensionEventLog given by eventLogId, if any, such that the following holds:

    • The assigned global offset is below or at upToInclusive.
    • The record time of the event is below or at timestampInclusive (if defined)
    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  36. def locateOffset(deltaFromBeginning: Long)(implicit traceContext: TraceContext): OptionT[Future, GlobalOffset]

    Yields the deltaFromBeginning-lowest global offset (if it exists).

    Yields the deltaFromBeginning-lowest global offset (if it exists). I.e., locateOffset(0) yields the smallest offset, localOffset(1) the second smallest offset, and so on.

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  37. def locatePruningTimestamp(skip: NonNegativeInt)(implicit traceContext: TraceContext): OptionT[Future, CantonTimestamp]

    Yields the skip-lowest publication timestamp (if it exists).

    Yields the skip-lowest publication timestamp (if it exists). I.e., locatePruningTimestamp(0) yields the smallest timestamp, locatePruningTimestamp(1) the second smallest timestamp, and so on.

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  38. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  39. val loggerFactory: NamedLoggerFactory
    Attributes
    protected
    Definition Classes
    DbMultiDomainEventLogNamedLogging
  40. def lookupByEventIds(eventIds: Seq[EventId])(implicit traceContext: TraceContext): Future[Map[EventId, (GlobalOffset, TimestampedEvent, CantonTimestamp)]]

    Yields the global offset, event and publication time for all the published events with the given IDs.

    Yields the global offset, event and publication time for all the published events with the given IDs. Unpublished events are ignored.

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  41. def lookupEventRange(upToInclusive: Option[GlobalOffset], limit: Option[Int])(implicit traceContext: TraceContext): Future[Seq[(GlobalOffset, TimestampedEvent)]]

    Yields all events with offset up to upToInclusive.

    Yields all events with offset up to upToInclusive.

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  42. def lookupOffset(globalOffset: GlobalOffset)(implicit traceContext: TraceContext): OptionT[Future, (EventLogId, LocalOffset, CantonTimestamp)]

    Returns the data associated with the given offset, if any

    Returns the data associated with the given offset, if any

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  43. def lookupTransactionDomain(transactionId: LedgerTransactionId)(implicit traceContext: TraceContext): OptionT[Future, DomainId]

    Find the domain of a committed transaction.

    Find the domain of a committed transaction.

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  44. implicit val mat: Materializer
  45. 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
  46. def mkPromise[A](description: String, futureSupervisor: FutureSupervisor, logAfter: Duration = 10.seconds, logLevel: Level = Level.DEBUG)(implicit elc: ErrorLoggingContext, ec: ExecutionContext): 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
  47. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  48. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  49. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  50. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  51. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  52. def notifyOnPublish(published: Seq[Publication])(implicit traceContext: TraceContext): Unit
    Attributes
    protected
    Definition Classes
    MultiDomainEventLog
  53. def notifyOnPublishTransfer(events: Seq[(TransferEvent, GlobalOffset)])(implicit traceContext: TraceContext): Future[Unit]
    Definition Classes
    MultiDomainEventLog
  54. def onCloseFailure(e: Throwable): Unit
    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  55. final def onClosed(): Unit
  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.

    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 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.

    etf

    The task to perform

    Definition Classes
    PerformUnlessClosing
  60. def performUnlessClosingEitherTF[E, R](name: String, onClosing: => E)(etf: => EitherT[Future, E, Future[R]])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[Future, E, Future[R]]
    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 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.

    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
  64. def performUnlessClosingUSF[A](name: String)(f: => FutureUnlessShutdown[A])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]
    Definition Classes
    PerformUnlessClosing
  65. def prune(upToInclusive: GlobalOffset)(implicit traceContext: TraceContext): Future[Unit]

    Removes all events with offset up to upToInclusive.

    Removes all events with offset up to upToInclusive.

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  66. def publicationTimeLowerBound: CantonTimestamp

    Returns a lower bound on the latest publication time of a published event.

    Returns a lower bound on the latest publication time of a published event. All events published later will receive the same or higher publication time. Increases monotonically, even across restarts.

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  67. def publish(data: PublicationData): Future[Unit]

    Appends a new event to the event log.

    Appends a new event to the event log.

    The new event must already have been published in the SingleDimensionEventLog with id MultiDomainEventLog.PublicationData.eventLogId at offset MultiDomainEventLog.PublicationData.localOffset.

    The method is idempotent, i.e., it does nothing, if it is called twice with the same com.digitalasset.canton.participant.store.EventLogId and com.digitalasset.canton.participant.LocalOffset.

    The returned future completes already when the event has been successfully inserted into the internal (in-memory) inbox. Events will be persisted asynchronously. Actual publication has happened before a subsequent flush call's future completes.

    The caller must await completion of the returned future before calling the method again. Otherwise, the method may fail with an exception or return a failed future. (This restriction arises, because some implementations will offer the event to an Pekko source queue, and the number of concurrent offers for such queues is bounded.)

    The event log will stall, i.e., log an error and refuse to publish further events in the following cases:

    • If an event cannot be persisted, even after retrying.
    • If events are published out of order, i.e., publish(id, o2).flatMap(_ => publish(id, o1)) with o1 < o2. Exception: The event log will not stall in case of republication of previously published events, i.e., publish(id, o1).flatMap(_ => publish(id, o2).flatMap(_ => publish(id, o1))) will not stall the event log.
    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  68. def reportMaxEventAgeMetric(oldestEventTimestamp: Option[CantonTimestamp]): Unit

    Report the max-event-age metric based on the oldest event timestamp and the current clock time or zero if no oldest timestamp exists (e.g.

    Report the max-event-age metric based on the oldest event timestamp and the current clock time or zero if no oldest timestamp exists (e.g. events fully pruned).

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
  69. def runOnShutdown[T](task: RunOnShutdown)(implicit traceContext: TraceContext): Long

    Same as runOnShutdown_ but returns a token that allows you to remove the task explicitly from being run using cancelShutdownTask

    Same as runOnShutdown_ but returns a token that allows you to remove the task explicitly from being run using cancelShutdownTask

    Definition Classes
    OnShutdownRunner
  70. def runOnShutdown_[T](task: RunOnShutdown)(implicit traceContext: TraceContext): Unit

    Register a task to run when shutdown is initiated.

    Register a task to run when shutdown is initiated.

    You can use this for example to register tasks that cancel long-running computations, whose termination you can then wait for in "closeAsync".

    Definition Classes
    OnShutdownRunner
  71. def runStateChanged(waitingState: Boolean = false): Unit
    Attributes
    protected
    Definition Classes
    OnShutdownRunner
    Annotations
    @VisibleForTesting()
  72. def setOnPublish(newOnPublish: OnPublish): Unit

    Sets the listener to be called whenever events are published to the multi-domain event log.

    Sets the listener to be called whenever events are published to the multi-domain event log.

    Definition Classes
    MultiDomainEventLog
  73. def snapshotIncomplete: Seq[String]

    Returns the list of currently incomplete tasks.

    Returns the list of currently incomplete tasks. Use only for inspection and debugging.

    Definition Classes
    HasFlushFuture
  74. def subscribe(startInclusive: Option[GlobalOffset])(implicit traceContext: TraceContext): Source[(GlobalOffset, Traced[LedgerSyncEvent]), NotUsed]

    Yields an pekko source with all stored events, optionally starting from a given offset.

    Yields an pekko source with all stored events, optionally starting from a given offset.

    Definition Classes
    DbMultiDomainEventLogMultiDomainEventLog
    Exceptions thrown

    java.lang.IllegalArgumentException if startInclusive is lower than MultiDomainEventLog.ledgerFirstOffset.

  75. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  76. val timeouts: ProcessingTimeout
    Attributes
    protected
    Definition Classes
    DbMultiDomainEventLogFlagCloseable
  77. def toString(): String
    Definition Classes
    AnyRef → Any
  78. val transferStoreFor: (TargetDomainId) => Either[String, TransferStore]
  79. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  80. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  81. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

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

Inherited from HasFlushFuture

Inherited from NamedLogging

Inherited from HasCloseContext

Inherited from FlagCloseableAsync

Inherited from FlagCloseable

Inherited from PerformUnlessClosing

Inherited from OnShutdownRunner

Inherited from MultiDomainEventLog

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped