sealed trait Closeable extends Scope
- Self Type
- Closeable
- Alphabetic
- By Inheritance
- Closeable
- Scope
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def addFinalizerExit(finalizer: (Exit[Any, Any]) => UIO[Any])(implicit trace: ZTraceElement): UIO[Unit]
Adds a finalizer to this scope.
Adds a finalizer to this scope. The finalizer is guaranteed to be run when the scope is closed.
- Definition Classes
- Scope
- abstract def close(exit: => Exit[Any, Any])(implicit trace: ZTraceElement): UIO[Unit]
Closes a scope with the specified exit value, running all finalizers that have been added to the scope.
- abstract def fork(implicit trace: ZTraceElement): UIO[Closeable]
Forks a new scope that is a child of this scope.
Forks a new scope that is a child of this scope. The child scope will automatically be closed when this scope is closed.
- Definition Classes
- Scope
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def addFinalizer(finalizer: => UIO[Any])(implicit trace: ZTraceElement): UIO[Unit]
A simplified version of
addFinalizerWithwhen thefinalizerdoes not depend on theExitvalue that the scope is closed with.A simplified version of
addFinalizerWithwhen thefinalizerdoes not depend on theExitvalue that the scope is closed with.- Definition Classes
- Scope
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def extend[R]: ExtendPartiallyApplied[R]
Extends the scope of a
ZIOworkflow that needs a scope into this scope by providing it to the workflow but not closing the scope when the workflow completes execution.Extends the scope of a
ZIOworkflow that needs a scope into this scope by providing it to the workflow but not closing the scope when the workflow completes execution. This allows extending a scoped value into a larger scope.- Definition Classes
- Scope
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def use[R]: UsePartiallyApplied[R]
Uses the scope by providing it to a
ZIOworkflow that needs a scope, guaranteeing that the scope is closed with the result of that workflow as soon as the workflow completes execution, whether by success, failure, or interruption. - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()