Packages

c

com.digitalasset.canton.crypto

DomainSyncCryptoClient

class DomainSyncCryptoClient extends SyncCryptoClient[DomainSnapshotSyncCryptoApi] with HasFutureSupervision with NamedLogging with FlagCloseable

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DomainSyncCryptoClient
  2. FlagCloseable
  3. PerformUnlessClosing
  4. OnShutdownRunner
  5. AutoCloseable
  6. NamedLogging
  7. HasFutureSupervision
  8. SyncCryptoClient
  9. TopologyClientApi
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new DomainSyncCryptoClient(owner: KeyOwner, domainId: DomainId, ips: DomainTopologyClient, crypto: Crypto, cacheConfigs: CachingConfigs, staticDomainParameters: StaticDomainParameters, timeouts: ProcessingTimeout, futureSupervisor: FutureSupervisor, loggerFactory: NamedLoggerFactory)(implicit executionContext: 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 approximateTimestamp: CantonTimestamp

    The approximate timestamp

    The approximate timestamp

    This is either the last observed sequencer timestamp OR the effective timestamp after we observed the time difference of (effective - sequencer = epsilon) to elapse

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def awaitIpsSnapshot(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[TopologySnapshot]

    Returns a snapshot of the current member topology for the given domain

    Returns a snapshot of the current member topology for the given domain

    The future will wait for the data if the data is not there yet.

    The snapshot returned by this method should be used for validating transaction and transfer requests (Phase 2 - 7). Use the request timestamp as parameter for this method. Do not use a response or result timestamp, because all validation steps must use the same topology snapshot.

    Definition Classes
    DomainSyncCryptoClientSyncCryptoClient
  7. def awaitIpsSnapshotUS(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[TopologySnapshot]
  8. def awaitIpsSnapshotUSSupervised(description: => String, warnAfter: Duration = 10.seconds)(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[TopologySnapshot]
    Definition Classes
    SyncCryptoClient
  9. def awaitSnapshot(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[DomainSnapshotSyncCryptoApi]

    Waits until a snapshot is available

    Waits until a snapshot is available

    The snapshot returned by this method should be used for validating transaction and transfer requests (Phase 2 - 7). Use the request timestamp as parameter for this method. Do not use a response or result timestamp, because all validation steps must use the same topology snapshot.

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  10. def awaitSnapshotSupervised(description: => String, warnAfter: Duration = 30.seconds)(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[DomainSnapshotSyncCryptoApi]

    Supervised version of awaitSnapshot

    Supervised version of awaitSnapshot

    Definition Classes
    TopologyClientApi
  11. def awaitSnapshotUS(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[DomainSnapshotSyncCryptoApi]

    Shutdown safe version of await snapshot

    Shutdown safe version of await snapshot

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  12. def awaitSnapshotUSSupervised(description: => String, warnAfter: Duration = 30.seconds)(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[DomainSnapshotSyncCryptoApi]

    Supervised version of awaitSnapshotUS

    Supervised version of awaitSnapshotUS

    Definition Classes
    TopologyClientApi
  13. def awaitTimestamp(timestamp: CantonTimestamp, waitForEffectiveTime: Boolean)(implicit traceContext: TraceContext): Option[Future[Unit]]

    Returns an optional future which will complete when the timestamp has been observed

    Returns an optional future which will complete when the timestamp has been observed

    If the timestamp is already observed, we return None.

    Note that this function allows to wait for effective time (true) and sequenced time (false). If we wait for effective time, we wait until the topology snapshot for that given point in time is known. As we future date topology transactions (to avoid bottlenecks), this might be before we actually observed a sequencing timestamp.

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  14. def awaitTimestampUS(timestamp: CantonTimestamp, waitForEffectiveTime: Boolean)(implicit traceContext: TraceContext): Option[FutureUnlessShutdown[Unit]]
  15. def cancelShutdownTask(token: Long): Unit

    Removes a shutdown task from the list using a token returned by runOnShutdown

    Removes a shutdown task from the list using a token returned by runOnShutdown

    Definition Classes
    OnShutdownRunner
  16. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  17. final def close(): Unit

    Blocks until all earlier tasks have completed and then prevents further tasks from being run.

    Blocks until all earlier tasks have completed and then prevents further tasks from being run.

    Definition Classes
    FlagCloseableOnShutdownRunner → AutoCloseable
  18. def closingTimeout: FiniteDuration
    Attributes
    protected
    Definition Classes
    FlagCloseablePerformUnlessClosing
  19. def containsShutdownTask(token: Long): Boolean
    Definition Classes
    OnShutdownRunner
  20. val crypto: Crypto
  21. def currentSnapshotApproximation(implicit traceContext: TraceContext): DomainSnapshotSyncCryptoApi

    Our current snapshot approximation

    Our current snapshot approximation

    As topology transactions are future dated (to prevent sequential bottlenecks), we do have to "guess" the current state, as time is defined by the sequencer after we've sent the transaction. Therefore, this function will return the best snapshot approximation known.

    The snapshot returned by this method should be used when preparing a transaction or transfer request (Phase 1). It must not be used when validating a request (Phase 2 - 7); instead, use one of the snapshot methods with the request timestamp.

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  22. val domainId: DomainId

    The domain this client applies to

    The domain this client applies to

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  23. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  25. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  26. implicit val executionContext: ExecutionContext
    Attributes
    protected
    Definition Classes
    DomainSyncCryptoClientHasFutureSupervision
  27. val futureSupervisor: FutureSupervisor
    Attributes
    protected
    Definition Classes
    DomainSyncCryptoClientHasFutureSupervision
  28. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  30. def headSnapshot(implicit traceContext: TraceContext): DomainSnapshotSyncCryptoApi

    Possibly future dated head snapshot

    Possibly future dated head snapshot

    As we future date topology transactions, the head snapshot is our latest knowledge of the topology state, but as it can be still future dated, we need to be careful when actually using it: the state might not yet be active, as the topology transactions are future dated. Therefore, do not act towards the sequencer using this snapshot, but use the currentSnapshotApproximation instead.

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  31. def internalPerformUnlessClosingF[A](name: String)(f: => Future[A])(implicit ec: ExecutionContext, traceContext: TraceContext): UnlessShutdown[Future[A]]
    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  32. val ips: DomainTopologyClient
  33. def ipsSnapshot(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[TopologySnapshot]

    Returns a snapshot of the current member topology for the given domain.

    Returns a snapshot of the current member topology for the given domain. The future will log a warning and await the snapshot if the data is not there yet.

    The snapshot returned by this method should be used for validating transaction and transfer requests (Phase 2 - 7). Use the request timestamp as parameter for this method. Do not use a response or result timestamp, because all validation steps must use the same topology snapshot.

    Definition Classes
    DomainSyncCryptoClientSyncCryptoClient
  34. def isClosing: Boolean

    Check whether we're closing.

    Check whether we're closing. Susceptible to race conditions; unless you're using this as a flag to the retry lib or you really know what you're doing, prefer performUnlessClosing and friends.

    Definition Classes
    OnShutdownRunner
  35. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  36. def keepTrackOfOpenFutures: Boolean

    track running futures on shutdown

    track running futures on shutdown

    set to true to get detailed information about all futures that did not complete during shutdown. if set to false, we don't do anything.

    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  37. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  38. val loggerFactory: NamedLoggerFactory
    Definition Classes
    DomainSyncCryptoClientNamedLogging
  39. def maxSleepMillis: Long

    How often to poll to check that all tasks have completed.

    How often to poll to check that all tasks have completed.

    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  40. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  43. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  44. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  45. def onCloseFailure(e: Throwable): Unit
    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  46. def onClosed(): Unit
  47. final def onFirstClose(): Unit

    Blocks until all earlier tasks have completed and then prevents further tasks from being run.

    Blocks until all earlier tasks have completed and then prevents further tasks from being run.

    Definition Classes
    PerformUnlessClosingOnShutdownRunner
    Annotations
    @SuppressWarnings()
  48. val owner: KeyOwner
  49. def performUnlessClosing[A](name: String)(f: => A)(implicit traceContext: TraceContext): UnlessShutdown[A]

    Performs the task given by f unless a shutdown has been initiated.

    Performs the task given by f unless a shutdown has been initiated. The shutdown will only begin after f completes, but other tasks may execute concurrently with f, if started using this function, or one of the other variants (performUnlessClosingF and performUnlessClosingEitherT). The tasks are assumed to take less than closingTimeout to complete.

    DO NOT CALL this.close as part of f, because it will result in a deadlock.

    f

    The task to perform

    returns

    scala.None$ if a shutdown has been initiated. Otherwise the result of the task.

    Definition Classes
    PerformUnlessClosing
  50. def performUnlessClosingCheckedT[A, N, R](name: String, onClosing: => Checked[A, N, R])(etf: => CheckedT[Future, A, N, R])(implicit ec: ExecutionContext, traceContext: TraceContext): CheckedT[Future, A, N, R]
    Definition Classes
    PerformUnlessClosing
  51. def performUnlessClosingEitherT[E, R](name: String, onClosing: => E)(etf: => EitherT[Future, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[Future, E, R]

    Performs the EitherT[Future] given by etf unless a shutdown has been initiated, in which case the provided error is returned instead.

    Performs the EitherT[Future] given by etf unless a shutdown has been initiated, in which case the provided error is returned instead. Both etf and the error are lazy; etf is only evaluated if there is no shutdown, the error only if we're shutting down. The shutdown will only begin after etf completes, but other tasks may execute concurrently with etf, if started using this function, or one of the other variants (performUnlessClosing and performUnlessClosingF). The tasks are assumed to take less than closingTimeout to complete.

    DO NOT CALL this.close as part of etf, because it will result in a deadlock.

    etf

    The task to perform

    Definition Classes
    PerformUnlessClosing
  52. def performUnlessClosingEitherTF[E, R](name: String, onClosing: => E)(etf: => EitherT[Future, E, Future[R]])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[Future, E, Future[R]]
    Definition Classes
    PerformUnlessClosing
  53. def performUnlessClosingEitherU[E, R](name: String)(etf: => EitherT[Future, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]
    Definition Classes
    PerformUnlessClosing
  54. def performUnlessClosingEitherUSF[E, R](name: String)(etf: => EitherT[FutureUnlessShutdown, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]
    Definition Classes
    PerformUnlessClosing
  55. def performUnlessClosingF[A](name: String)(f: => Future[A])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]

    Performs the Future given by f unless a shutdown has been initiated.

    Performs the Future given by f unless a shutdown has been initiated. The future is lazy and not evaluated during shutdown. The shutdown will only begin after f completes, but other tasks may execute concurrently with f, if started using this function, or one of the other variants (performUnlessClosing and performUnlessClosingEitherT). The tasks are assumed to take less than closingTimeout to complete.

    DO NOT CALL this.close as part of f, because it will result in a deadlock.

    f

    The task to perform

    returns

    The future completes with com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown if a shutdown has been initiated. Otherwise the result of the task wrapped in com.digitalasset.canton.lifecycle.UnlessShutdown.Outcome.

    Definition Classes
    PerformUnlessClosing
  56. def performUnlessClosingUSF[A](name: String)(f: => FutureUnlessShutdown[A])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]
    Definition Classes
    PerformUnlessClosing
  57. def pureCrypto: CryptoPureApi
  58. def runOnShutdown[T](task: RunOnShutdown)(implicit traceContext: TraceContext): Long

    Same as runOnShutdown_ but returns a token that allows you to remove the task explicitly from being run using cancelShutdownTask

    Same as runOnShutdown_ but returns a token that allows you to remove the task explicitly from being run using cancelShutdownTask

    Definition Classes
    OnShutdownRunner
  59. def runOnShutdown_[T](task: RunOnShutdown)(implicit traceContext: TraceContext): Unit

    Register a task to run when shutdown is initiated.

    Register a task to run when shutdown is initiated.

    You can use this for example to register tasks that cancel long-running computations, whose termination you can then wait for in "closeAsync".

    Definition Classes
    OnShutdownRunner
  60. def runStateChanged(waitingState: Boolean = false): Unit
    Attributes
    protected
    Definition Classes
    OnShutdownRunner
    Annotations
    @VisibleForTesting()
  61. def snapshot(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[DomainSnapshotSyncCryptoApi]

    Returns the topology information at a certain point in time

    Returns the topology information at a certain point in time

    Use this method if you are sure to be synchronized with the topology state updates. The method will block & wait for an update, but emit a warning if it is not available

    The snapshot returned by this method should be used for validating transaction and transfer requests (Phase 2 - 7). Use the request timestamp as parameter for this method. Do not use a response or result timestamp, because all validation steps must use the same topology snapshot.

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  62. def snapshotAvailable(timestamp: CantonTimestamp): Boolean

    Returns true if the topology information at the passed timestamp is already known

    Returns true if the topology information at the passed timestamp is already known

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  63. def snapshotUS(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): FutureUnlessShutdown[DomainSnapshotSyncCryptoApi]
  64. val staticDomainParameters: StaticDomainParameters
  65. def supervised[T](description: => String, warnAfter: Duration = 10.seconds)(fut: Future[T])(implicit traceContext: TraceContext): Future[T]
    Attributes
    protected
    Definition Classes
    HasFutureSupervision
  66. def supervisedUS[T](description: => String, warnAfter: Duration = 10.seconds)(fut: FutureUnlessShutdown[T])(implicit traceContext: TraceContext): FutureUnlessShutdown[T]
    Definition Classes
    HasFutureSupervision
  67. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  68. val timeouts: ProcessingTimeout
  69. def toString(): String
    Definition Classes
    AnyRef → Any
  70. def topologyKnownUntilTimestamp: CantonTimestamp

    The most recently observed effective timestamp

    The most recently observed effective timestamp

    The effective timestamp is sequencer_time + epsilon(sequencer_time), where epsilon is given by the topology change delay time, defined using the domain parameters.

    This is the highest timestamp for which we can serve snapshots

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  71. def trySnapshot(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): DomainSnapshotSyncCryptoApi

    Returns the topology information at a certain point in time

    Returns the topology information at a certain point in time

    Fails with an exception if the state is not yet known.

    The snapshot returned by this method should be used for validating transaction and transfer requests (Phase 2 - 7). Use the request timestamp as parameter for this method. Do not use a response or result timestamp, because all validation steps must use the same topology snapshot.

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  72. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  73. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  74. 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 FlagCloseable

Inherited from PerformUnlessClosing

Inherited from OnShutdownRunner

Inherited from AutoCloseable

Inherited from NamedLogging

Inherited from HasFutureSupervision

Inherited from AnyRef

Inherited from Any

Ungrouped