com.amazonaws.services.simpleworkflow.flow.test
Class TestWorkflowClock
java.lang.Object
com.amazonaws.services.simpleworkflow.flow.test.TestWorkflowClock
- All Implemented Interfaces:
- WorkflowClock
public class TestWorkflowClock
- extends Object
- implements WorkflowClock
TestWorkflowClock
public TestWorkflowClock()
currentTimeMillis
public long currentTimeMillis()
- Specified by:
currentTimeMillis
in interface WorkflowClock
- Returns:
- time of the
DecisionTask
start event of the decision
being processed or replayed.
setCurrentTimeMillis
public void setCurrentTimeMillis(long timeMillis)
isReplaying
public boolean isReplaying()
- Description copied from interface:
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.
- Specified by:
isReplaying
in interface WorkflowClock
createTimer
public Promise<Void> createTimer(long delaySeconds)
- Description copied from interface:
WorkflowClock
- Create a Value that becomes ready after the specified delay.
- Specified by:
createTimer
in interface WorkflowClock
- Returns:
- Promise that becomes ready after the specified delay.
createTimer
public <T> Promise<T> createTimer(long delaySeconds,
T context)
- Description copied from interface:
WorkflowClock
- Create a Value that becomes ready after the specified delay.
- Specified by:
createTimer
in interface WorkflowClock
context
- context object that is returned inside the value when it
becomes ready.
- Returns:
- Promise that becomes ready after the specified delay. When ready
it contains value passed as context parameter.
fireTimers
public Long fireTimers()
advanceSeconds
public void advanceSeconds(long seconds)
advanceMilliseconds
public void advanceMilliseconds(long milliseconds)
Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.