public abstract class AbstractCache<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>> extends Object implements Cache<K,V>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCache(BackingCache<K,V,E> backingCache) |
| Modifier and Type | Method and Description |
|---|---|
V |
create()
Creates and caches a new instance of
T. |
void |
discard(K key)
Discard the specified object from cache.
|
V |
get(K key)
Get the specified object from cache.
|
org.jboss.ejb.client.Affinity |
getStrictAffinity()
Returns the strict affinity associated with the entries of this cache
|
org.jboss.ejb.client.Affinity |
getWeakAffinity(K key)
Returns the weak affinity associated with the specified entry of this cache
|
boolean |
hasAffinity(K key)
Indicates whether the cache has an affinity for the specified key.
|
void |
release(V object)
Release the object from use.
|
void |
remove(K key)
Remove and destroy the specified object from cache.
|
void |
start()
Start the cache.
|
void |
stop()
Stop the cache.
|
protected AbstractCache(BackingCache<K,V,E> backingCache)
public V create()
CacheT.public void discard(K key)
discard in interface Cache<K extends Serializable,V extends Cacheable<K>>key - the identifier of the objectCache.discard(java.io.Serializable)public V get(K key) throws javax.ejb.NoSuchEJBException
get in interface Cache<K extends Serializable,V extends Cacheable<K>>key - the identifier of the objectjavax.ejb.NoSuchEJBExceptionCache.get(java.io.Serializable)public void release(V object)
release in interface Cache<K extends Serializable,V extends Cacheable<K>>object - the objectCache.release(org.jboss.as.ejb3.cache.Identifiable)public void remove(K key)
remove in interface Removable<K extends Serializable>key - the identifier of the objectpublic void start()
start in interface Cache<K extends Serializable,V extends Cacheable<K>>Cache.start()public void stop()
stop in interface Cache<K extends Serializable,V extends Cacheable<K>>Cache.stop()public org.jboss.ejb.client.Affinity getStrictAffinity()
AffinitySupportgetStrictAffinity in interface AffinitySupport<K extends Serializable>public org.jboss.ejb.client.Affinity getWeakAffinity(K key)
AffinitySupportgetWeakAffinity in interface AffinitySupport<K extends Serializable>public boolean hasAffinity(K key)
AffinitySupporthasAffinity in interface AffinitySupport<K extends Serializable>key - a candidate keyCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.