final class CoordinatedShutdown extends Extension
- Alphabetic
- By Inheritance
- CoordinatedShutdown
- Extension
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from CoordinatedShutdown to any2stringadd[CoordinatedShutdown] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (CoordinatedShutdown, B)
- Implicit
- This member is added by an implicit conversion from CoordinatedShutdown to ArrowAssoc[CoordinatedShutdown] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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
makes it possible to de-register the hook. For example on actor system shutdown to avoid leaking references to the actor system in tests.Cancellable
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.
-
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
makes it possible to de-register the hook. For example on actor system shutdown to avoid leaking references to the actor system in tests.Cancellable
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()
-
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.
-
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.
-
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.
-
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.
- Annotations
- @tailrec()
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
def
ensuring(cond: (CoordinatedShutdown) ⇒ Boolean, msg: ⇒ Any): CoordinatedShutdown
- Implicit
- This member is added by an implicit conversion from CoordinatedShutdown to Ensuring[CoordinatedShutdown] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (CoordinatedShutdown) ⇒ Boolean): CoordinatedShutdown
- Implicit
- This member is added by an implicit conversion from CoordinatedShutdown to Ensuring[CoordinatedShutdown] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): CoordinatedShutdown
- Implicit
- This member is added by an implicit conversion from CoordinatedShutdown to Ensuring[CoordinatedShutdown] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): CoordinatedShutdown
- Implicit
- This member is added by an implicit conversion from CoordinatedShutdown to Ensuring[CoordinatedShutdown] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from CoordinatedShutdown to StringFormat[CoordinatedShutdown] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getShutdownReason(): Optional[Reason]
The
Reason
for the shutdown as passed to therun
method.The
Reason
for the shutdown as passed to therun
method.Optional.empty
if the shutdown has not been started. -
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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.
-
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.
-
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.
-
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.
-
def
shutdownReason(): Option[Reason]
The
Reason
for the shutdown as passed to therun
method.The
Reason
for the shutdown as passed to therun
method.None
if the shutdown has not been started. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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 actorask
requests is used as a task. -
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
totalTimeout(): FiniteDuration
Sum of timeouts of all phases that have some task.
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
→[B](y: B): (CoordinatedShutdown, B)
- Implicit
- This member is added by an implicit conversion from CoordinatedShutdown to ArrowAssoc[CoordinatedShutdown] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
- Deprecated
(Since version ) see corresponding Javadoc for more information.
-
def
run(fromPhase: Optional[String]): CompletionStage[Done]
- Annotations
- @deprecated
- Deprecated
(Since version 2.5.8) Use the method with
reason
parameter instead
-
def
run(fromPhase: Option[String]): Future[Done]
- Annotations
- @deprecated
- Deprecated
(Since version 2.5.8) Use the method with
reason
parameter instead
-
def
run(): Future[Done]
- Annotations
- @deprecated
- Deprecated
(Since version 2.5.8) Use the method with
reason
parameter instead
-
def
runAll(): CompletionStage[Done]
- Annotations
- @deprecated
- Deprecated
(Since version 2.5.8) Use the method with
reason
parameter instead