rice.selector
Class TimerTask
java.lang.Object
rice.selector.TimerTask
- All Implemented Interfaces:
- java.lang.Comparable<TimerTask>, Cancellable, CancellableTask
- Direct Known Subclasses:
- DeliveryTimerTask, DirectTimerTask, LivenessTransportLayerImpl.DeadChecker, MagicNumberTransportLayer.VerifyHeaderReceiver, PartitionHandler, ScheduledMessage, TimerWeakHashMap.HardLinkTimerTask
public abstract class TimerTask
- extends java.lang.Object
- implements java.lang.Comparable<TimerTask>, CancellableTask
- Author:
- Jeff Hoye
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cancelled
protected boolean cancelled
seq
protected int seq
selector
protected SelectorManager selector
period
protected int period
- If period is positive, task will be rescheduled.
fixedRate
protected boolean fixedRate
TimerTask
public TimerTask()
run
public abstract void run()
- Specified by:
run
in interface CancellableTask
execute
public boolean execute(TimeSource ts)
- Returns true if should re-insert.
- Returns:
cancel
public boolean cancel()
- Specified by:
cancel
in interface Cancellable
- Returns:
- true if it was cancelled, false if it was already complete, or cancelled.
scheduledExecutionTime
public long scheduledExecutionTime()
- Specified by:
scheduledExecutionTime
in interface CancellableTask
compareTo
public int compareTo(TimerTask arg0)
- Specified by:
compareTo
in interface java.lang.Comparable<TimerTask>
isCancelled
public boolean isCancelled()
setSelectorManager
public void setSelectorManager(SelectorManager selector)
- Makes the cancel operation remove the task from the queue as well.
- Parameters:
timerQueue
- that we are enqueued on
setNextExecutionTime
protected void setNextExecutionTime(long l)
Copyright © 2001-2005 - Rice Pastry.