public class NonPassivatingBackingCacheImpl<K extends Serializable,V extends Cacheable<K>> extends AbstractBackingCache<K,V,NonPassivatingBackingCacheEntry<K,V>> implements BackingCacheEntryFactory<K,V,NonPassivatingBackingCacheEntry<K,V>>
BackingCache that doesn't handle passivation (although it does handle expiration). Pure in-VM memory cache.
Not group-aware, as there is no point in managing groups if there is no serialization.log| Constructor and Description |
|---|
NonPassivatingBackingCacheImpl(StatefulObjectFactory<V> factory,
ScheduledExecutorService executor,
StatefulTimeoutInfo timeout,
ServerEnvironment environment) |
NonPassivatingBackingCacheImpl(StatefulObjectFactory<V> factory,
ThreadFactory threadFactory,
StatefulTimeoutInfo timeout,
ServerEnvironment environment) |
| Modifier and Type | Method and Description |
|---|---|
NonPassivatingBackingCacheEntry<K,V> |
create()
Creates and caches a new instance of
C, wrapped by a new T. |
NonPassivatingBackingCacheEntry<K,V> |
createEntry(V item) |
void |
destroyEntry(NonPassivatingBackingCacheEntry<K,V> entry) |
void |
discard(K key)
Discard the specified object from cache.
|
NonPassivatingBackingCacheEntry<K,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.
|
boolean |
isClustered()
Gets whether this cache supports clustering functionality.
|
NonPassivatingBackingCacheEntry<K,V> |
peek(K key)
Peek at an object which might be in use.
|
NonPassivatingBackingCacheEntry<K,V> |
release(K key)
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.
|
addLifecycleListener, notifyLifecycleListeners, removeLifecycleListenerpublic NonPassivatingBackingCacheImpl(StatefulObjectFactory<V> factory, ThreadFactory threadFactory, StatefulTimeoutInfo timeout, ServerEnvironment environment)
public NonPassivatingBackingCacheImpl(StatefulObjectFactory<V> factory, ScheduledExecutorService executor, StatefulTimeoutInfo timeout, ServerEnvironment environment)
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 keypublic NonPassivatingBackingCacheEntry<K,V> create()
BackingCacheC, wrapped by a new T. The new T *is*
returned, but is not regarded as being "in use". Callers *must not* attempt to use the underlying C without
first calling #get(Object).create in interface BackingCache<K extends Serializable,V extends Cacheable<K>,NonPassivatingBackingCacheEntry<K extends Serializable,V extends Cacheable<K>>>Tpublic NonPassivatingBackingCacheEntry<K,V> createEntry(V item)
createEntry in interface BackingCacheEntryFactory<K extends Serializable,V extends Cacheable<K>,NonPassivatingBackingCacheEntry<K extends Serializable,V extends Cacheable<K>>>public void destroyEntry(NonPassivatingBackingCacheEntry<K,V> entry)
destroyEntry in interface BackingCacheEntryFactory<K extends Serializable,V extends Cacheable<K>,NonPassivatingBackingCacheEntry<K extends Serializable,V extends Cacheable<K>>>public NonPassivatingBackingCacheEntry<K,V> get(K key) throws javax.ejb.NoSuchEJBException
BackingCacheget in interface BackingCache<K extends Serializable,V extends Cacheable<K>,NonPassivatingBackingCacheEntry<K extends Serializable,V extends Cacheable<K>>>key - the identifier of the objectjavax.ejb.NoSuchEJBException - if the object does not existpublic NonPassivatingBackingCacheEntry<K,V> peek(K key) throws javax.ejb.NoSuchEJBException
BackingCachepeek in interface BackingCache<K extends Serializable,V extends Cacheable<K>,NonPassivatingBackingCacheEntry<K extends Serializable,V extends Cacheable<K>>>key - the identifier of the objectjavax.ejb.NoSuchEJBException - if the object does not existpublic NonPassivatingBackingCacheEntry<K,V> release(K key)
BackingCacherelease in interface BackingCache<K extends Serializable,V extends Cacheable<K>,NonPassivatingBackingCacheEntry<K extends Serializable,V extends Cacheable<K>>>key - the identifier of the objectpublic void discard(K key)
BackingCachediscard in interface BackingCache<K extends Serializable,V extends Cacheable<K>,NonPassivatingBackingCacheEntry<K extends Serializable,V extends Cacheable<K>>>key - the identifier of the objectpublic void remove(K key)
Removableremove in interface Removable<K extends Serializable>key - the identifier of the objectpublic boolean isClustered()
BackingCacheisClustered in interface BackingCache<K extends Serializable,V extends Cacheable<K>,NonPassivatingBackingCacheEntry<K extends Serializable,V extends Cacheable<K>>>true if clustering is supported, false otherwisepublic void start()
BackingCachestart in interface BackingCache<K extends Serializable,V extends Cacheable<K>,NonPassivatingBackingCacheEntry<K extends Serializable,V extends Cacheable<K>>>public void stop()
BackingCachestop in interface BackingCache<K extends Serializable,V extends Cacheable<K>,NonPassivatingBackingCacheEntry<K extends Serializable,V extends Cacheable<K>>>Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.