class DbActiveContractStore extends ActiveContractStore with DbStore with DbPrunableByTimeSynchronizer

Active contracts journal

This database table has the following indexes to support scaling query performance:

  • create index idx_par_active_contracts_dirty_request_reset on par_active_contracts (synchronizer_idx, request_counter) used on startup of the ConnectedSynchronizer to delete all inflight validation requests.
  • create index idx_par_active_contracts_contract_id on par_active_contracts (contract_id) used in conflict detection for point-wise lookup of the contract status.
  • create index idx_par_active_contracts_ts_synchronizer_idx on par_active_contracts (ts, synchronizer_idx) used on startup of the ConnectedSynchronizer to delete all inflight validation requests, and used on startup by the ConnectedSynchronizer to replay ACS changes to the ACS commitment processor.
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DbActiveContractStore
  2. DbPrunableByTimeSynchronizer
  3. DbPrunableByTime
  4. DbStore
  5. HasCloseContext
  6. PromiseUnlessShutdownFactory
  7. NamedLogging
  8. FlagCloseable
  9. PerformUnlessClosing
  10. HasSynchronizeWithReaders
  11. OnShutdownRunner
  12. HasRunOnClosing
  13. HasUnlessClosing
  14. AutoCloseable
  15. ActiveContractStore
  16. ConflictDetectionStore
  17. Purgeable
  18. PrunableByTime
  19. ActiveContractSnapshot
  20. AnyRef
  21. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new DbActiveContractStore(storage: DbStorage, indexedSynchronizer: IndexedSynchronizer, enableAdditionalConsistencyChecks: Boolean, batchingParametersConfig: PrunableByTimeParameters, indexedStringStore: IndexedStringStore, timeouts: ProcessingTimeout, loggerFactory: NamedLoggerFactory)(implicit ec: ExecutionContext)

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 activenessOf(contracts: Seq[LfContractId])(implicit traceContext: TraceContext): FutureUnlessShutdown[SortedMap[LfContractId, Seq[(CantonTimestamp, ActivenessChangeDetail)]]]

    Returns the states of contracts at the given timestamp.

    Returns the states of contracts at the given timestamp.

    contracts

    The contracts whose state we return. If empty, we return an empty map. Omits from the response contracts that do not have an activeness state.

    returns

    A map from contracts to the timestamp when the state changed, and the activeness change detail. The map is sorted by cats.kernel.Order[com.digitalasset.canton.protocol.LfContractId].

    Definition Classes
    DbActiveContractStoreActiveContractSnapshot
  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. def advancePruningTimestamp(phase: PruningPhase, timestamp: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]
    Attributes
    protected[canton]
    Definition Classes
    DbPrunableByTimePrunableByTime
  7. def archiveContract(cid: LfContractId, toc: TimeOfChange)(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]

    Shorthand for archiveContracts(Seq(cid), toc)

    Shorthand for archiveContracts(Seq(cid), toc)

    Definition Classes
    ActiveContractStore
  8. def archiveContracts(contractIds: Seq[LfContractId], toc: TimeOfChange)(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]

    Marks the given contracts as archived from toc's timestamp (inclusive) onwards.

    Marks the given contracts as archived from toc's timestamp (inclusive) onwards.

    contractIds

    The contract IDs of the contracts to be archived Note: this method should not take as parameter the reassignment counter for the archived contract IDs, because one cannot know the correct reassignment counter for an archival at request finalization time, which is when this method is called. The com.digitalasset.canton.participant.event.RecordOrderPublisher determines the correct reassignment counter for an archival only when all requests preceding the archival (i.e., with a lower request counter than the archival transaction) were processed. Therefore, we determine the reassignment counter for archivals in the com.digitalasset.canton.participant.event.RecordOrderPublisher, when the record order publisher triggers an acs change event.

    toc

    The time of change consisting of:

    • The request counter of the confirmation request that archives the contracts.
    • The timestamp on the confirmation request that archives the contracts.
    returns

    The future completes when all contract states have been updated. The following irregularities are reported for each contract:

    Definition Classes
    ActiveContractStore
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def assignContract(contractId: LfContractId, toc: TimeOfChange, sourceSynchronizer: Source[SynchronizerId], reassignmentCounter: ReassignmentCounter)(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]
    Definition Classes
    ActiveContractStore
  11. def assignContracts(assignments: Seq[(LfContractId, Source[SynchronizerId], ReassignmentCounter, TimeOfChange)])(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]

    Marks the given contracts as assigned from toc's timestamp (inclusive) onwards.

    Marks the given contracts as assigned from toc's timestamp (inclusive) onwards.

    assignments

    The contract IDs to assign, each with its source synchronizer, reassignment counter and time of change.

    returns

    The future completes when the contract states have been updated. The following irregularities are reported:

    Definition Classes
    DbActiveContractStoreActiveContractStore
  12. def batchingParameters: Option[PrunableByTimeParameters]

    Parameters to control prune batching

    Parameters to control prune batching

    If defined, then the pruning window will be computed such that it targets the ideal target batch size in order to optimize the load on the database.

    This is currently used with the journal stores. Normal pruning of other stores already does batching on its own.

    Attributes
    protected
    Definition Classes
    DbActiveContractStorePrunableByTime
  13. def changesBetween(fromExclusive: TimeOfChange, toInclusive: TimeOfChange)(implicit traceContext: TraceContext): FutureUnlessShutdown[LazyList[(TimeOfChange, ActiveContractIdsChange)]]

    Returns all changes to the active contract set between the two timestamps (exclusive lower bound timestamp, inclusive upper bound timestamp) in the order of their changes.

    Returns all changes to the active contract set between the two timestamps (exclusive lower bound timestamp, inclusive upper bound timestamp) in the order of their changes. The provided lower bound must not be larger than the upper bound.

    fromExclusive

    The lower bound for the changes. Must not be larger than the upper bound.

    toInclusive

    The upper bound for the changes. Must not be smaller than the lower bound.

    Definition Classes
    DbActiveContractStoreActiveContractSnapshot
    Exceptions thrown

    java.lang.IllegalArgumentException If the intervals are in the wrong order.

  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  15. 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
  16. implicit val closeContext: CloseContext
    Definition Classes
    HasCloseContext
  17. def closingTimeout: FiniteDuration
    Attributes
    protected
    Definition Classes
    FlagCloseablePerformUnlessClosing
  18. def contractCount(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Int]

    Returns the total number of contracts whose states are stored at the given timestamp.

    Returns the total number of contracts whose states are stored at the given timestamp.

    To get a consistent snapshot, the caller must ensure that the timestamp specifies a time that is not in the future, i.e., not after the timestamp of the clean cursor in the com.digitalasset.canton.participant.protocol.RequestJournal Note that the result may change between two invocations if prune is called in the meantime.

    Definition Classes
    DbActiveContractStoreActiveContractStore
  19. def contractSnapshot(contractIds: Set[LfContractId], timeOfChange: TimeOfChange)(implicit traceContext: TraceContext): FutureUnlessShutdown[Map[LfContractId, TimeOfChange]]

    Returns a map to the time of change when the contract became active for the last time before or at the given time of change.

    Returns a map to the time of change when the contract became active for the last time before or at the given time of change. Omits contracts that not active right after the given time of change.

    timeOfChange

    The time of change at which the activeness of the contracts shall be determined. Must be before the timestamp that corresponds to the head cursor in the com.digitalasset.canton.participant.protocol.RequestJournal for the state com.digitalasset.canton.participant.protocol.RequestJournal.RequestState.Clean. If this precondition is violated, the returned snapshot may be inconsistent, i.e., it may omit some contracts that were ActiveContractStore.Active at the given time and it may include contracts that were actually ActiveContractStore.Archived or ActiveContractStore.ReassignedAway.

    Definition Classes
    DbActiveContractStoreActiveContractSnapshot
  20. def contractsReassignmentCounterSnapshotBefore(contractIds: Set[LfContractId], timestampExclusive: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[Map[LfContractId, ReassignmentCounter]]

    Returns a map to the latest reassignment counter of the contracts before the given timestamp.

    Returns a map to the latest reassignment counter of the contracts before the given timestamp. Fails if not all given contract ids are active in the ACS, or if the ACS has not defined their latest reassignment counter.

    Definition Classes
    DbActiveContractStoreActiveContractSnapshot
    Exceptions thrown

    java.lang.IllegalArgumentException if not all given contract ids are active in the ACS, if the ACS does not contain the latest reassignment counter for each given contract id.

  21. def deleteSince(criterion: TimeOfChange)(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]

    Deletes all activeness changes from requests whose time of change is at least the given one.

    Deletes all activeness changes from requests whose time of change is at least the given one. This method must not be called concurrently with creating, archiving, or reassigning contracts.

    Therefore, this method need not be linearizable w.r.t. creating, archiving, or reassigning contracts. For example, if a request at toc1 creates a contract c and another request at toc2 archives it while deleteSince is running for some toc <= toc1, toc2, then there are no guarantees which of the effects of the requests remain. For example, c could end up being nonexistent, active, or archived but never created, even if the writes for the requests are successful.

    Definition Classes
    DbActiveContractStoreActiveContractStore
  22. def doPrune(beforeAndIncluding: CantonTimestamp, lastPruning: Option[CantonTimestamp])(implicit traceContext: TraceContext): FutureUnlessShutdown[Int]

    Deletes all entries about archived contracts whose status hasn't changed after the timestamp.

    Deletes all entries about archived contracts whose status hasn't changed after the timestamp.

    The caller must ensure that the given timestamp is at most the one of the clean cursor in the com.digitalasset.canton.participant.protocol.RequestJournal

    returns

    the approximate number of pruned rows, used to adjust the pruning windows to reach optimal batch sizes

    Definition Classes
    DbActiveContractStoreActiveContractStorePrunableByTime
  23. implicit val ec: ExecutionContext
  24. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  26. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  27. def fetchStates(contractIds: Iterable[LfContractId])(implicit traceContext: TraceContext): FutureUnlessShutdown[Map[LfContractId, ContractState]]

    Returns the latest com.digitalasset.canton.participant.store.ActiveContractStore.Status for the given contract IDs along with its com.digitalasset.canton.participant.util.TimeOfChange.

    Returns the latest com.digitalasset.canton.participant.store.ActiveContractStore.Status for the given contract IDs along with its com.digitalasset.canton.participant.util.TimeOfChange.

    This method is used by the protocol processors for conflict detection. In-flight transactions may have changesets not yet written to the ACS datastore. Since only the ConflictDetector tracks in-flight changesets, this method cannot be used as a source of valid data to other components.

    If a contract is created or assigned and archived or unassigned at the same com.digitalasset.canton.participant.util.TimeOfChange, the contract is ActiveContractStore.Archived or ActiveContractStore.ReassignedAway. A contract cannot be archived and unassigned at the same timestamp.

    returns

    The map from contracts in contractIds in the store to their latest state. Nonexistent contracts are excluded from the map.

    Definition Classes
    DbActiveContractStoreActiveContractStoreConflictDetectionStore
    See also

    ActiveContractSnapshot!.snapshot

  28. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  29. def getSynchronizerIndices(synchronizers: Seq[SynchronizerId]): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Map[SynchronizerId, IndexedSynchronizer]]
    Attributes
    protected
    Definition Classes
    ActiveContractStore
  30. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  31. val indexedStringStore: IndexedStringStore
  32. val indexedSynchronizer: IndexedSynchronizer
    Attributes
    protected[this]
    Definition Classes
    DbActiveContractStoreDbPrunableByTimeSynchronizer
  33. 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
  34. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  35. 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
  36. def kind: String
    Attributes
    protected
    Definition Classes
    ActiveContractStorePrunableByTime
  37. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  38. val loggerFactory: NamedLoggerFactory
    Attributes
    protected
    Definition Classes
    DbActiveContractStoreNamedLogging
  39. def markContractAdded(contract: (LfContractId, ReassignmentCounter, TimeOfChange))(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]

    Shorthand for markContractAdded(Seq(contract), toc)

    Shorthand for markContractAdded(Seq(contract), toc)

    Definition Classes
    ActiveContractStore
  40. def markContractCreated(contract: (LfContractId, ReassignmentCounter), toc: TimeOfChange)(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]

    Shorthand for markContractsCreated(Seq(contract), toc)

    Shorthand for markContractsCreated(Seq(contract), toc)

    Definition Classes
    ActiveContractStore
  41. def markContractsAdded(contracts: Seq[(LfContractId, ReassignmentCounter, TimeOfChange)])(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]

    Marks the given contracts as active from timestamp (inclusive) onwards.

    Marks the given contracts as active from timestamp (inclusive) onwards.

    Unlike creation, add can be done several times in the life of a contract. It is intended to be used for ACS import and purges (e.g. repair service and party replication).

    Definition Classes
    ActiveContractStore
  42. def markContractsCreated(contracts: Seq[(LfContractId, ReassignmentCounter)], toc: TimeOfChange)(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]

    Marks the given contracts as active from timestamp (inclusive) onwards.

    Marks the given contracts as active from timestamp (inclusive) onwards.

    contracts

    The contracts represented as a tuple of contract id and reassignment counter

    toc

    The time of change consisting of:

    • The request counter of the confirmation request that created the contracts
    • The timestamp of the confirmation request that created the contracts.
    returns

    The future completes when all contract states have been updated. The following irregularities are reported for each contract:

    Definition Classes
    ActiveContractStore
  43. def markContractsCreatedOrAdded(contracts: Seq[(LfContractId, ReassignmentCounter, TimeOfChange)], isCreation: Boolean)(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]
  44. 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
  45. 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
  46. def nameInternal: String
    Attributes
    protected[this]
    Definition Classes
    PerformUnlessClosingHasSynchronizeWithReaders
  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
    @IntrinsicCandidate() @native()
  51. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  52. def onCloseFailure(e: Throwable): Unit
    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  53. def onClosed(): Unit
    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  54. 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()
  55. def packageUsage(pkg: PackageId, contractStore: ContractStore)(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[LfContractId]]

    Returns Some(contractId) if an active contract belonging to package pkg exists, otherwise returns None.

    Returns Some(contractId) if an active contract belonging to package pkg exists, otherwise returns None. The returned contractId may be any active contract from package pkg. The most recent contract state is used.

    Definition Classes
    DbActiveContractStoreActiveContractSnapshot
  56. def partitionColumn: String
    Attributes
    protected[this]
    Definition Classes
    DbPrunableByTime
  57. def partitionKey: IndexedSynchronizer
    Attributes
    protected[this]
    Definition Classes
    DbPrunableByTimeSynchronizerDbPrunableByTime
  58. 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
  59. 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
  60. 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
  61. 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
  62. def performUnlessClosingEitherU[E, R](name: String)(etf: => EitherT[Future, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]
    Definition Classes
    PerformUnlessClosing
  63. def performUnlessClosingEitherUSF[E, R](name: String)(etf: => EitherT[FutureUnlessShutdown, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]
    Definition Classes
    PerformUnlessClosing
  64. 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
  65. 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
  66. def performUnlessClosingOptionUSF[R](name: String)(otf: => OptionT[FutureUnlessShutdown, R])(implicit ec: ExecutionContext, traceContext: TraceContext): OptionT[FutureUnlessShutdown, R]
    Definition Classes
    PerformUnlessClosing
  67. def performUnlessClosingUSF[A](name: String)(f: => FutureUnlessShutdown[A])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]
    Definition Classes
    PerformUnlessClosing
  68. 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
  69. final def prune(limit: CantonTimestamp)(implicit errorLoggingContext: ErrorLoggingContext, closeContext: CloseContext): FutureUnlessShutdown[Unit]

    Prune all unnecessary data relating to events before the given timestamp.

    Prune all unnecessary data relating to events before the given timestamp.

    The meaning of "unnecessary", and whether the limit is inclusive or exclusive both depend on the particular store. The store must implement the actual pruning logic in the doPrune method.

    Definition Classes
    PrunableByTime
  70. def pruningStatus(implicit traceContext: TraceContext): FutureUnlessShutdown[Option[PruningStatus]]

    Returns the latest timestamp at which pruning was started or completed.

    Returns the latest timestamp at which pruning was started or completed. For com.digitalasset.canton.pruning.PruningPhase.Started, it is guaranteed that no pruning has been run on the store after the returned timestamp. For com.digitalasset.canton.pruning.PruningPhase.Completed, it is guaranteed that the store is pruned at least up to the returned timestamp (inclusive). That is, another pruning with the returned timestamp (or earlier) has no effect on the store. Returns scala.None$ if no pruning has ever been started on the store.

    Definition Classes
    DbPrunableByTimePrunableByTime
  71. val pruning_status_table: String

    The table name to store the pruning timestamp in.

    The table name to store the pruning timestamp in. The table must define the following fields:

    Attributes
    protected[this]
    Definition Classes
    DbActiveContractStoreDbPrunableByTime
  72. def purge()(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]

    Purges all data from the store.

    Purges all data from the store. This MUST ONLY be invoked when none of the data is needed anymore for example on synchronizer migration once all the data has been reassigned to the new synchronizer.

    Definition Classes
    DbActiveContractStorePurgeable
  73. def purgeContract(cid: LfContractId, toc: TimeOfChange)(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]

    Shorthand for purgeContracts(Seq(cid), toc)

    Shorthand for purgeContracts(Seq(cid), toc)

    Definition Classes
    ActiveContractStore
  74. def purgeContracts(contractIds: Seq[(LfContractId, TimeOfChange)])(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]

    Marks the given contracts as inactive from timestamp (inclusive) onwards.

    Marks the given contracts as inactive from timestamp (inclusive) onwards.

    Unlike archival, purge can be done several times in the life of a contract. It is intended to be used by the repair service.

    Definition Classes
    ActiveContractStore
  75. def purgeOrArchiveContracts(contracts: Seq[(LfContractId, TimeOfChange)], isArchival: Boolean)(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]

    Depending on the isArchival, will archive (effect of a Daml transaction) or purge (repair service)

    Depending on the isArchival, will archive (effect of a Daml transaction) or purge (repair service)

    Definition Classes
    DbActiveContractStoreActiveContractStore
  76. def remainingReaders(): Seq[String]
    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  77. 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
  78. 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
  79. 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
  80. final def runOnOrAfterClose_(task: RunOnClosing)(implicit traceContext: TraceContext): Unit

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

  81. def runTaskUnlessDone(task: RunOnClosing)(implicit traceContext: TraceContext): Unit
    Attributes
    protected[this]
    Definition Classes
    OnShutdownRunnerHasRunOnClosing
  82. implicit def setParameterIndexedSynchronizer: SetParameter[IndexedSynchronizer]
    Attributes
    protected[this]
    Definition Classes
    DbPrunableByTime
  83. def snapshot(timeOfChange: TimeOfChange)(implicit traceContext: TraceContext): FutureUnlessShutdown[SortedMap[LfContractId, (TimeOfChange, ReassignmentCounter)]]

    Returns all contracts that were active right after the given time of change, and when the contract became active for the last time before or at the given time of change.

    Returns all contracts that were active right after the given time of change, and when the contract became active for the last time before or at the given time of change.

    timeOfChange

    The time of change at which the snapshot shall be taken. Must be before the timestamp that corresponds to the head cursor in the com.digitalasset.canton.participant.protocol.RequestJournal for the state com.digitalasset.canton.participant.protocol.RequestJournal.RequestState.Clean. If this precondition is violated, the returned snapshot may be inconsistent, i.e., it may omit some contracts that were ActiveContractStore.Active at the given time and it may include contracts that were actually ActiveContractStore.Archived or ActiveContractStore.ReassignedAway.

    returns

    A map from contracts to the latest timestamp (no later than the given timeOfChange) when they became active again. It contains exactly those contracts that were active right after the given time of change. If a contract is created or assigned and archived or unassigned at the same time of change, it does not show up in any snapshot. The map is sorted by cats.kernel.Order[com.digitalasset.canton.protocol.LfContractId].

    Definition Classes
    DbActiveContractStoreActiveContractSnapshot
  84. val storage: DbStorage
    Attributes
    protected
    Definition Classes
    DbActiveContractStoreDbStore
  85. def synchronizeWithClosingPatience: FiniteDuration
    Attributes
    protected[this]
    Definition Classes
    PerformUnlessClosingHasSynchronizeWithReaders
  86. def synchronizeWithReaders()(implicit traceContext: TraceContext): Boolean
    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  87. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  88. def synchronizerIdFromIdx(idx: Int)(implicit ec: ExecutionContext, loggingContext: ErrorLoggingContext): FutureUnlessShutdown[SynchronizerId]
    Attributes
    protected
    Definition Classes
    ActiveContractStore
  89. val timeouts: ProcessingTimeout
    Attributes
    protected
    Definition Classes
    DbActiveContractStoreFlagCloseable
  90. def toString(): String
    Definition Classes
    AnyRef → Any
  91. def unassignContracts(unassignments: Seq[(LfContractId, Target[SynchronizerId], ReassignmentCounter, TimeOfChange)])(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]

    Marks the given contracts as ActiveContractStore.ReassignedAway from toc's timestamp (inclusive) onwards.

    Marks the given contracts as ActiveContractStore.ReassignedAway from toc's timestamp (inclusive) onwards.

    unassignments

    The contract IDs to unassign, each with its target synchronizer, reassignment counter and time of change.

    returns

    The future completes when the contract state has been updated. The following irregularities are reported:

    Definition Classes
    DbActiveContractStoreActiveContractStore
  92. def unassignContracts(contractId: LfContractId, toc: TimeOfChange, targetSynchronizer: Target[SynchronizerId], reassignmentCounter: ReassignmentCounter)(implicit traceContext: TraceContext): CheckedT[FutureUnlessShutdown, AcsError, AcsWarning, Unit]
    Definition Classes
    ActiveContractStore
  93. 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()
  94. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  95. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  96. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  97. def withReader[F[_], A](name: String)(f: => F[A])(implicit traceContext: TraceContext, F: Thereafter[F]): UnlessShutdown[F[A]]
    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders

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 DbPrunableByTime

Inherited from DbStore

Inherited from HasCloseContext

Inherited from NamedLogging

Inherited from FlagCloseable

Inherited from PerformUnlessClosing

Inherited from OnShutdownRunner

Inherited from HasRunOnClosing

Inherited from HasUnlessClosing

Inherited from AutoCloseable

Inherited from ActiveContractStore

Inherited from Purgeable

Inherited from PrunableByTime

Inherited from ActiveContractSnapshot

Inherited from AnyRef

Inherited from Any

Ungrouped