|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable
com.perforce.api.HashDecay
public final class HashDecay
This hashtable build to contain objects that will decay over time. The objects stored must implement the Cacheable interface.
Hashtable,
Cacheable,
Serialized Form| Field Summary | |
|---|---|
static long |
MIN_DELAY
The minimum delay allowed |
| Constructor Summary | |
|---|---|
HashDecay()
|
|
HashDecay(long delay)
|
|
| Method Summary | |
|---|---|
long |
getDelay()
Returns the delay. |
java.lang.Object |
put(java.lang.Object key,
Cacheable value)
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
run()
|
void |
setDelay(long delay)
Sets the delay, in milliseconds, before items in the hashtable are discarded. |
void |
start()
|
void |
stop()
|
static void |
stopAll()
Stops running threads for all HashDecay instances. |
| 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 |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long MIN_DELAY
| Constructor Detail |
|---|
public HashDecay()
public HashDecay(long delay)
| Method Detail |
|---|
public void setDelay(long delay)
public long getDelay()
public void run()
run in interface java.lang.Runnable
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface java.util.Mapput in class java.util.Hashtable
public java.lang.Object put(java.lang.Object key,
Cacheable value)
public void start()
public void stop()
public static void stopAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||