All Packages Class Hierarchy This Package Previous Next Index
Class COM.ibm.beans.gauge.Timer
java.lang.Object
|
+----COM.ibm.beans.gauge.Timer
- public class Timer
- extends Object
- implements Serializable
Timer()
-
closeTimerSession(Object)
- Remove the key from the timer's open sessions list.
copyright()
-
elapsedTime(Object)
- Return the elapsed time counter for the timer session.
hasTimerSession(Object)
- Report whether a timer session has been opened for the
given key.
openTimerSession(Object)
- Register a timer session identified by the given key.
resetTimer(Object)
- Reset the elapsed time counter for the timer session
waitUntil(Object,
long)
- Wait until a given elapsed time from the last reset of
the timer session.
waitUntil(Object,
long, Object)
- Wait until a given elapsed time from the last reset of
the timer session, or until the monitor is notified,
whichever occurs sooner.
Timer
public Timer()
copyright
public static String copyright()
openTimerSession
public static void openTimerSession(Object key)
- Register a timer session identified by the given key. The
timer class maintains separate timer sessions for
different keys
- Parameters:
- key - an object to use as the key for a timer
session
- See Also:
- closeTimerSession
closeTimerSession
public static void closeTimerSession(Object key)
- Remove the key from the timer's open sessions list.
- Parameters:
- key - an object to use as the key for a timer
session
- See Also:
- openTimerSession
hasTimerSession
public static boolean hasTimerSession(Object key)
- Report whether a timer session has been opened for the
given key.
- Parameters:
- key - an object to be searched for in the open
session list
- Returns:
- whether a timer session has been opened for that
key
resetTimer
public static void resetTimer(Object key)
- Reset the elapsed time counter for the timer session
- Parameters:
- key - an object for which a timer session has
been opened
elapsedTime
public static long elapsedTime(Object key)
- Return the elapsed time counter for the timer session.
- Parameters:
- key - an object for which a timer session has
been opened
- Returns:
- elapsed time since last reset in milliseconds
waitUntil
public static boolean waitUntil(Object key,
long ms,
Object monitor) throws InterruptedException
- Wait until a given elapsed time from the last reset of
the timer session, or until the monitor is notified,
whichever occurs sooner. Once this method starts waiting,
it will not take account of any resets of the timer that
take place from other threads. When the waiting ends, the
timer is reset.
- Parameters:
- key - an object for which a timer session has
been opened
- ms - elapsed time to wait in milliseconds
- notifier - an object upon which to wait
- Returns:
- whether the specified interval fully expired
(false indicates the wait was terminated by a
notify)
- Throws: InterruptedException
- if interrupted
waitUntil
public static boolean waitUntil(Object key,
long ms) throws InterruptedException
- Wait until a given elapsed time from the last reset of
the timer session. Once this method starts waiting, it
will not take account of any resets of the timer that
take place from other threads. When the waiting ends, the
timer is reset.
- Parameters:
- key - an object for which a timer session has
been opened
- ms - elapsed time to wait in milliseconds
- Throws: InterruptedException
- if interrupted
All Packages Class Hierarchy This Package Previous Next Index
Copyright ©
Taligent, Inc. 1996 - 1997.
Copyright © IBM Corporation 1996 - 1997.
All Rights Reserved.