public class StoppedDefaultTimestampStrategy extends DefaultTimestampStrategy
TimestampStrategy that always returns
the same timestamp, simulating a stopped wall clock.
This strategy was created to substitute the strategy
DefaultTimestampStrategy in test cases.
It's useful for tests only.| Modifier and Type | Field and Description |
|---|---|
protected static Clock |
stoppedClock |
COUNTER_MAX, COUNTER_MIN, timestampMAX_VALUE, MIN_VALUE, value| Constructor and Description |
|---|
StoppedDefaultTimestampStrategy() |
| Modifier and Type | Method and Description |
|---|---|
long |
getTimestamp() |
getNextForTimestampprotected static final Clock stoppedClock
public long getTimestamp()
getTimestamp in interface TimestampStrategygetTimestamp in class DefaultTimestampStrategyCopyright © 2019. All rights reserved.