public static interface DocumentFactory.CancellationToken
Cancel Templater processing.
Templater will often check if isCanceled() returns true in which case it will stop further processing
by raising cancellation exception
Modifier and Type | Field and Description |
---|---|
static DocumentFactory.CancellationToken |
NONE
Cancellation token which will never cancel processing
|
Modifier and Type | Method and Description |
---|---|
static DocumentFactory.CancellationToken |
forThread(java.lang.Thread thread)
Create cancellation token from the status of Thread.isInterrupted()
|
boolean |
isCanceled()
Templater will check state of this method in various places and abort further processing
when true is returned
|
default void |
throwIfCancellationRequested()
Throw
cancellation exception if token has been canceled |
static final DocumentFactory.CancellationToken NONE
static DocumentFactory.CancellationToken forThread(java.lang.Thread thread)
thread
- thread to checkboolean isCanceled()
default void throwIfCancellationRequested()
cancellation exception
if token has been canceled