public abstract class ConcurrentCache<K,V>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ConcurrentCache.Factory<K,V>
Factory interface for creating various cacheable objects.
|
Modifier and Type | Field and Description |
---|---|
private ConcurrentCache.Factory<K,V> |
_f |
Constructor and Description |
---|
ConcurrentCache(ConcurrentCache.Factory<K,V> f)
Constructs this cache using the specified
Factory . |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
containsKey(K key)
Tests whether the cache contains a value for the specified key
|
abstract V |
get(K key)
Retrieves a value for the specified key.
|
protected ConcurrentCache.Factory<K,V> |
getFactory()
Retrieves a
Factory instance aasociated with this cache |
private final ConcurrentCache.Factory<K,V> _f
public ConcurrentCache(ConcurrentCache.Factory<K,V> f)
Factory
.f
- public abstract V get(K key) throws java.util.concurrent.ExecutionException
Factory
interfacekey
- the key the value is associated withjava.util.concurrent.ExecutionException
public abstract boolean containsKey(K key)
key
- key to testprotected final ConcurrentCache.Factory<K,V> getFactory()
Factory
instance aasociated with this cacheFactory
instanceCopyright © 2002-2013 Oracle America, Inc. All Rights Reserved.