All Packages Class Hierarchy This Package Previous Next Index
Class ORG.opengroup.misc.Cache
java.lang.Object
|
+----java.lang.Thread
|
+----ORG.opengroup.misc.Cache
- public class Cache
- extends Thread
This object is used for timing purposes. It keeps a list of
the objects to be times
Cache(long, int)
-
add(Cachable)
- Adds the object which needs a timer to the Cache
getEntries()
- Return the current number of entries of the cache.
getTime()
- Returns the current time
remove(Cachable)
- Removes an object which needs a timer
reschedule(Cachable)
- Reschedules an object which needs a timer
run()
- Performs timing operations
Cache
public Cache(long granularity,
int extent)
- Parameters:
- granularity - length of sleep of Cache.
- extend - size of Cache array.
getTime
public long getTime()
- Returns the current time
run
public void run()
- Performs timing operations
- Overrides:
- run in class Thread
add
public void add(Cachable c)
- Adds the object which needs a timer to the Cache
- Parameters:
- c - the object to be timed
reschedule
public void reschedule(Cachable c)
- Reschedules an object which needs a timer
- Parameters:
- c - the object to be timed
remove
public void remove(Cachable c)
- Removes an object which needs a timer
- Parameters:
- c - the Cachable object to be removed
getEntries
public int getEntries()
- Return the current number of entries of the cache. Even though
the entries is maintained in the Cache object, it is up to the
object that adds/removes entries to act upon this information.
All Packages Class Hierarchy This Package Previous Next Index