class TransferCache extends TransferLookup with NamedLogging

Adds an in-memory cache of pending completions on top of a store.TransferStore. Completions appear atomic to transfer lookups that go through the cache, even if they are written to the store only later.

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

Instance Constructors

  1. new TransferCache(transferStore: TransferStore, 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def completeTransfer(transferId: TransferId, timeOfCompletion: TimeOfChange)(implicit traceContext: TraceContext): CheckedT[Future, Nothing, TransferStoreError, Unit]

    Completes the given transfer with the given timeOfCompletion.

    Completes the given transfer with the given timeOfCompletion. Completion appears atomic to transfer lookups that go through the cache.

    returns

    The future completes when this completion or a completion of the same transfer by an earlier request has been written to the underlying store.TransferStore.

  7. implicit val ec: ExecutionContext
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  11. def find(filterSource: Option[SourceDomainId], filterRequestTimestamp: Option[CantonTimestamp], filterSubmitter: Option[LfPartyId], limit: Int)(implicit traceContext: TraceContext): Future[Seq[TransferData]]

    Find utility to look for in-flight transfers.

    Find utility to look for in-flight transfers. Queried by com.digitalasset.canton.console.commands.ParticipantAdministration#transfer.search. Results need not be consistent with lookup.

    Definition Classes
    TransferCacheTransferLookup
  12. def findAfter(requestAfter: Option[(CantonTimestamp, SourceDomainId)], limit: Int)(implicit traceContext: TraceContext): Future[Seq[TransferData]]

    Find utility to look for in-flight transfers.

    Find utility to look for in-flight transfers. Transfers are ordered by the tuple (request timestamp, source domain ID), ie transfers are ordered by request timestamps and ties are broken with lexicographic ordering on domain IDs.

    The ordering here has been chosen to allow a participant to fetch all the pending transfers. The ordering has to be consistent accross calls and uniquely identify a pending transfer, but is otherwise arbitrary.

    requestAfter

    optionally, specify a strict lower bound for the transfers returned, according to the (request timestamp, source domain ID) ordering

    limit

    limit the number of results

    Definition Classes
    TransferCacheTransferLookup
  13. def findIncomplete(sourceDomain: Option[SourceDomainId], validAt: GlobalOffset, stakeholders: Option[NonEmpty[Set[LfPartyId]]], limit: NonNegativeInt)(implicit traceContext: TraceContext): Future[Seq[IncompleteTransferData]]

    Transfer-out/in global offsets will be updated upon publication in the multi-domain event log, when the global offset is assigned to the event.

    Transfer-out/in global offsets will be updated upon publication in the multi-domain event log, when the global offset is assigned to the event. In order to avoid race conditions, the multi-domain event log will wait for the calls to TransferStore.addTransfersOffsets to complete before updating ledger end. Hence, we don't need additional synchronization here and we can directly query the store.

    sourceDomain

    if empty, select only transfers whose source domain matches the given one

    validAt

    select only transfers that are successfully transferred-out

    stakeholders

    if non-empty, select only transfers of contracts whose set of stakeholders intersects stakeholders.

    limit

    limit the number of results

    Definition Classes
    TransferCacheTransferLookup
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  18. val loggerFactory: NamedLoggerFactory
    Definition Classes
    TransferCacheNamedLogging
  19. def lookup(transferId: TransferId)(implicit traceContext: TraceContext): EitherT[Future, TransferLookupError, TransferData]

    Looks up the given in-flight transfer and returns the data associated with the transfer.

    Looks up the given in-flight transfer and returns the data associated with the transfer.

    returns

    scala.Left$(TransferStore.UnknownTransferId) if the transfer is unknown; scala.Left$(TransferStore.TransferCompleted) if the transfer has already been completed.

    Definition Classes
    TransferCacheTransferLookup
  20. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  29. 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 NamedLogging

Inherited from TransferLookup

Inherited from AnyRef

Inherited from Any

Ungrouped