| java.lang.Object org.apache.mina.util.ExpiringMap
ExpiringMap | public class ExpiringMap implements Map<K, V>(Code) | | A map with expiration. This class contains a worker thread that will
periodically check this class in order to determine if any objects
should be removed based on the provided time-to-live value.
author: The Apache MINA Project (dev@mina.apache.org) version: $Rev: 602315 $, $Date: 2007-12-07 21:07:26 -0700 (Fri, 07 Dec 2007) $ |
Inner Class :public class Expirer implements Runnable | |
Constructor Summary | |
public | ExpiringMap() | public | ExpiringMap(int timeToLive) | public | ExpiringMap(int timeToLive, int expirationInterval) Creates a new instance of ExpiringMap using the supplied values and
a
ConcurrentHashMap for the internal data structure. |
DEFAULT_EXPIRATION_INTERVAL | final public static int DEFAULT_EXPIRATION_INTERVAL(Code) | | The default value, 1
|
DEFAULT_TIME_TO_LIVE | final public static int DEFAULT_TIME_TO_LIVE(Code) | | The default value, 60
|
ExpiringMap | public ExpiringMap()(Code) | | Creates a new instance of ExpiringMap using the default values
DEFAULT_TIME_TO_LIVE and DEFAULT_EXPIRATION_INTERVAL
|
ExpiringMap | public ExpiringMap(int timeToLive)(Code) | | Creates a new instance of ExpiringMap using the supplied
time-to-live value and the default value for DEFAULT_EXPIRATION_INTERVAL
Parameters: timeToLive - The time-to-live value (seconds) |
ExpiringMap | public ExpiringMap(int timeToLive, int expirationInterval)(Code) | | Creates a new instance of ExpiringMap using the supplied values and
a
ConcurrentHashMap for the internal data structure.
Parameters: timeToLive - The time-to-live value (seconds) Parameters: expirationInterval - The time between checks to see if a value should be removed (seconds) |
clear | public void clear()(Code) | | |
containsValue | public boolean containsValue(Object value)(Code) | | |
getExpirationInterval | public int getExpirationInterval()(Code) | | |
getExpirer | public Expirer getExpirer()(Code) | | |
getTimeToLive | public int getTimeToLive()(Code) | | |
hashCode | public int hashCode()(Code) | | |
isEmpty | public boolean isEmpty()(Code) | | |
put | public V put(K key, V value)(Code) | | |
putAll | public void putAll(Map<? extends K, ? extends V> inMap)(Code) | | |
setExpirationInterval | public void setExpirationInterval(int expirationInterval)(Code) | | |
setTimeToLive | public void setTimeToLive(int timeToLive)(Code) | | |
|
|