class CantonSyncService extends WriteService with WriteParticipantPruningService with ReadService with FlagCloseable with Spanning with NamedLogging

The Canton-based synchronization service.

A single Canton sync service can connect to multiple domains.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CantonSyncService
  2. NamedLogging
  3. Spanning
  4. FlagCloseable
  5. AutoCloseable
  6. ReadService
  7. WriteService
  8. ReportsHealth
  9. WriteParticipantPruningService
  10. WriteConfigService
  11. WritePartyService
  12. WritePackagesService
  13. AnyRef
  14. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new CantonSyncService(participantId: ParticipantId, domainRegistry: DomainRegistry, domainConnectionConfigStore: DomainConnectionConfigStore, aliasManager: DomainAliasManager, participantNodePersistentState: ParticipantNodePersistentState, participantNodeEphemeralState: ParticipantNodeEphemeralState, syncDomainPersistentStateManager: SyncDomainPersistentStateManager, syncDomainPersistentStateFactory: SyncDomainPersistentStateFactory, packageService: PackageService, topologyStoreFactory: TopologyStoreFactory, domainCausalityStore: MultiDomainCausalityStore, topologyManager: ParticipantTopologyManager, identityPusher: ParticipantTopologyDispatcher, partyNotifier: LedgerServerPartyNotifier, syncCrypto: SyncCryptoApiProvider, pruningProcessor: PruningProcessor, ledgerId: LedgerId, engine: Engine, syncDomainStateFactory: SyncDomainEphemeralStateFactory, clock: Clock, resourceManagementService: ResourceManagementService, parameters: ParticipantNodeParameters, syncDomainFactory: Factory[SyncDomain], indexedStringStore: IndexedStringStore, metrics: ParticipantMetrics, isActive: () => Boolean, futureSupervisor: FutureSupervisor, loggerFactory: NamedLoggerFactory)(implicit ec: ExecutionContext, mat: Materializer, tracer: Tracer)

    participantId

    The participant node id hosting this sync service.

    domainRegistry

    Domain registry for connecting to domains.

    domainConnectionConfigStore

    Storage for domain connection configs

    packageService

    Underlying package management service.

    syncCrypto

    Synchronisation crypto utility combining IPS and Crypto operations.

    isActive

    Returns true of the node is the active replica

Type Members

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

