public abstract class AsyncScope extends Object implements Cancelable
Constructor and Description |
---|
AsyncScope() |
AsyncScope(boolean disableAsyncStackTrace,
boolean excludeAsyncScopeStack) |
Modifier and Type | Method and Description |
---|---|
void |
cancel(Throwable cause) |
boolean |
eventLoop()
Execute all queued tasks.
|
List<AsyncTaskInfo> |
getAsynchronousThreadDump() |
String |
getAsynchronousThreadDumpAsString() |
Throwable |
getFailure() |
boolean |
isCancelRequested() |
boolean |
isComplete() |
public AsyncScope()
public AsyncScope(boolean disableAsyncStackTrace, boolean excludeAsyncScopeStack)
public void cancel(Throwable cause)
cancel
in interface Cancelable
public boolean isCancelRequested()
isCancelRequested
in interface Cancelable
public List<AsyncTaskInfo> getAsynchronousThreadDump()
public String getAsynchronousThreadDumpAsString()
public boolean eventLoop() throws Throwable
Unless there are external dependencies or bugs single call to this method performs the complete asynchronous execution.
In presence of external dependencies it is expected that
eventLoop()
is called every time after change in their state
can unblock the asynchronous execution.
Throwable
public boolean isComplete()
public Throwable getFailure()