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 bulkContractsTransferCounterSnapshot(contractIds: Set[LfContractId], requestCounter: RequestCounter)(implicit traceContext: TraceContext): Future[Map[LfContractId, TransferCounterO]]
Returns a map to the latest transfer counter of the contract before the given request counter.
Returns a map to the latest transfer counter of the contract before the given request counter. If the contract does not exist in the ACS, it returns a None.
- requestCounter
The request counter *immediately before* which the state of the contracts shall be determined.
- Exceptions thrown
java.lang.IllegalArgumentException
ifrequestCounter
is equal to RequestCounter.MinValue.
- abstract def changesBetween(fromExclusive: TimeOfChange, toInclusive: TimeOfChange)(implicit traceContext: TraceContext): Future[LazyList[(TimeOfChange, ActiveContractIdsChange)]]
Returns all changes to the active contract set between the two timestamps (both inclusive) in the order of their changes.
Returns all changes to the active contract set between the two timestamps (both inclusive) 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], timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[Map[LfContractId, CantonTimestamp]]
Returns a map to the timestamp when the contract became active for the last time before or at the given timestamp.
Returns a map to the timestamp when the contract became active for the last time before or at the given timestamp. Omits contracts that not active right after the given timestamp.
- timestamp
The timestamp 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.TransferredAway.
- abstract def packageUsage(pkg: PackageId, contractStore: ContractStore)(implicit traceContext: TraceContext): Future[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(rc: RequestCounter)(implicit traceContext: TraceContext): Future[SortedMap[LfContractId, (RequestCounter, TransferCounterO)]]
Returns all contracts that were active right after the given request counter, and when the contract became active for the last time before or at the given request counter.
Returns all contracts that were active right after the given request counter, and when the contract became active for the last time before or at the given request counter.
- rc
The request counter at which the snapshot shall be taken. Must be before the request counter 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 counter and it may include contracts that were actually ActiveContractStore.Archived or ActiveContractStore.TransferredAway.
- returns
A map from contracts to the latest request counter (no later than the given
rc
) when they became active again. It contains exactly those contracts that were active right after the given request counter. If a contract is created or transferred-in and archived or transferred-out at the same request counter, it does not show up in any snapshot. The map is sorted by cats.kernel.Order[
com.digitalasset.canton.protocol.LfContractId]
.
- abstract def snapshot(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[SortedMap[LfContractId, (CantonTimestamp, TransferCounterO)]]
Returns all contracts that were active right after the given timestamp, and when the contract became active for the last time before or at the given timestamp.
Returns all contracts that were active right after the given timestamp, and when the contract became active for the last time before or at the given timestamp.
- timestamp
The timestamp 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.TransferredAway.
- returns
A map from contracts to the latest timestamp (no later than the given
timestamp
) when they became active again. It contains exactly those contracts that were active right after the given timestamp. If a contract is created or transferred-in and archived or transferred-out at the same timestamp, 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]) @native() @HotSpotIntrinsicCandidate()
- 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
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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])