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.
|
getFactory
public 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
ConcurrentCache
Factory
interfaceget
in class ConcurrentCache<K,V>
key
- the key the value is associated withExecutionException
public boolean containsKey(K key)
ConcurrentCache
containsKey
in class ConcurrentCache<K,V>
key
- key to testComments to: faces-dev@eclipse.org.
Copyright © 2019 Eclipse Foundation. All rights reserved.
Use is subject to license terms.