Package org.apache.storm.utils
Class TimeCacheMap<K,V>
java.lang.Object
org.apache.storm.utils.TimeCacheMap<K,V>
Deprecated.
Expires keys that have not been updated in the configured number of seconds. The algorithm used will take between expirationSecs and
expirationSecs * (1 + 1 / (numBuckets-1)) to actually expire the message.
get, put, remove, containsKey, and size take O(numBuckets) time to run.
The advantage of this design is that the expiration thread only locks the object for O(1) time, meaning the object is essentially always available for gets/puts.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionTimeCacheMap
(int expirationSecs) Deprecated.TimeCacheMap
(int expirationSecs, int numBuckets) Deprecated.TimeCacheMap
(int expirationSecs, int numBuckets, TimeCacheMap.ExpiredCallback<K, V> callback) Deprecated.TimeCacheMap
(int expirationSecs, TimeCacheMap.ExpiredCallback<K, V> callback) Deprecated. -
Method Summary
-
Constructor Details
-
TimeCacheMap
Deprecated. -
TimeCacheMap
Deprecated. -
TimeCacheMap
public TimeCacheMap(int expirationSecs) Deprecated. -
TimeCacheMap
public TimeCacheMap(int expirationSecs, int numBuckets) Deprecated.
-
-
Method Details
-
containsKey
Deprecated. -
get
Deprecated. -
put
Deprecated. -
remove
Deprecated. -
size
public int size()Deprecated. -
cleanup
public void cleanup()Deprecated.
-