CancellationToken

Inheritance: java.lang.Object

public final class CancellationToken

Propagates notification that an operation should be canceled.

Fields

Field Description
NONE A token that is never canceled.

Methods

Method Description
isCancellationRequested()
throwIfCancellationRequested() Throws CancellationException if cancellation has been requested.

NONE

public static final CancellationToken NONE

A token that is never canceled.

isCancellationRequested()

public boolean isCancellationRequested()

Returns: boolean

throwIfCancellationRequested()

public void throwIfCancellationRequested()

Throws CancellationException if cancellation has been requested.