public class ExpiringMap<K,V>
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | ExpiringMap.CacheableObject<T> | 
| Constructor and Description | 
|---|
| ExpiringMap(long defaultExpiration) | 
| ExpiringMap(long defaultExpiration,
           com.google.common.base.Function<Pair<K,ExpiringMap.CacheableObject<V>>,?> postExpireHook) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | containsKey(K key) | 
| V | get(K key) | 
| long | getAge(K key) | 
| boolean | isEmpty() | 
| java.util.Set<K> | keySet() | 
| V | put(K key,
   V value) | 
| V | put(K key,
   V value,
   long timeout) | 
| V | remove(K key) | 
| void | reset() | 
| boolean | shutdownBlocking() | 
| int | size() | 
public ExpiringMap(long defaultExpiration)
public ExpiringMap(long defaultExpiration,
                   com.google.common.base.Function<Pair<K,ExpiringMap.CacheableObject<V>>,?> postExpireHook)
defaultExpiration - the TTL for objects in the cache in millisecondspublic boolean shutdownBlocking()
public void reset()
public long getAge(K key)
public int size()
public boolean containsKey(K key)
public boolean isEmpty()
public java.util.Set<K> keySet()
Copyright © 2018 The Apache Software Foundation