public final class ExpiringConcurrentCache<K,V> extends ConcurrentCache<K,V>
| Modifier and Type | Class and Description |
|---|---|
static interface |
ExpiringConcurrentCache.ExpiryChecker<K,V>
Interface for checking whether a cached object expired
|
ConcurrentCache.Factory<K,V>| Constructor and Description |
|---|
ExpiringConcurrentCache(ConcurrentCache.Factory<K,V> f,
ExpiringConcurrentCache.ExpiryChecker<K,V> checker)
Public constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(K key)
Tests whether the cache contains a value for the specified key
|
V |
get(K key)
Retrieves a value for the specified key.
|
getFactorypublic ExpiringConcurrentCache(ConcurrentCache.Factory<K,V> f, ExpiringConcurrentCache.ExpiryChecker<K,V> checker)
f - used to create new instances of objects that are not already availablechecker - used to check whether an object in the cache has expiredpublic V get(K key) throws ExecutionException
ConcurrentCacheFactory interfaceget in class ConcurrentCache<K,V>key - the key the value is associated withExecutionExceptionpublic boolean containsKey(K key)
ConcurrentCachecontainsKey in class ConcurrentCache<K,V>key - key to testCopyright © 2010–2024 JBoss by Red Hat. All rights reserved.