public interface TimeService
| Modifier and Type | Method and Description |
|---|---|
void |
advanceBy(long timeAdvance,
TimeUnit timeUnit)
Advances the service time by a certain number of time units in the future.
|
void |
advanceTo(long targetTimeMsec)
Make the service advance to a specific time in the future
|
Timestamp |
getFutureTimestamp(long targetAdvance,
TimeUnit timeUnit)
Get the time stamp of a time point based on the specific time advance
|
long |
getTargetTime()
Get the current time in milliseconds from the perspective of this time service
|
long getTargetTime()
void advanceBy(long timeAdvance,
TimeUnit timeUnit)
throws StreamBaseException
timeAdvance - number of time units that the service should advance by. It should be a positive long valuetimeUnit - time unitStreamBaseExceptionvoid advanceTo(long targetTimeMsec)
throws StreamBaseException
targetTimeMsec - Time to advance to. It must be greater than the service's current timeStreamBaseExceptionTimestamp getFutureTimestamp(long targetAdvance, TimeUnit timeUnit)
targetAdvance - time difference (in time units) between the future time point and the service's current time
It must be 0 or a positive valuetimeUnit - time unitCopyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.