Packages

class StoredContractManager extends NamedLogging with ContractLookup

Manages a contract store by keeping pending contracts in memory. ContractLookup.lookup finds these pending contracts in addition to those in the backing ContractStore. A contract ceases to be pending as soon as first request writes it to the backing store using StoredContractManager.commitIfPending.

Unlike ExtendedContractLookup, the pending contracts can be updated and committed to the backing store, concurrently with other contract lookups and additions.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StoredContractManager
  2. ContractLookup
  3. NamedLogging
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new StoredContractManager(store: ContractStore, 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 addPendingContracts(requestCounter: RequestCounter, contracts: Seq[WithTransactionId[SerializableContract]])(implicit traceContext: TraceContext): Future[Set[StoredContract]]

    Adds the given contracts as pending, unless they are already in the store with a request counter.

    Adds the given contracts as pending, unless they are already in the store with a request counter. If they are already pending, the request will be added only if the com.digitalasset.canton.protocol.SerializableContracts are the same.

    Checking the contracts in the store is not atomic with adding them as pending.

    returns

    The contracts whose com.digitalasset.canton.protocol.SerializableContract or creating com.digitalasset.canton.protocol.TransactionId differs from what is stored in the backing ContractStore with a request counter or among the pending contracts. In particular, this implies that those contracts are already pending or in the backing ContractStore with a request counter.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def commitIfPending(requestCounter: RequestCounter, contracts: Map[LfContractId, Boolean])(implicit traceContext: TraceContext): Future[Unit]

    Writes the contracts mapped to true to the contract store provided that they are still pending and removes them from pending.

    Writes the contracts mapped to true to the contract store provided that they are still pending and removes them from pending. Marks contracts mapped to false as not pending any more, unless another request still has marked them as pending. Does not check that the request has actually marked the contract as pending with addPendingContracts.

  8. def deleteIfPending(requestCounter: RequestCounter, contracts: Set[LfContractId])(implicit traceContext: TraceContext): Future[Unit]

    Removes given contracts from pending except if another contract has still marked them as pending.

  9. implicit val ec: ExecutionContext
    Attributes
    protected
    Definition Classes
    StoredContractManagerContractLookup
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def logger: TracedLogger
    Attributes
    protected[participant.store]
    Definition Classes
    StoredContractManagerContractLookupNamedLogging
  16. val loggerFactory: NamedLoggerFactory
    Definition Classes
    StoredContractManagerNamedLogging
  17. implicit def loggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  18. def lookup(id: LfContractId)(implicit traceContext: TraceContext): OptionT[Future, StoredContract]

    Finds the contracts in the backing store and among the pending contracts.

    Finds the contracts in the backing store and among the pending contracts.

    Definition Classes
    StoredContractManagerContractLookup
  19. def lookupContract(id: LfContractId)(implicit traceContext: TraceContext): OptionT[Future, SerializableContract]
    Definition Classes
    ContractLookup
  20. def lookupContractE(id: LfContractId)(implicit traceContext: TraceContext): EitherT[Future, UnknownContract, SerializableContract]
    Definition Classes
    ContractLookup
  21. def lookupE(id: LfContractId)(implicit traceContext: TraceContext): EitherT[Future, UnknownContract, StoredContract]
    Definition Classes
    ContractLookup
  22. def lookupLfInstance(lfId: LfContractId)(implicit traceContext: TraceContext): OptionT[Future, LfContractInst]

    Yields None (embedded in a Future) if the contract instance has not been stored or the id cannot be parsed.

    Yields None (embedded in a Future) if the contract instance has not been stored or the id cannot be parsed.

    Discards the serialization.

    Definition Classes
    ContractLookup
  23. def lookupStakeholders(ids: Set[LfContractId])(implicit traceContext: TraceContext): EitherT[Future, UnknownContracts, Map[LfContractId, Set[LfPartyId]]]
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. def storeDivulgedContracts(requestCounter: RequestCounter, divulgences: Seq[SerializableContract])(implicit traceContext: TraceContext): EitherT[Future, NonEmptyChain[DuplicateContract], Unit]

    Stores the given contracts as divulged in the contract store, checking them for consistency against pending contracts.

  29. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  33. 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

Inherited from ContractLookup

Inherited from NamedLogging

Inherited from AnyRef

Inherited from Any

Ungrouped