public class WorkflowThreadContext
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
evaluateInCoroutineContext(Functions.Proc1<java.lang.String> function)
Call function by the thread that owns this context and is currently blocked in a await.
|
void |
exit()
To be called only from a workflow thread.
|
java.lang.Thread |
getCurrentThread() |
io.temporal.internal.sync.Status |
getStatus() |
java.lang.Throwable |
getUnhandledException() |
java.lang.String |
getYieldReason() |
void |
initializeCurrentThread(java.lang.Thread currentThread) |
void |
initialYield() |
boolean |
isDestroyRequested() |
boolean |
isDone() |
boolean |
runUntilBlocked(long deadlockDetectionTimeout) |
void |
setStatus(io.temporal.internal.sync.Status status) |
void |
setUnhandledException(java.lang.Throwable unhandledException) |
void |
yield(java.lang.String reason,
java.util.function.Supplier<java.lang.Boolean> unblockFunction) |
public void initialYield()
public void yield(java.lang.String reason, java.util.function.Supplier<java.lang.Boolean> unblockFunction)
public void evaluateInCoroutineContext(Functions.Proc1<java.lang.String> function)
function
- to evaluate. Consumes reason for yielding parameter.public io.temporal.internal.sync.Status getStatus()
public void setStatus(io.temporal.internal.sync.Status status)
public boolean isDone()
public java.lang.Throwable getUnhandledException()
public void setUnhandledException(java.lang.Throwable unhandledException)
public java.lang.String getYieldReason()
public boolean runUntilBlocked(long deadlockDetectionTimeout)
deadlockDetectionTimeout
- public boolean isDestroyRequested()
public void destroy()
public void exit()
public void initializeCurrentThread(java.lang.Thread currentThread)
@Nullable public java.lang.Thread getCurrentThread()