com.caucho.util
Class AlarmClock

java.lang.Object
  extended by com.caucho.util.AlarmClock

public class AlarmClock
extends java.lang.Object

The alarm class provides a lightweight event scheduler. This allows an objects to schedule a timeout without creating a new thread.

A separate thread periodically tests the queue for alarms ready.


Constructor Summary
AlarmClock()
           
 
Method Summary
 long extractAlarm(long now, boolean isTest)
          Returns the next alarm ready to run
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlarmClock

public AlarmClock()
Method Detail

extractAlarm

public long extractAlarm(long now,
                         boolean isTest)
Returns the next alarm ready to run


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object