|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opensymphony.oscache.plugins.clustersupport.AbstractBroadcastingListener
public abstract class AbstractBroadcastingListener
Implementation of a CacheEntryEventListener. It broadcasts the flush events across a cluster to other listening caches. Note that this listener cannot be used in conjection with session caches.
| Field Summary | |
|---|---|
protected Cache |
cache
|
protected static String |
CLUSTER_ORIGIN
The name to use for the origin of cluster events. |
private static Log |
log
|
| Constructor Summary | |
|---|---|
AbstractBroadcastingListener()
|
|
| Method Summary | |
|---|---|
void |
cacheEntryAdded(CacheEntryEvent event)
Event fired when an entry is added to the cache. |
void |
cacheEntryFlushed(CacheEntryEvent event)
Event fired when an entry is flushed from the cache. |
void |
cacheEntryRemoved(CacheEntryEvent event)
Event fired when an entry is removed from the cache. |
void |
cacheEntryUpdated(CacheEntryEvent event)
Event fired when an entry is updated in the cache. |
void |
cacheFlushed(CachewideEvent event)
An event that is fired when an entire cache gets flushed. |
void |
cacheGroupAdded(CacheGroupEvent event)
|
void |
cacheGroupEntryAdded(CacheGroupEvent event)
|
void |
cacheGroupEntryRemoved(CacheGroupEvent event)
|
void |
cacheGroupFlushed(CacheGroupEvent event)
Event fired when an entry is removed from the cache. |
void |
cacheGroupRemoved(CacheGroupEvent event)
|
void |
cacheGroupUpdated(CacheGroupEvent event)
|
void |
cachePatternFlushed(CachePatternEvent event)
Event fired when a key pattern is flushed from the cache. |
void |
handleClusterNotification(ClusterNotification message)
Handles incoming notification messages. |
void |
initialize(Cache cache,
Config config)
Called by the cache administrator class when a cache is instantiated. |
protected abstract void |
sendNotification(ClusterNotification message)
Called when a cluster notification message is to be broadcast. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.opensymphony.oscache.base.LifecycleAware |
|---|
finialize |
| Field Detail |
|---|
private static final Log log
protected static final String CLUSTER_ORIGIN
protected Cache cache
| Constructor Detail |
|---|
public AbstractBroadcastingListener()
| Method Detail |
|---|
public void cacheEntryFlushed(CacheEntryEvent event)
cacheEntryFlushed in interface CacheEntryEventListenerpublic void cacheGroupFlushed(CacheGroupEvent event)
cacheGroupFlushed in interface CacheEntryEventListenerpublic void cachePatternFlushed(CachePatternEvent event)
CacheEntryEventListenernull or an empty string, instead the flush
request will silently be ignored.
cachePatternFlushed in interface CacheEntryEventListenerpublic void cacheFlushed(CachewideEvent event)
CacheEntryEventListener
cacheFlushed in interface CacheEntryEventListenerpublic void cacheEntryAdded(CacheEntryEvent event)
CacheEntryEventListener
cacheEntryAdded in interface CacheEntryEventListenerpublic void cacheEntryRemoved(CacheEntryEvent event)
CacheEntryEventListener
cacheEntryRemoved in interface CacheEntryEventListenerpublic void cacheEntryUpdated(CacheEntryEvent event)
CacheEntryEventListener
cacheEntryUpdated in interface CacheEntryEventListenerpublic void cacheGroupAdded(CacheGroupEvent event)
public void cacheGroupEntryAdded(CacheGroupEvent event)
public void cacheGroupEntryRemoved(CacheGroupEvent event)
public void cacheGroupRemoved(CacheGroupEvent event)
public void cacheGroupUpdated(CacheGroupEvent event)
public void initialize(Cache cache,
Config config)
throws InitializationException
initialize in interface LifecycleAwarecache - the cache instance that this listener is attached to.config - The cache's configuration details. This allows the event handler
to initialize itself based on the cache settings, and also to receive additional
settings that were part of the cache configuration but that the cache
itself does not care about. If you are using cache.properties
for your configuration, simply add any additional properties that your event
handler requires and they will be passed through in this parameter.
InitializationException - thrown when there was a problem initializing the
listener. The cache administrator will log this error and disable the listener.public void handleClusterNotification(ClusterNotification message)
message - The incoming cluster notification message object.protected abstract void sendNotification(ClusterNotification message)
message - The notification message to broadcast.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||