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 WorkflowClockDecisionTask start event of the decision
being processed or replayed.public void setCurrentTimeMillis(long timeMillis)
public boolean isReplaying()
WorkflowClocktrue 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 WorkflowClockpublic Promise<Void> createTimer(long delaySeconds)
WorkflowClockcreateTimer in interface WorkflowClockpublic <T> Promise<T> createTimer(long delaySeconds, T context)
WorkflowClockcreateTimer in interface WorkflowClockcontext - 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 © 2016. All rights reserved.