package lifecycle
- Alphabetic
- By Inheritance
- lifecycle
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class AsyncCloseable extends AsyncOrSyncCloseable
- trait AsyncOrSyncCloseable extends AutoCloseable
- abstract class CancellationException extends RuntimeException
- final case class CloseContext(flagCloseable: FlagCloseable) extends Product with Serializable
Context to capture and pass through a caller's closing state.
Context to capture and pass through a caller's closing state.
This allows us for example to stop operations down the call graph if either the caller or the current component executing an operation is closed.
- class ClosedCancellationException extends CancellationException
An operation has been cancelled due to shutdown/closing of a component.
- trait FlagCloseable extends AutoCloseable
Provides a way to synchronize closing with other running tasks in the class, such that new tasks aren't scheduled while closing, and such that closing waits for the scheduled tasks.
Provides a way to synchronize closing with other running tasks in the class, such that new tasks aren't scheduled while closing, and such that closing waits for the scheduled tasks.
The component's custom shutdown behaviour should override the
onClosed
method. - trait FlagCloseableAsync extends FlagCloseable
AutoCloseableAsync eases the proper closing of futures.
- type FutureUnlessShutdown[+A] = lifecycle.FutureUnlessShutdownImpl.FutureUnlessShutdown[A]
The monad combination of scala.concurrent.Future with UnlessShutdown as an abstract type
The monad combination of scala.concurrent.Future with UnlessShutdown as an abstract type
- See also
FutureUnlessShutdownSig.Ops for extension methods on the abstract type
- sealed abstract class FutureUnlessShutdownImpl extends AnyRef
Monad combination of
Future
and UnlessShutdownMonad combination of
Future
and UnlessShutdownWe avoid wrapping and unwrapping it by emulating Scala 3's opaque types. This makes the asynchronous detection magic work out of the box for FutureUnlessShutdown because
FutureUnlessShutdown(x).isInstanceOf[Future]
holds at runtime. - trait HasCloseContext extends AnyRef
Mix-in to obtain a CloseContext implicit based on the class's FlagCloseable
- class PromiseUnlessShutdown[A] extends Promise[UnlessShutdown[A]] with RunOnShutdown
A wrapper for Promise that provides supervision of uncompleted promise's futures and aborting a promise due to shutdown
- trait RunOnShutdown extends AnyRef
Trait that can be registered with a [FlagCloseable] to run on shutdown
- class ShutdownFailedException extends RuntimeException
- trait StartAndCloseable[A] extends FlagCloseableAsync
Trait to cleanly manage concurrent start and close operations
Trait to cleanly manage concurrent start and close operations
This trait will help to manage start / close processes by delaying the close operation until a start operation has succeeded and by not executing a start operation during a shutdown
- class SyncCloseable extends AsyncOrSyncCloseable
- sealed trait UnlessShutdown[+A] extends Product with Serializable
The outcome of a computation (UnlessShutdown.Outcome) unless the computation has aborted due to a shutdown (UnlessShutdown.AbortedDueToShutdown).
The outcome of a computation (UnlessShutdown.Outcome) unless the computation has aborted due to a shutdown (UnlessShutdown.AbortedDueToShutdown).
A copy of scala.Option. We use a separate class to document the purpose.
- A
The type of the outcome.
Value Members
- object AsyncCloseable
- object CloseContext extends Serializable
- object ClosingException
Helper to pattern match for exceptions that may happen during shutdown/closing.
- object FlagCloseable
- object FutureUnlessShutdown
- object FutureUnlessShutdownImpl
- object Lifecycle extends NoTracing
Utilities for working with instances that support our lifecycle pattern.
- object StartAndCloseable
- object SyncCloseable
- object UnlessShutdown extends Serializable