Value Members

  1. object ReaderState extends Serializable
    Definition Classes
    FlagCloseable
  2. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  3. final def ##: Int
    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def addContractsRepair(domain: DomainAlias, contractsToAdd: Seq[SerializableContractWithWitnesses], ignoreAlreadyAdded: Boolean)(implicit traceContext: TraceContext): Either[String, Unit]

    Participant repair utility for manually adding contracts to a domain in an offline fashion.

    Participant repair utility for manually adding contracts to a domain in an offline fashion.

    domain

    alias of domain to add contracts to. The domain needs to be configured, but disconnected to prevent race conditions.

    contractsToAdd

    contracts to add. Relevant pieces of each contract: create-arguments (LfContractInst), template-id (LfContractInst), contractId, ledgerCreateTime, salt (to be added to SerializableContract), and witnesses, SerializableContract.metadata is only validated, but otherwise ignored as stakeholder and signatories can be recomputed from contracts.

    ignoreAlreadyAdded

    whether to ignore and skip over contracts already added/present in the domain. Setting this to true (at least on retries) enables writing idempotent repair scripts.

  6. def addDomain(config: DomainConnectionConfig)(implicit traceContext: TraceContext): EitherT[Future, SyncServiceError, Unit]

    Adds a new domain to the sync service's configuration.

    Adds a new domain to the sync service's configuration.

    NOTE: Does not automatically connect the sync service to the new domain.

    config

    The domain configuration.

    returns

    Error or unit.

  7. def allocateParty(hint: Option[LfPartyId], displayName: Option[String], rawSubmissionId: LedgerSubmissionId)(implicit _loggingContext: LoggingContext, telemetryContext: TelemetryContext): CompletionStage[SubmissionResult]
    Definition Classes
    CantonSyncService → WritePartyService
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def changeDomainRepair(contractIds: Seq[LfContractId], sourceDomain: DomainAlias, targetDomain: DomainAlias, skipInactive: Boolean, batchSize: PositiveInt)(implicit tranceContext: TraceContext): Either[String, Unit]

    Participant repair utility for manually moving contracts from a source domain to a target domain in an offline fashion.

    Participant repair utility for manually moving contracts from a source domain to a target domain in an offline fashion.

    contractIds

    ids of contracts to move that reside in the sourceDomain (or for idempotency already in the targetDomain)

    sourceDomain

    alias of source domain from which to move contracts

    targetDomain

    alias of target domain to which to move contracts

    skipInactive

    whether to only move contracts that are active in the source domain

    batchSize

    how many contracts to write at once

  10. def checkOverloaded(telemetryContext: TelemetryContext): Option[SubmissionResult]
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  12. 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()
  13. def closingTimeout: FiniteDuration
    Attributes
    protected
    Definition Classes
    FlagCloseable
  14. def computeTotalLoad: Int
  15. def configuredDomains: Seq[StoredDomainConnectionConfig]

    Returns the domains this sync service is configured with.

  16. def connectDomain(domainAlias: DomainAlias, keepRetrying: Boolean)(implicit traceContext: TraceContext): EitherT[Future, SyncServiceError, Boolean]

    Connect the sync service to the given domain.

    Connect the sync service to the given domain. This method makes sure there can only be one connection in progress at a time.

  17. def currentHealth(): HealthStatus
    Definition Classes
    CantonSyncService → ReportsHealth
  18. def currentWriteHealth(): HealthStatus
  19. def disconnectDomain(domain: DomainAlias)(implicit traceContext: TraceContext): EitherT[Future, SyncServiceError, Unit]

    Disconnect the given domain from the sync service.

  20. def disconnectDomains()(implicit traceContext: TraceContext): EitherT[Future, SyncServiceError, Unit]

    Disconnect from all connected domains.

  21. def domainConnectionConfigByAlias(domainAlias: DomainAlias): EitherT[Future, MissingConfigForAlias, StoredDomainConnectionConfig]
  22. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  24. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  25. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. def ignoreEventsRepair(domain: DomainId, from: SequencerCounter, to: SequencerCounter, force: Boolean)(implicit traceContext: TraceContext): Either[String, Unit]
  28. def initializeState()(implicit traceContext: TraceContext): Unit
  29. def internalPerformUnlessClosingF[A](name: String)(f: => Future[A])(implicit ec: ExecutionContext, traceContext: TraceContext): UnlessShutdown[Future[A]]
    Attributes
    protected
    Definition Classes
    FlagCloseable
  30. val isActive: () => Boolean
  31. 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
  32. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  33. 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
  34. def ledgerInitialConditions(): Source[LedgerInitialConditions, NotUsed]
    Definition Classes
    CantonSyncService → ReadService
  35. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  36. val loggerFactory: NamedLoggerFactory
    Attributes
    protected
    Definition Classes
    CantonSyncServiceNamedLogging
  37. def lookupDomainTimeTracker(domainId: DomainId): Option[DomainTimeTracker]

    Lookup a time tracker for the given domainId.

    Lookup a time tracker for the given domainId. A time tracker will only be returned if the domain is registered and connected.

  38. val maxDeduplicationDuration: NonNegativeFiniteDuration
  39. def maxSleepMillis: Long
    Attributes
    protected
    Definition Classes
    FlagCloseable
  40. def migrateDomain(source: DomainAlias, target: DomainConnectionConfig)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, Unit]
  41. def modifyDomain(config: DomainConnectionConfig)(implicit traceContext: TraceContext): EitherT[Future, SyncServiceError, Unit]

    Modifies the settings of the sync-service's configuration

    Modifies the settings of the sync-service's configuration

    NOTE: This does not automatically reconnect the sync service.

  42. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  43. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  44. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  45. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  46. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  47. def onClosed(): Unit
    Definition Classes
    CantonSyncServiceFlagCloseable
  48. val participantId: ParticipantId
  49. def partyHasActiveContracts(partyId: PartyId)(implicit traceContext: TraceContext): Future[Boolean]

    Checks if a given party has any active contracts.

  50. 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
  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
    FlagCloseable
  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
    FlagCloseable
  53. def performUnlessClosingEitherU[E, R](name: String)(etf: => EitherT[Future, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]
    Definition Classes
    FlagCloseable
  54. 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
  55. def performUnlessClosingUSF[A](name: String)(f: => FutureUnlessShutdown[A])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]
    Definition Classes
    FlagCloseable
  56. val protocolVersionGetter: (Traced[DomainId]) => Future[Option[ProtocolVersion]]
  57. def prune(pruneUpToInclusive: LedgerSyncOffset, submissionId: LedgerSubmissionId, _pruneAllDivulgedContracts: Boolean): CompletionStage[PruningResult]
    Definition Classes
    CantonSyncService → WriteParticipantPruningService
  58. def pruneInternally(pruneUpToInclusive: LedgerSyncOffset)(implicit traceContext: TraceContext): EitherT[Future, CantonError, Unit]
  59. def pureCryptoApi: CryptoPureApi

    Returns the pure crypto operations used for the sync protocol

  60. def purgeContractsRepair(domain: DomainAlias, contractIds: Seq[LfContractId], ignoreAlreadyPurged: Boolean)(implicit traceContext: TraceContext): Either[String, Unit]

    Participant repair utility for manually purging (archiving) contracts in an offline fashion.

    Participant repair utility for manually purging (archiving) contracts in an offline fashion.

    domain

    alias of domain to purge contracts from. The domain needs to be configured, but disconnected to prevent race conditions.

    contractIds

    lf contract ids of contracts to purge

    ignoreAlreadyPurged

    whether to ignore already purged contracts.

  61. def purgeDomain(domain: DomainAlias): Either[SyncServiceError, Unit]

    Removes a configured and disconnected domain.

    Removes a configured and disconnected domain.

    This is an unsafe operation as it changes the ledger offsets.

  62. def readyDomains: Map[DomainAlias, (DomainId, Boolean)]

    Returns the ready domains this sync service is connected to.

  63. def reconnectDomains(ignoreFailures: Boolean)(implicit traceContext: TraceContext): EitherT[Future, SyncServiceError, Seq[DomainAlias]]

    Reconnect to all configured domains that have autoStart = true

  64. def recoveringDomains: Map[DomainAlias, DomainId]

    Returns the recovering domains this sync service is connected to.

    Returns the recovering domains this sync service is connected to. "Recovering" means connected, but not yet ready to use.

  65. def refreshCaches()(implicit traceContext: TraceContext): Future[Unit]
  66. 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
  67. def runStateChanged(waitingState: Boolean = false): Unit
    Attributes
    protected
    Definition Classes
    FlagCloseable
    Annotations
    @VisibleForTesting()
  68. lazy val stateInspection: SyncStateInspection
  69. def stateUpdates(beginAfterOffset: Option[LedgerSyncOffset])(implicit loggingContext: LoggingContext): Source[(LedgerSyncOffset, LedgerSyncEvent), NotUsed]

    Build source for subscription (for ledger api server indexer).

    Build source for subscription (for ledger api server indexer).

    beginAfterOffset

    offset after which to emit events

    Definition Classes
    CantonSyncService → ReadService
  70. def submitConfiguration(_maxRecordTimeToBeRemovedUpstream: LedgerSyncRecordTime, submissionId: LedgerSubmissionId, config: Configuration)(implicit _loggingContext: LoggingContext, telemetryContext: TelemetryContext): CompletionStage[SubmissionResult]
    Definition Classes
    CantonSyncService → WriteConfigService
  71. def submitTransaction(submitterInfo: SubmitterInfo, transactionMeta: TransactionMeta, transaction: LfSubmittedTransaction, _estimatedInterpretationCost: Long, keyResolver: LfKeyResolver, explicitlyDisclosedContracts: ImmArray[Versioned[DisclosedContract]])(implicit _loggingContext: LoggingContext, telemetryContext: TelemetryContext): CompletionStage[SubmissionResult]
    Definition Classes
    CantonSyncService → WriteService
  72. val syncCrypto: SyncCryptoApiProvider
  73. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  74. def timeouts: ProcessingTimeout
    Attributes
    protected
    Definition Classes
    CantonSyncServiceFlagCloseable
  75. def toString(): String
    Definition Classes
    CantonSyncService → AnyRef → Any
  76. implicit val tracer: Tracer
  77. val transferService: TransferService
  78. def unignoreEventsRepair(domain: DomainId, from: SequencerCounter, to: SequencerCounter, force: Boolean)(implicit traceContext: TraceContext): Either[String, Unit]
  79. def uploadPackages(submissionId: LedgerSubmissionId, archives: List[Archive], sourceDescription: Option[String])(implicit _loggingContext: LoggingContext, telemetryContext: TelemetryContext): CompletionStage[SubmissionResult]
    Definition Classes
    CantonSyncService → WritePackagesService
  80. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  81. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  82. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  83. def withNewTrace[A](description: String)(f: (TraceContext) => (SpanWrapper) => A)(implicit tracer: Tracer): A
    Attributes
    protected
    Definition Classes
    Spanning
  84. def withSpan[A](description: String)(f: (TraceContext) => (SpanWrapper) => A)(implicit traceContext: TraceContext, tracer: Tracer): A
    Attributes
    protected
    Definition Classes
    Spanning
  85. def withSpanFromGrpcContext[A](description: String)(f: (TraceContext) => (SpanWrapper) => A)(implicit tracer: Tracer): A
    Attributes
    protected
    Definition Classes
    Spanning

Deprecated Value Members

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

Inherited from NamedLogging

Inherited from Spanning

Inherited from FlagCloseable

Inherited from AutoCloseable

Inherited from ReadService

Inherited from WriteService

Inherited from ReportsHealth

Inherited from WriteConfigService

Inherited from WritePartyService

Inherited from WritePackagesService

Inherited from AnyRef

Inherited from Any

Ungrouped