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.
- Alphabetic
- By Inheritance
- TransferCache
- NamedLogging
- TransferLookup
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new TransferCache(transferStore: TransferStore, loggerFactory: NamedLoggerFactory)(implicit ec: ExecutionContext)
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() @IntrinsicCandidate()
- 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.
- implicit val ec: ExecutionContext
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- 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
- TransferCache → TransferLookup
- 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
- TransferCache → TransferLookup
- 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
- TransferCache → TransferLookup
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def logger: TracedLogger
- Attributes
- protected
- Definition Classes
- NamedLogging
- val loggerFactory: NamedLoggerFactory
- Definition Classes
- TransferCache → NamedLogging
- 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
- TransferCache → TransferLookup
- implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noTracingLogger: Logger
- Attributes
- protected
- Definition Classes
- NamedLogging
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- 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])