public class TestWorkflowClock extends Object implements WorkflowClock
Constructor and Description |
---|
TestWorkflowClock() |
Modifier and Type | Method and Description |
---|---|
void |
advanceMilliseconds(long milliseconds) |
void |
advanceSeconds(long seconds) |
Promise<Void> |
createTimer(long delaySeconds)
Create a Value that becomes ready after the specified delay.
|
<T> Promise<T> |
createTimer(long delaySeconds,
T context)
Create a Value that becomes ready after the specified delay.
|
long |
currentTimeMillis() |
Long |
fireTimers() |
boolean |
isReplaying()
true indicates if workflow is replaying already processed
events to reconstruct it state. |
void |
setCurrentTimeMillis(long timeMillis) |
public long currentTimeMillis()
currentTimeMillis
in interface WorkflowClock
DecisionTask
start event of the decision
being processed or replayed.public void setCurrentTimeMillis(long timeMillis)
public boolean isReplaying()
WorkflowClock
true
indicates if workflow is replaying already processed
events to reconstruct it state. false
indicates that code is
making forward process for the first time. For example can be used to
avoid duplicating log records due to replay.isReplaying
in interface WorkflowClock
public Promise<Void> createTimer(long delaySeconds)
WorkflowClock
createTimer
in interface WorkflowClock
public <T> Promise<T> createTimer(long delaySeconds, T context)
WorkflowClock
createTimer
in interface WorkflowClock
context
- context object that is returned inside the value when it
becomes ready.public Long fireTimers()
public void advanceSeconds(long seconds)
public void advanceMilliseconds(long milliseconds)
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.