trait Nodes[+Node <: CantonNode, +NodeBootstrap <: CantonNodeBootstrap[Node]] extends FlagCloseable

Group of CantonNodes of the same type (domains, participants, sequencers).

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Nodes
  2. FlagCloseable
  3. PerformUnlessClosing
  4. OnShutdownRunner
  5. AutoCloseable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type InstanceName = String

Abstract Value Members

  1. abstract def getRunning(name: InstanceName): Option[NodeBootstrap]

    Get the single running node

  2. abstract def getStarting(name: InstanceName): Option[NodeBootstrap]

    Get the node while it is still being started.

    Get the node while it is still being started. This is mostly useful during testing to access the node in earlier stages of its initialization phase.

  3. abstract def isRunning(name: InstanceName): Boolean

    Is the named node running?

  4. abstract def migrateDatabase(name: InstanceName): Either[StartupError, Unit]

    Independently run any pending database migrations for the named node

  5. abstract def names(): Seq[InstanceName]

    Returns the names of all known nodes

  6. abstract def repairDatabaseMigration(name: InstanceName): Either[StartupError, Unit]

    Independently repair the Flyway schema history table for the named node to reset Flyway migration checksums etc

  7. abstract def running: Seq[NodeBootstrap]

    Get nodes that are currently running

  8. abstract def start(name: InstanceName)(implicit traceContext: TraceContext): EitherT[Future, StartupError, Unit]

    Start an individual node by name

  9. abstract def startAndWait(name: InstanceName)(implicit traceContext: TraceContext): Either[StartupError, Unit]
  10. abstract def startUpGroup: Int

    Returns the startup group (nodes in the same group will start together)

    Returns the startup group (nodes in the same group will start together)

    Mediator & Topology manager automatically connect to a domain. Participants require an external call to reconnectDomains. Therefore, we can start participants, sequencer and domain nodes together, but we have to wait for the sequencers to be up before we can kick off mediators & topology managers.

  11. abstract def stop(name: InstanceName)(implicit traceContext: TraceContext): EitherT[Future, ShutdownError, Unit]

    Stop the named node

  12. abstract def stopAndWait(name: InstanceName)(implicit traceContext: TraceContext): Either[ShutdownError, Unit]

Concrete Value Members

  1. 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
  2. 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
  3. def containsShutdownTask(token: Long): Boolean
    Definition Classes
    OnShutdownRunner
  4. 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
  5. 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()
  6. 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
  7. 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
  8. 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
  9. 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
  10. def performUnlessClosingEitherU[E, R](name: String)(etf: => EitherT[Future, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]
    Definition Classes
    PerformUnlessClosing
  11. def performUnlessClosingEitherUSF[E, R](name: String)(etf: => EitherT[FutureUnlessShutdown, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]
    Definition Classes
    PerformUnlessClosing
  12. 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
  13. def performUnlessClosingUSF[A](name: String)(f: => FutureUnlessShutdown[A])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]
    Definition Classes
    PerformUnlessClosing
  14. 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
  15. 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