Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ikayaki.util.LastExecutor.RunDelayed Class Reference

List of all members.

Public Member Functions

 RunDelayed (Runnable runnable, int delayMillis)
long getDelay (TimeUnit unit)
Runnable getRunnable ()
int compareTo (Delayed delayed)

Private Attributes

long expires
Runnable runnable

Detailed Description

Wraps a Runnable object and sets the delay after which it should be executed by a worker thread.

Author:
Esko Luontola

Definition at line 223 of file LastExecutor.java.


Constructor & Destructor Documentation

ikayaki.util.LastExecutor.RunDelayed.RunDelayed Runnable  runnable,
int  delayMillis
 

Creates a new RunDelayed item that contains runnable.

Parameters:
runnable the Runnable to be contained
delayMillis delay in milliseconds

Definition at line 241 of file LastExecutor.java.

References ikayaki.util.LastExecutor.RunDelayed.expires, and ikayaki.util.LastExecutor.RunDelayed.runnable.


Member Function Documentation

int ikayaki.util.LastExecutor.RunDelayed.compareTo Delayed  delayed  ) 
 

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Parameters:
delayed the Delayed to be compared.
Returns:
a negative integer, zero, or a positive integer as this delay is less than, equal to, or greater than the specified delay.

Definition at line 273 of file LastExecutor.java.

References ikayaki.util.LastExecutor.RunDelayed.getDelay().

Here is the call graph for this function:

long ikayaki.util.LastExecutor.RunDelayed.getDelay TimeUnit  unit  ) 
 

Returns the remaining delay associated with this object, always in milliseconds.

Parameters:
unit ignored; always assumed TimeUnit.MILLISECONDS
Returns:
the remaining delay; zero or negative values indicate that the delay has already elapsed

Definition at line 252 of file LastExecutor.java.

References ikayaki.util.LastExecutor.RunDelayed.expires.

Referenced by ikayaki.util.LastExecutor.RunDelayed.compareTo().

Runnable ikayaki.util.LastExecutor.RunDelayed.getRunnable  ) 
 

Returns the contained Runnable.

Returns:
the Runnable given as constructor parameter

Definition at line 261 of file LastExecutor.java.

References ikayaki.util.LastExecutor.RunDelayed.runnable.

Referenced by ikayaki.util.LastExecutor.LastExecutorThread.run().


Member Data Documentation

long ikayaki.util.LastExecutor.RunDelayed.expires [private]
 

The point in time when this RunDelayed will expire.

Definition at line 228 of file LastExecutor.java.

Referenced by ikayaki.util.LastExecutor.RunDelayed.getDelay(), and ikayaki.util.LastExecutor.RunDelayed.RunDelayed().

Runnable ikayaki.util.LastExecutor.RunDelayed.runnable [private]
 

Contained Runnable object to be run after this RunDelayed has expired.

Definition at line 233 of file LastExecutor.java.

Referenced by ikayaki.util.LastExecutor.RunDelayed.getRunnable(), and ikayaki.util.LastExecutor.RunDelayed.RunDelayed().


The documentation for this class was generated from the following file:
Generated on Fri May 6 16:01:34 2005 for Squid by  doxygen 1.4.1