public class AsyncEntry extends Entry
| Modifier and Type | Field and Description |
|---|---|
protected ProcessorSlot<Object> |
chain |
protected Entry |
child |
protected Context |
context |
protected LinkedList<BiConsumer<Context,Entry>> |
exitHandlers |
protected Entry |
parent |
resourceWrapper| Modifier and Type | Method and Description |
|---|---|
protected void |
clearEntryContext() |
void |
exit(int count,
Object... args)
Exit this entry.
|
protected void |
exitForContext(Context context,
int count,
Object... args) |
Context |
getAsyncContext() |
Node |
getLastNode()
|
protected Entry |
trueExit(int count,
Object... args)
Exit this entry.
|
void |
whenTerminate(BiConsumer<Context,Entry> handler)
Like
CompletableFuture since JDK 8, it guarantees specified handler
is invoked when this entry terminated (exited), no matter it's blocked or permitted. |
close, exit, exit, getBlockError, getCompleteTimestamp, getCreateTimestamp, getCurNode, getError, getOriginNode, getResourceWrapper, setBlockError, setCompleteTimestamp, setCurNode, setError, setOriginNodeprotected Entry parent
protected Entry child
protected ProcessorSlot<Object> chain
protected Context context
protected LinkedList<BiConsumer<Context,Entry>> exitHandlers
public Context getAsyncContext()
protected void clearEntryContext()
protected Entry trueExit(int count, Object... args) throws ErrorEntryFreeException
Entrycount - tokens to release.args - extra parametersErrorEntryFreeExceptionpublic void exit(int count,
Object... args)
throws ErrorEntryFreeException
Entryexit in class Entrycount - tokens to release.args - extra parametersErrorEntryFreeExceptionprotected void exitForContext(Context context, int count, Object... args) throws ErrorEntryFreeException
ErrorEntryFreeExceptionpublic void whenTerminate(BiConsumer<Context,Entry> handler)
EntryCompletableFuture since JDK 8, it guarantees specified handler
is invoked when this entry terminated (exited), no matter it's blocked or permitted.
Use it when you did some STATEFUL operations on entries.whenTerminate in class Entryhandler - handler function on the invocation terminatespublic Node getLastNode()
EntrygetLastNode in class EntryCopyright © 2021 Alibaba Group. All rights reserved.