net.sf.jbaobab.expirable
Class ExpirableConcurrentMap<K,V>

java.lang.Object
  extended by net.sf.jbaobab.expirable.AbstractExpirableCollection<Map.Entry<K,V>>
      extended by net.sf.jbaobab.expirable.ExpirableMap<K,V>
          extended by net.sf.jbaobab.expirable.ExpirableConcurrentMap<K,V>
All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K,V>

public class ExpirableConcurrentMap<K,V>
extends ExpirableMap<K,V>
implements ConcurrentMap<K,V>

An expirable decorator for a ConcurrentMap.

Author:
Oakyoon Cha

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.jbaobab.expirable.ExpirableMap
ExpirableMap.InternalRemoverImpl<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class net.sf.jbaobab.expirable.AbstractExpirableCollection
expirer, remover, timeout
 
Constructor Summary
ExpirableConcurrentMap(ConcurrentMap<K,V> map)
           
ExpirableConcurrentMap(ConcurrentMap<K,V> map, long timeout)
           
 
Method Summary
 V putIfAbsent(K key, V value)
           
 V putIfAbsent(K key, V value, long timeout)
           
 boolean remove(Object key, Object value)
           
 V replace(K key, V value)
           
 boolean replace(K key, V oldValue, V value)
           
 
Methods inherited from class net.sf.jbaobab.expirable.ExpirableMap
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, put, putAll, remove, size, values
 
Methods inherited from class net.sf.jbaobab.expirable.AbstractExpirableCollection
finalize, getHandler, setHandler, timeout, timeout
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

ExpirableConcurrentMap

public ExpirableConcurrentMap(ConcurrentMap<K,V> map,
                              long timeout)

ExpirableConcurrentMap

public ExpirableConcurrentMap(ConcurrentMap<K,V> map)
Method Detail

putIfAbsent

public V putIfAbsent(K key,
                     V value,
                     long timeout)

putIfAbsent

public V putIfAbsent(K key,
                     V value)
Specified by:
putIfAbsent in interface ConcurrentMap<K,V>

replace

public boolean replace(K key,
                       V oldValue,
                       V value)
Specified by:
replace in interface ConcurrentMap<K,V>

replace

public V replace(K key,
                 V value)
Specified by:
replace in interface ConcurrentMap<K,V>

remove

public boolean remove(Object key,
                      Object value)
Specified by:
remove in interface ConcurrentMap<K,V>