final class ZCancellationScope extends AnyRef
Handle to a cancellation scope created through ZWorkflow.newCancellationScope or ZWorkflow.newDetachedCancellationScope. Supports explicit cancelling of the code a cancellation scope wraps. The code in the CancellationScope has to be executed using run method.
- Alphabetic
- By Inheritance
- ZCancellationScope
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cancel(reason: String): Unit
Cancels the scope as well as all its children.
Cancels the scope as well as all its children.
- reason
human readable reason for the cancellation. Becomes message of the CanceledException thrown.
- def cancel(): Unit
Cancels the scope as well as all its children
- def cancellationReason: Option[String]
Returns cancellation reason if was specified
Returns cancellation reason if was specified
- returns
optional cancellation reason
- def cancellationRequest: ZAsync[String]
Use this promise to perform cancellation of async operations.
Use this promise to perform cancellation of async operations.
- returns
promise that becomes ready when scope is canceled. It contains reason value or null if none was provided.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def isCancelRequested: Boolean
Is scope was asked to cancel through cancel or by a parent scope.
Is scope was asked to cancel through cancel or by a parent scope.
- returns
whether request is canceled or not.
- def isDetached: Boolean
When set to false parent thread cancellation causes this one to get canceled automatically.
When set to false parent thread cancellation causes this one to get canceled automatically. When set to true only call to cancel() leads to this scope cancellation.
- 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
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def run(): Unit
Executes the code specified in this cancellation scope
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val toJava: CancellationScope
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)