public class InterruptionTokenSource
extends java.lang.Object
Represents the source of InterruptionToken
.
Constructor and Description |
---|
InterruptionTokenSource()
Creates a new
InterruptionTokenSource . |
Modifier and Type | Method and Description |
---|---|
InterruptionToken |
getToken()
Returns new token binded to this
InterruptionTokenSource . |
void |
interrupt()
Initialize request for interruption.
|
boolean |
isInterruptionRequested()
Returns true if interruption requested, false otherwise.
|
public InterruptionTokenSource()
Creates a new InterruptionTokenSource
.
public final InterruptionToken getToken()
Returns new token binded to this InterruptionTokenSource
.
public final boolean isInterruptionRequested()
Returns true if interruption requested, false otherwise.
public final void interrupt()
Initialize request for interruption.