com.perforce.api
Class HashDecay
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
|
+--com.perforce.api.HashDecay
- All Implemented Interfaces:
- Cloneable, Map, Runnable, Serializable
- public final class HashDecay
- extends Hashtable
- implements Runnable
This hashtable build to contain objects that will decay over time. The
objects stored must implement the Cacheable interface.
- Version:
- $Date: 2002/08/05 $ $Revision: #7 $
- Author:
- David Markley
- See Also:
Hashtable
,
Cacheable
, Serialized Form
Field Summary |
static long |
MIN_DELAY
The minimum delay allowed |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, putAll, rehash, remove, size, toString, values |
MIN_DELAY
public static final long MIN_DELAY
- The minimum delay allowed
HashDecay
public HashDecay()
HashDecay
public HashDecay(long delay)
getDelay
public long getDelay()
- Returns the delay.
put
public Object put(Object key,
Cacheable value)
put
public Object put(Object key,
Object value)
- Overrides:
put
in class Hashtable
run
public void run()
- Specified by:
run
in interface Runnable
setDelay
public void setDelay(long delay)
- Sets the delay, in milliseconds, before items in the hashtable are
discarded.
start
public void start()
stop
public void stop()
stopAll
public static void stopAll()
- Stops running threads for all HashDecay instances.
Copyright © 2001, Perforce Software, All rights reserved.