Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.selector
Class TimerTask

    java.lang.Object
      rice.selector.TimerTask

All Implemented Interfaces:
  java.lang.Comparable, 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, CancellableTask

Author:
  Jeff Hoye

Field Summary
`protected boolean` | `cancelled`
`protected boolean` | `fixedRate`
`protected int` | `period` If period is positive, task will be rescheduled.
`protected SelectorManager` | `selector`
`protected int` | `seq`

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()`
`protected void` | `setNextExecutionTime(long l)`
`void` | `setSelectorManager(SelectorManager selector)` Makes the cancel operation remove the task from the queue as well.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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

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 `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(java.lang.Object arg0)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.