Packages

package lifecycle

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. lifecycle
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class AsyncCloseable extends AsyncOrSyncCloseable
  2. trait AsyncOrSyncCloseable extends AutoCloseable
  3. abstract class CancellationException extends RuntimeException
  4. 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.

  5. class ClosedCancellationException extends CancellationException

    An operation has been cancelled due to shutdown/closing of a component.

  6. 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.

  7. trait FlagCloseableAsync extends FlagCloseable

    AutoCloseableAsync eases the proper closing of futures.

  8. 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

  9. sealed abstract class FutureUnlessShutdownImpl extends AnyRef

    Monad combination of Future and UnlessShutdown

    Monad combination of Future and UnlessShutdown

    We 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.

  10. trait HasCloseContext extends AnyRef

    Mix-in to obtain a CloseContext implicit based on the class's FlagCloseable

  11. 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

  12. trait RunOnShutdown extends AnyRef

    Trait that can be registered with a [FlagCloseable] to run on shutdown

  13. class ShutdownFailedException extends RuntimeException
  14. 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

  15. class SyncCloseable extends AsyncOrSyncCloseable
  16. 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

  1. object AsyncCloseable
  2. object CloseContext extends Serializable
  3. object ClosingException

    Helper to pattern match for exceptions that may happen during shutdown/closing.

  4. object FlagCloseable
  5. object FutureUnlessShutdown
  6. object FutureUnlessShutdownImpl
  7. object Lifecycle extends NoTracing

    Utilities for working with instances that support our lifecycle pattern.

  8. object StartAndCloseable
  9. object SyncCloseable
  10. object UnlessShutdown extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped