public abstract class AbstractBackingCache<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>> extends Object implements BackingCache<K,V,E>
BackingCache
implementations. Basically provides support for working with
BackingCacheLifecycleListener
s.Modifier and Type | Field and Description |
---|---|
protected org.jboss.logging.Logger |
log |
Constructor and Description |
---|
AbstractBackingCache() |
Modifier and Type | Method and Description |
---|---|
void |
addLifecycleListener(BackingCacheLifecycleListener listener)
Registers a listener for callbacks when the cache starts and stops.
|
protected void |
notifyLifecycleListeners(BackingCacheLifecycleListener.LifecycleState newState) |
void |
removeLifecycleListener(BackingCacheLifecycleListener listener)
Removes a registered lifecycle listener.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, discard, get, isClustered, peek, release, start, stop
getStrictAffinity, getWeakAffinity, hasAffinity
public void addLifecycleListener(BackingCacheLifecycleListener listener)
BackingCache
addLifecycleListener
in interface BackingCache<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>
listener
- the listener. Cannot be null
.public void removeLifecycleListener(BackingCacheLifecycleListener listener)
BackingCache
removeLifecycleListener
in interface BackingCache<K extends Serializable,V extends Cacheable<K>,E extends BackingCacheEntry<K,V>>
listener
- the listener. Cannot be null
.protected void notifyLifecycleListeners(BackingCacheLifecycleListener.LifecycleState newState)
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.