Packages

final class CoordinatedShutdown extends Extension

Source
CoordinatedShutdown.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CoordinatedShutdown
  2. Extension
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from CoordinatedShutdown toany2stringadd[CoordinatedShutdown] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (CoordinatedShutdown, B)
    Implicit
    This member is added by an implicit conversion from CoordinatedShutdown toArrowAssoc[CoordinatedShutdown] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def addActorTerminationTask(phase: String, taskName: String, actor: ActorRef, stopMsg: Optional[Any]): Unit

    Java API: Add an actor termination task to a phase.

    Java API: Add an actor termination task to a phase. It doesn't remove previously added tasks. Tasks added to the same phase are executed in parallel without any ordering assumptions. Next phase will not start until all tasks of previous phase have been completed.

    When executed, this task will first send the given stop message, if defined, to the actor, then it will watch the actor, and complete when the actor terminates.

    Tasks should typically be registered as early as possible after system startup. When running the coordinated shutdown tasks that have been registered will be performed but tasks that are added too late will not be run. It is possible to add a task to a later phase by a task in an earlier phase and it will be performed.

  7. def addActorTerminationTask(phase: String, taskName: String, actor: ActorRef, stopMsg: Option[Any]): Unit

    Scala API: Add an actor termination task to a phase.

    Scala API: Add an actor termination task to a phase. It doesn't remove previously added tasks. Tasks added to the same phase are executed in parallel without any ordering assumptions. Next phase will not start until all tasks of previous phase have been completed.

    When executed, this task will first send the given stop message, if defined, to the actor, then it will watch the actor, and complete when the actor terminates.

    Tasks should typically be registered as early as possible after system startup. When running the coordinated shutdown tasks that have been registered will be performed but tasks that are added too late will not be run. It is possible to add a task to a later phase by a task in an earlier phase and it will be performed.

  8. def addCancellableJvmShutdownHook(hook: Runnable): Cancellable

    Java API: Add a JVM shutdown hook that will be run when the JVM process begins its shutdown sequence.

    Java API: Add a JVM shutdown hook that will be run when the JVM process begins its shutdown sequence. Added hooks may run in an order concurrently, but they are running before Akka internal shutdown hooks, e.g. those shutting down Artery.

    The returned Cancellable makes it possible to de-register the hook. For example on actor system shutdown to avoid leaking references to the actor system in tests.

    For shutdown hooks that does not have any requirements on running before the Akka shutdown hooks the standard library JVM shutdown hooks APIs are better suited.

  9. def addCancellableJvmShutdownHook[T](hook: => T): Cancellable

    Scala API: Add a JVM shutdown hook that will be run when the JVM process begins its shutdown sequence.

    Scala API: Add a JVM shutdown hook that will be run when the JVM process begins its shutdown sequence. Added hooks may run in any order concurrently, but they are running before Akka internal shutdown hooks, e.g. those shutting down Artery.

    The returned Cancellable makes it possible to de-register the hook. For example on actor system shutdown to avoid leaking references to the actor system in tests.

    For shutdown hooks that does not have any requirements on running before the Akka shutdown hooks the standard library JVM shutdown hooks APIs are better suited.

    Annotations
    @tailrec()
  10. def addCancellableTask(phase: String, taskName: String, task: Supplier[CompletionStage[Done]]): Cancellable

    Java API: Add a task to a phase, returning an object which will cancel it on demand and remove it from the task pool (so long as the same task has not been added elsewhere).

    Java API: Add a task to a phase, returning an object which will cancel it on demand and remove it from the task pool (so long as the same task has not been added elsewhere). Tasks in a phase are run concurrently, with no ordering assumed.

    Adding a task to a phase does not remove any other tasks from the phase.

    If the same task is added multiple times, each addition will be run unless cancelled.

    Tasks should typically be registered as early as possible -- once coordinated shutdown begins, tasks may be added without ever being run. A task may add tasks to a later stage with confidence that they will be run.

  11. def addCancellableTask(phase: String, taskName: String)(task: () => Future[Done]): Cancellable

    Scala API: Add a task to a phase, returning an object which will cancel it on demand and remove it from the task pool (so long as the same task has not been added elsewhere).

    Scala API: Add a task to a phase, returning an object which will cancel it on demand and remove it from the task pool (so long as the same task has not been added elsewhere). Tasks in a phase are run concurrently, with no ordering assumed.

    Adding a task to a phase does not remove any other tasks from the phase.

    If the same task is added multiple times, each addition will be run unless cancelled.

    Tasks should typically be registered as early as possible -- once coordinated shutdown begins, tasks may be added without ever being run. A task may add tasks to a later stage with confidence that they will be run.

  12. def addJvmShutdownHook(hook: Runnable): Unit

    Java API: Add a JVM shutdown hook that will be run when the JVM process begins its shutdown sequence.

    Java API: Add a JVM shutdown hook that will be run when the JVM process begins its shutdown sequence. Added hooks may run in any order concurrently, but they are running before Akka internal shutdown hooks, e.g. those shutting down Artery.

  13. def addJvmShutdownHook[T](hook: => T): Unit

    Scala API: Add a JVM shutdown hook that will be run when the JVM process begins its shutdown sequence.

    Scala API: Add a JVM shutdown hook that will be run when the JVM process begins its shutdown sequence. Added hooks may run in any order concurrently, but they are running before Akka internal shutdown hooks, e.g. those shutting down Artery.

  14. def addTask(phase: String, taskName: String, task: Supplier[CompletionStage[Done]]): Unit

    Java API: Add a task to a phase.

    Java API: Add a task to a phase. It doesn't remove previously added tasks. Tasks added to the same phase are executed in parallel without any ordering assumptions. Next phase will not start until all tasks of previous phase have been completed.

    Tasks should typically be registered as early as possible after system startup. When running the coordinated shutdown tasks that have been registered will be performed but tasks that are added too late will not be run. It is possible to add a task to a later phase by a task in an earlier phase and it will be performed.

  15. def addTask(phase: String, taskName: String)(task: () => Future[Done]): Unit

    Scala API: Add a task to a phase.

    Scala API: Add a task to a phase. It doesn't remove previously added tasks. Tasks added to the same phase are executed in parallel without any ordering assumptions. Next phase will not start until all tasks of previous phase have been completed.

    Tasks should typically be registered as early as possible after system startup. When running the coordinated shutdown tasks that have been registered will be performed but tasks that are added too late will not be run. It is possible to add a task to a later phase by a task in an earlier phase and it will be performed.

  16. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  17. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  18. def ensuring(cond: (CoordinatedShutdown) => Boolean, msg: => Any): CoordinatedShutdown
    Implicit
    This member is added by an implicit conversion from CoordinatedShutdown toEnsuring[CoordinatedShutdown] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: (CoordinatedShutdown) => Boolean): CoordinatedShutdown
    Implicit
    This member is added by an implicit conversion from CoordinatedShutdown toEnsuring[CoordinatedShutdown] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: Boolean, msg: => Any): CoordinatedShutdown
    Implicit
    This member is added by an implicit conversion from CoordinatedShutdown toEnsuring[CoordinatedShutdown] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean): CoordinatedShutdown
    Implicit
    This member is added by an implicit conversion from CoordinatedShutdown toEnsuring[CoordinatedShutdown] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  24. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. def getShutdownReason(): Optional[Reason]

    The Reason for the shutdown as passed to the run method.

    The Reason for the shutdown as passed to the run method. Optional.empty if the shutdown has not been started.

  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. def run(reason: Reason, fromPhase: Optional[String]): CompletionStage[Done]

    Java API: Run tasks of all phases including and after the given phase.

    Java API: Run tasks of all phases including and after the given phase. The returned CompletionStage is completed when all such tasks have been completed, or there is a failure when recovery is disabled.

    It's safe to call this method multiple times. It will only run the shutdown sequence once.

  32. def run(reason: Reason, fromPhase: Option[String]): Future[Done]

    Scala API: Run tasks of all phases including and after the given phase.

    Scala API: Run tasks of all phases including and after the given phase. The returned Future is completed when all such tasks have been completed, or there is a failure when recovery is disabled.

    It's safe to call this method multiple times. It will only run shutdown sequence once.

  33. def run(reason: Reason): Future[Done]

    Scala API: Run tasks of all phases.

    Scala API: Run tasks of all phases. The returned Future is completed when all tasks have been completed, or there is a failure when recovery is disabled.

    It's safe to call this method multiple times. It will only run the shutdown sequence once.

  34. def runAll(reason: Reason): CompletionStage[Done]

    Java API: Run tasks of all phases.

    Java API: Run tasks of all phases. The returned CompletionStage is completed when all tasks have been completed, or there is a failure when recovery is disabled.

    It's safe to call this method multiple times. It will only run the shutdown sequence once.

  35. def shutdownReason(): Option[Reason]

    The Reason for the shutdown as passed to the run method.

    The Reason for the shutdown as passed to the run method. None if the shutdown has not been started.

  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. def timeout(phase: String): FiniteDuration

    The configured timeout for a given phase.

    The configured timeout for a given phase. For example useful as timeout when actor ask requests is used as a task.

  38. def toString(): String
    Definition Classes
    AnyRef → Any
  39. def totalTimeout(): FiniteDuration

    Sum of timeouts of all phases that have some task.

  40. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  42. 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
  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from CoordinatedShutdown toStringFormat[CoordinatedShutdown] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def run(fromPhase: Optional[String]): CompletionStage[Done]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.8) Use the method with reason parameter instead

  4. def run(fromPhase: Option[String]): Future[Done]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.8) Use the method with reason parameter instead

  5. def run(): Future[Done]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.8) Use the method with reason parameter instead

  6. def runAll(): CompletionStage[Done]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.5.8) Use the method with reason parameter instead

  7. def [B](y: B): (CoordinatedShutdown, B)
    Implicit
    This member is added by an implicit conversion from CoordinatedShutdown toArrowAssoc[CoordinatedShutdown] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from Extension

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromCoordinatedShutdown to any2stringadd[CoordinatedShutdown]

Inherited by implicit conversion StringFormat fromCoordinatedShutdown to StringFormat[CoordinatedShutdown]

Inherited by implicit conversion Ensuring fromCoordinatedShutdown to Ensuring[CoordinatedShutdown]

Inherited by implicit conversion ArrowAssoc fromCoordinatedShutdown to ArrowAssoc[CoordinatedShutdown]

Ungrouped