public class TestTimeServiceProvider extends TimeServiceProvider
TimeServiceProvider used strictly for testing the
processing time functionality.| Constructor and Description |
|---|
TestTimeServiceProvider() |
| Modifier and Type | Method and Description |
|---|---|
long |
getCurrentProcessingTime()
Returns the current processing time.
|
int |
getNoOfRegisteredTimers() |
ScheduledFuture<?> |
registerTimer(long timestamp,
Runnable target)
Registers a task to be executed when (processing) time is
timestamp. |
void |
setCurrentTime(long timestamp) |
void |
shutdownService()
Shuts down and clean up the timer service provider.
|
public void setCurrentTime(long timestamp)
public long getCurrentProcessingTime()
TimeServiceProvidergetCurrentProcessingTime in class TimeServiceProviderpublic ScheduledFuture<?> registerTimer(long timestamp, Runnable target)
TimeServiceProvidertimestamp.registerTimer in class TimeServiceProvidertimestamp - when the task is to be executed (in processing time)target - the task to be executedpublic int getNoOfRegisteredTimers()
public void shutdownService()
throws Exception
TimeServiceProvidershutdownService in class TimeServiceProviderExceptionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.