Package com.uber.cadence.internal.replay
Interface ReplayWorkflow
-
public interface ReplayWorkflow
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancel(java.lang.String reason)
void
close()
boolean
eventLoop()
long
getNextWakeUpTime()
byte[]
getOutput()
WorkflowImplementationOptions
getWorkflowImplementationOptions()
void
handleSignal(java.lang.String signalName, byte[] input, long eventId)
Handle an external signal event.WorkflowExecutionException
mapError(java.lang.Error failure)
WorkflowExecutionException
mapUnexpectedException(java.lang.Exception failure)
Convert exception that happened in the framework code to the format that ReplayWorkflow implementation understands.byte[]
query(WorkflowQuery query)
Called after all history is replayed and workflow cannot make any progress if decision task is a query.void
start(HistoryEvent event, DecisionContext context)
-
-
-
Method Detail
-
start
void start(HistoryEvent event, DecisionContext context)
-
handleSignal
void handleSignal(java.lang.String signalName, byte[] input, long eventId)
Handle an external signal event.
-
eventLoop
boolean eventLoop() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getOutput
byte[] getOutput()
- Returns:
- null means no output yet
-
cancel
void cancel(java.lang.String reason)
-
close
void close()
-
getNextWakeUpTime
long getNextWakeUpTime()
- Returns:
- time at which workflow can make progress. For example when
Workflow.sleep(long)
expires.
-
query
byte[] query(WorkflowQuery query)
Called after all history is replayed and workflow cannot make any progress if decision task is a query.- Parameters:
query
-
-
mapUnexpectedException
WorkflowExecutionException mapUnexpectedException(java.lang.Exception failure)
Convert exception that happened in the framework code to the format that ReplayWorkflow implementation understands. The framework code is not aware of DataConverter so this is working around this layering.- Parameters:
failure
- Unexpected failure cause- Returns:
- Serialized failure
-
mapError
WorkflowExecutionException mapError(java.lang.Error failure)
-
getWorkflowImplementationOptions
WorkflowImplementationOptions getWorkflowImplementationOptions()
-
-