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