ePOST API

rice.selector
Class TimerTask

java.lang.Object
  extended by rice.selector.TimerTask
All Implemented Interfaces:
java.lang.Comparable, CancellableTask
Direct Known Subclasses:
PartitionHandler, ScheduledMessage, SocketCollectionManager.DeadChecker, SocketCollectionManager.MessageRetry

public abstract class TimerTask
extends java.lang.Object
implements java.lang.Comparable, CancellableTask

Author:
Jeff Hoye

Field Summary
protected  boolean cancelled
           
protected  boolean fixedRate
           
protected  long nextExecutionTime
           
protected  int period
          If period is positive, task will be rescheduled.
 
Constructor Summary
TimerTask()
           
 
Method Summary
 boolean cancel()
           
 int compareTo(java.lang.Object arg0)
           
 boolean execute(TimeSource ts)
          Returns true if should re-insert.
 boolean isCancelled()
           
abstract  void run()
           
 long scheduledExecutionTime()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextExecutionTime

protected long nextExecutionTime

cancelled

protected boolean cancelled

period

protected int period
If period is positive, task will be rescheduled.


fixedRate

protected boolean fixedRate
Constructor Detail

TimerTask

public TimerTask()
Method Detail

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 CancellableTask
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(java.lang.Object arg0)
Specified by:
compareTo in interface java.lang.Comparable

isCancelled

public boolean isCancelled()

ePOST API

Copyright © 2001-2005 - Rice Pastry.