public abstract class TimerHeap<V> extends Object
| Constructor and Description |
|---|
TimerHeap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAbsolute(V timed,
long time,
TimeUnit timeUnit) |
void |
addRelative(V timed,
long delay,
TimeUnit timeUnit) |
protected abstract void |
execute(V ready)
Subclass must override this to execute ready timers
|
void |
executeReadyTimers()
Executes ready timers.
|
int |
size() |
long |
timeToNext(TimeUnit unit)
Returns the time of the next scheduled event.
|
public int size()
public final long timeToNext(TimeUnit unit)
public final void executeReadyTimers()
protected abstract void execute(V ready)
ready - The ready operation.Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.