org.apache.cassandra.utils
Class ExpiringMap<K,V>
java.lang.Object
org.apache.cassandra.utils.ExpiringMap<K,V>
public class ExpiringMap<K,V>
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpiringMap
public ExpiringMap(long expiration)
ExpiringMap
public ExpiringMap(long expiration,
com.google.common.base.Function<Pair<K,V>,?> postExpireHook)
- Parameters:
expiration
- the TTL for objects in the cache in milliseconds
shutdown
public void shutdown()
clear
public void clear()
put
public V put(K key,
V value)
put
public V put(K key,
V value,
long timeout)
get
public V get(K key)
remove
public V remove(K key)
getAge
public long getAge(K key)
size
public int size()
containsKey
public boolean containsKey(K key)
isEmpty
public boolean isEmpty()
keySet
public java.util.Set<K> keySet()
Copyright © 2011 The Apache Software Foundation