sealed trait HasLifeCycleScope extends Any
Parent trait for anything that needs to deal with LifeCycleScopes.
- Alphabetic
- By Inheritance
- HasLifeCycleScope
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final type ContextLifeCycleScope = LifeCycleScope[ContextLifeCycleScopeDiscriminator]
The type for LifeCycleScopes that have accumulated all LifeCycleManagers up to the caller of the most recent call into this HasLifeCycleScope instance.
The type for LifeCycleScopes that have accumulated all LifeCycleManagers up to the caller of the most recent call into this HasLifeCycleScope instance. It may not contain the manager of this instance.
Public methods should take this kind of LifeCycleScope.
- See also
OwnLifeCycleScope
- abstract type ContextLifeCycleScopeDiscriminator >: ContextLifeCycleScopeDiscriminatorLower <: ContextLifeCycleScopeDiscriminatorUpper
The discriminator that binds a context's LifeCycleScopes to an individual instance of HasLifeCycleScope.
The discriminator that binds a context's LifeCycleScopes to an individual instance of HasLifeCycleScope. It is deliberately left unspecified so that scalac cannot derive type equalities for the discriminator across different instances of HasLifeCycleScope.
The abstract upper bounds here and on OwnLifeCycleScopeDiscriminator ensure that we can distinguish ContextLifeCycleScopes from OwnLifeCycleScopes in implicit conversions such as augmentContextLifeCycleScope.
The upper and lower bounds together ensure that implementations cannot refine this type and OwnLifeCycleScopeDiscriminator so that scalac could derive a type equality between them. For without either of the bounds, scala.Any or scala.Nothing would be valid refinements.
- final type OwnLifeCycleScope = LifeCycleScope[OwnLifeCycleScopeDiscriminator]
The type for LifeCycleScopes that have accumulated all LifeCycleManagers up to and including this HasLifeCycleScope instance.
The type for LifeCycleScopes that have accumulated all LifeCycleManagers up to and including this HasLifeCycleScope instance.
Private and protected methods should take this kind of LifeCycleScope if they are meant to be called only from the same instance.
protected
because it rarely makes sense to use this type outside of this instance; other call sites have a hard time to ensure that this instance's LifeCycleManager has already been accumulated.Instances can only be produced by augmentOwnLifeCycleScope.
- Attributes
- protected
- See also
ContextLifeCycleScope
- abstract type OwnLifeCycleScopeDiscriminator >: OwnLifeCycleScopeDiscriminatorLower <: OwnLifeCycleScopeDiscriminatorUpper
The discriminator for an individual instance's own LifeCycleScope.
The discriminator for an individual instance's own LifeCycleScope. It is deliberately left unspecified so that scalac cannot derive type equalities for the discriminator across different instances of HasLifeCycleScope.
The abstract upper bounds here and on ContextLifeCycleScopeDiscriminator ensure that we can distinguish ContextLifeCycleScopes from OwnLifeCycleScopes in implicit conversions such as augmentOwnLifeCycleScope.
The upper and lower bounds together ensure that implementations cannot refine this type and OwnLifeCycleScopeDiscriminator so that scalac could derive a type equality between them. For without either of the bounds, scala.Any or scala.Nothing would be valid refinements.
- Attributes
- protected
Abstract Value Members
- implicit abstract def augmentContextLifeCycleScope[A >: ContextLifeCycleScopeDiscriminatorLower <: ContextLifeCycleScopeDiscriminatorUpper](implicit scope: ContextLifeCycleScope): LifeCycleScope[A]
Converts a ContextLifeCycleScope from this instance into a ContextLifeCycleScope of another instance of HasLifeCycleScope, possibly adding this HasLifeCycleScope's manager to the scope.
Converts a ContextLifeCycleScope from this instance into a ContextLifeCycleScope of another instance of HasLifeCycleScope, possibly adding this HasLifeCycleScope's manager to the scope.
- A
The HasLifeCycleScope.ContextLifeCycleScopeDiscriminator of the other instance. We cannot directly constrain to
A <: HasLifeCycleScope
because this would break implicit resolution in scalac. Instead, we use the bounds to ensure that the returned LifeCycleScope can only be used as a ContextLifeCycleScope. In particular, we must forbid that this method returns a scope of type HasLifeCycleScope.OwnLifeCycleScope for another instance of HasLifeCycleScope.
- Attributes
- protected[this]
- implicit abstract def augmentOwnLifeCycleScope(implicit scope: ContextLifeCycleScope): OwnLifeCycleScope
Converts this instance's ContextLifeCycleScope into its OwnLifeCycleScope, adding this instance's LifeCycleManager to the scope if necessary.
Converts this instance's ContextLifeCycleScope into its OwnLifeCycleScope, adding this instance's LifeCycleManager to the scope if necessary.
- Attributes
- protected[this]
- abstract def getClass(): Class[_ <: AnyRef]
- Definition Classes
- Any
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- implicit def coerceOwnLifeCycleScope[A >: ContextLifeCycleScopeDiscriminatorLower <: ContextLifeCycleScopeDiscriminatorUpper](implicit scope: OwnLifeCycleScope): LifeCycleScope[A]
Coerces the OwnLifeCycleScope into a ContextLifeCycleScope of any other instance.
Coerces the OwnLifeCycleScope into a ContextLifeCycleScope of any other instance.
- A
The HasLifeCycleScope.ContextLifeCycleScopeDiscriminator of the other instance. See augmentContextLifeCycleScope for a discussion of the bounds.
- Attributes
- protected[this]
- def equals(arg0: Any): Boolean
- Definition Classes
- Any
- final def freshLifeCycleScope: ContextLifeCycleScope
Creates a fresh LifeCycleScope without any managers in it.
Creates a fresh LifeCycleScope without any managers in it. This should be used when a new fiber of processing starts.
- Attributes
- protected
- def hashCode(): Int
- Definition Classes
- Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ownScope(implicit scope: OwnLifeCycleScope): HasSynchronizeWithClosing
LifeCycleScope does not expose the synchronization methods of
HasSynchronizeWithClosing
so that one cannot accidentally call them on a ContextLifeCycleScope.LifeCycleScope does not expose the synchronization methods of
HasSynchronizeWithClosing
so that one cannot accidentally call them on a ContextLifeCycleScope. This method opens up the own scope so that the synchronization methods can be used on them.- Attributes
- protected[this]
- Annotations
- @inline()
- def toString(): String
- Definition Classes
- Any