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. AutoCloseable
  4. NamedLogging
  5. HasFutureSupervision
  6. SyncCryptoClient
  7. TopologyClientApi
  8. AnyRef
  9. 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, timeouts: ProcessingTimeout, futureSupervisor: FutureSupervisor, loggerFactory: NamedLoggerFactory)(implicit executionContext: ExecutionContext)

Type Members

  1. case class ReaderState(count: Int, readers: MultiSet[String]) extends Product with Serializable
    Definition Classes
    FlagCloseable

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.

    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

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  10. def awaitSnapshotSupervised(description: => String, warnAfter: Duration = 10.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 = 10.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 clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  16. 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
    FlagCloseable → AutoCloseable
    Annotations
    @SuppressWarnings()
  17. def closingTimeout: FiniteDuration
    Attributes
    protected
    Definition Classes
    FlagCloseable
  18. val crypto: Crypto
  19. 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.

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  20. val domainId: DomainId

    The domain this client applies to

    The domain this client applies to

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  23. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  24. implicit val executionContext: ExecutionContext
    Attributes
    protected
    Definition Classes
    DomainSyncCryptoClientHasFutureSupervision
  25. val futureSupervisor: FutureSupervisor
    Attributes
    protected
    Definition Classes
    DomainSyncCryptoClientHasFutureSupervision
  26. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. 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
  29. def internalPerformUnlessClosingF[A](name: String)(f: => Future[A])(implicit ec: ExecutionContext, traceContext: TraceContext): UnlessShutdown[Future[A]]
    Attributes
    protected
    Definition Classes
    FlagCloseable
  30. val ips: DomainTopologyClient
  31. 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.

    Definition Classes
    DomainSyncCryptoClientSyncCryptoClient
  32. def isClosing: Boolean

    Check whether we're closing.

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

    Definition Classes
    FlagCloseable
  33. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  34. 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
    FlagCloseable
  35. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  36. val loggerFactory: NamedLoggerFactory
    Definition Classes
    DomainSyncCryptoClientNamedLogging
  37. def maxSleepMillis: Long
    Attributes
    protected
    Definition Classes
    FlagCloseable
  38. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  39. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  41. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  42. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  43. def onClosed(): Unit
  44. val owner: KeyOwner
  45. 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
    FlagCloseable
  46. 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
    FlagCloseable
  47. 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
    FlagCloseable
  48. def performUnlessClosingEitherU[E, R](name: String)(etf: => EitherT[Future, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]
    Definition Classes
    FlagCloseable
  49. 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
    FlagCloseable
  50. def performUnlessClosingUSF[A](name: String)(f: => FutureUnlessShutdown[A])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]
    Definition Classes
    FlagCloseable
  51. def pureCrypto: CryptoPureApi
  52. def runOnShutdown[T](task: RunOnShutdown)(implicit traceContext: TraceContext): Unit

    Register a task that will run onClose after all "performUnlessShutdown" tasks have finished

    Register a task that will run onClose after all "performUnlessShutdown" tasks have finished

    Definition Classes
    FlagCloseable
  53. def runStateChanged(waitingState: Boolean = false): Unit
    Attributes
    protected
    Definition Classes
    FlagCloseable
    Annotations
    @VisibleForTesting()
  54. 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

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  55. 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
  56. def supervised[T](description: => String, warnAfter: Duration = 10.seconds)(fut: Future[T])(implicit traceContext: TraceContext): Future[T]
    Attributes
    protected
    Definition Classes
    HasFutureSupervision
  57. def supervisedUS[T](description: => String, warnAfter: Duration = 10.seconds)(fut: FutureUnlessShutdown[T])(implicit traceContext: TraceContext): FutureUnlessShutdown[T]
    Definition Classes
    HasFutureSupervision
  58. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  59. val timeouts: ProcessingTimeout
  60. def toString(): String
    Definition Classes
    AnyRef → Any
  61. 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
  62. 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.

    Definition Classes
    DomainSyncCryptoClientTopologyClientApi
  63. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  64. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  65. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  66. object ReaderState extends Serializable
    Definition Classes
    FlagCloseable

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from FlagCloseable

Inherited from AutoCloseable

Inherited from NamedLogging

Inherited from HasFutureSupervision

Inherited from AnyRef

Inherited from Any

Ungrouped