public class SimpleTimer extends Object
| Modifier and Type | Method and Description |
|---|---|
static SimpleTimer |
getInstance(AccumuloConfiguration conf)
Gets the timer instance.
|
static SimpleTimer |
getInstance(int threadPoolSize)
Gets the timer instance.
|
ScheduledFuture<?> |
schedule(Runnable task,
long delay)
Schedules a task to run in the future.
|
ScheduledFuture<?> |
schedule(Runnable task,
long delay,
long period)
Schedules a task to run in the future with a fixed delay between repeated executions.
|
public static SimpleTimer getInstance(int threadPoolSize)
threadPoolSize - number of threadspublic static SimpleTimer getInstance(AccumuloConfiguration conf)
conf - configuration from which to get the number of threadsProperty.GENERAL_SIMPLETIMER_THREADPOOL_SIZEpublic ScheduledFuture<?> schedule(Runnable task, long delay)
task - task to rundelay - number of milliseconds to wait before executionpublic ScheduledFuture<?> schedule(Runnable task, long delay, long period)
task - task to rundelay - number of milliseconds to wait before first executionperiod - number of milliseconds to wait between executionsCopyright © 2011–2017 The Apache Software Foundation. All rights reserved.