public class CancelableVolatile extends java.lang.Object implements Cancelable
Cancelable
implementation that can be used to
synchronize a cancel request between threads without locking.Constructor and Description |
---|
CancelableVolatile() |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Try to cancel the unit of work.
|
boolean |
isCanceled()
Returns if the unit of work was canceled.
|
public final void cancel()
cancel
in interface Cancelable
public final boolean isCanceled()
isCanceled
in interface Cancelable
true
else false
.