public interface TimingProvider
| Modifier and Type | Method and Description |
|---|---|
long |
convertToClusterTime(long timestamp)
Converts a local timestamp to cluster time.
|
void |
initialize(long clusterTimeOffset,
boolean isTimeSyncSupported)
Initialize timing provider with cluster time offset.
|
boolean |
isTimeSyncSupported()
Returns whether time sync is supported or not
|
long |
provideTimestampInMilliseconds()
Provide the current timestamp in milliseconds.
|
void |
sleep(long milliseconds)
Sleep given amount of milliseconds.
|
long provideTimestampInMilliseconds()
void sleep(long milliseconds)
throws java.lang.InterruptedException
java.lang.InterruptedException - When the sleep call gets interrupted.void initialize(long clusterTimeOffset,
boolean isTimeSyncSupported)
false is provided
for isTimeSyncSupported, the cluster offset is set to 0.clusterTimeOffset - isTimeSyncSupported - boolean isTimeSyncSupported()
true if time sync is supported otherwise falselong convertToClusterTime(long timestamp)
timestamp - Timestamp in local time