public class PassivatingBackingCacheImpl<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>> extends AbstractBackingCache<K,V,E> implements PassivatingBackingCache<K,V,E>
| Modifier and Type | Field and Description |
|---|---|
protected org.jboss.logging.Logger |
log |
| Constructor and Description |
|---|
PassivatingBackingCacheImpl(StatefulObjectFactory<V> factory,
BackingCacheEntryFactory<K,V,E> entryFactory,
ReplicationPassivationManager<K,E> passivationManager,
BackingCacheEntryStore<K,V,E> store) |
PassivatingBackingCacheImpl(StatefulObjectFactory<V> factory,
BackingCacheEntryFactory<K,V,E> entryFactory,
ReplicationPassivationManager<K,E> passivationManager,
BackingCacheEntryStore<K,V,E> store,
ScheduledExecutorService executor) |
PassivatingBackingCacheImpl(StatefulObjectFactory<V> factory,
BackingCacheEntryFactory<K,V,E> entryFactory,
ReplicationPassivationManager<K,E> passivationManager,
BackingCacheEntryStore<K,V,E> store,
ThreadFactory threadFactory) |
| Modifier and Type | Method and Description |
|---|---|
E |
create()
Creates and caches a new instance of
C, wrapped by a new T. |
void |
discard(K key)
Discard the specified object from cache.
|
E |
get(K key)
Get the specified object from cache.
|
GroupCompatibilityChecker |
getCompatibilityChecker()
Gets any
GroupCompatibilityChecker this cache is using. |
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.
|
void |
passivate(K key) |
E |
peek(K key)
Peek at an object which might be in use.
|
E |
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, removeLifecycleListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifecycleListener, removeLifecycleListenerpublic PassivatingBackingCacheImpl(StatefulObjectFactory<V> factory, BackingCacheEntryFactory<K,V,E> entryFactory, ReplicationPassivationManager<K,E> passivationManager, BackingCacheEntryStore<K,V,E> store)
public PassivatingBackingCacheImpl(StatefulObjectFactory<V> factory, BackingCacheEntryFactory<K,V,E> entryFactory, ReplicationPassivationManager<K,E> passivationManager, BackingCacheEntryStore<K,V,E> store, ThreadFactory threadFactory)
public PassivatingBackingCacheImpl(StatefulObjectFactory<V> factory, BackingCacheEntryFactory<K,V,E> entryFactory, ReplicationPassivationManager<K,E> passivationManager, BackingCacheEntryStore<K,V,E> store, ScheduledExecutorService executor)
public boolean isClustered()
BackingCacheisClustered in interface BackingCache<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>true if clustering is supported, false otherwisepublic 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 E 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>,E extends BackingCacheEntry<K,V>>Tpublic E get(K key) throws javax.ejb.NoSuchEJBException
BackingCacheget in interface BackingCache<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>key - the identifier of the objectjavax.ejb.NoSuchEJBException - if the object does not existpublic void passivate(K key)
passivate in interface Passivatable<K extends Serializable>public E peek(K key) throws javax.ejb.NoSuchEJBException
BackingCachepeek in interface BackingCache<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>key - the identifier of the objectjavax.ejb.NoSuchEJBException - if the object does not existpublic E release(K key)
BackingCacherelease in interface BackingCache<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>key - the identifier of the objectpublic void discard(K key)
BackingCachediscard in interface BackingCache<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>key - the identifier of the objectpublic void remove(K key)
Removableremove in interface Removable<K extends Serializable>key - the identifier of the objectpublic void start()
BackingCachestart in interface BackingCache<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>public void stop()
BackingCachestop in interface BackingCache<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>public GroupCompatibilityChecker getCompatibilityChecker()
PassivatingBackingCacheGroupCompatibilityChecker this cache is using.getCompatibilityChecker in interface PassivatingBackingCache<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>null if this cache is not using one.Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.