InterruptionTokenSource

Inheritance: java.lang.Object

public class InterruptionTokenSource

Represents the source of InterruptionToken.

Constructors

ConstructorDescription
InterruptionTokenSource()Creates a new InterruptionTokenSource.

Methods

MethodDescription
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.