com.digitalasset.canton.participant.store
ActiveContractSnapshot
Companion object ActiveContractSnapshot
trait ActiveContractSnapshot extends AnyRef
Provides snapshotting for active contracts.
- Alphabetic
- By Inheritance
- ActiveContractSnapshot
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract 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]
.
- abstract 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.
- Exceptions thrown
java.lang.IllegalArgumentException
If the intervals are in the wrong order.
- abstract 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.
- abstract 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.
- 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.
- abstract 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 packagepkg
. The most recent contract state is used. - abstract 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]
.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])