Save This Page
Home » oscache-2.4.1-full » com.opensymphony.oscache.plugins » clustersupport » [javadoc | source]
com.opensymphony.oscache.plugins.clustersupport
public class: JavaGroupsBroadcastingListener [javadoc | source]
java.lang.Object
   com.opensymphony.oscache.plugins.clustersupport.AbstractBroadcastingListener
      com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener

All Implemented Interfaces:
    NotificationBus.Consumer, LifecycleAware, CacheEntryEventListener

A concrete implementation of the AbstractBroadcastingListener based on the JavaGroups library. This Class uses JavaGroups to broadcast cache flush messages across a cluster.

One of the following properties should be configured in oscache.properties for this listener:

Please refer to the clustering documentation for further details on the configuration of this listener.

Fields inherited from com.opensymphony.oscache.plugins.clustersupport.AbstractBroadcastingListener:
CLUSTER_ORIGIN,  cache
Method from com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener Summary:
finialize,   getCache,   handleNotification,   initialize,   memberJoined,   memberLeft,   sendNotification
Methods from com.opensymphony.oscache.plugins.clustersupport.AbstractBroadcastingListener:
cacheEntryAdded,   cacheEntryFlushed,   cacheEntryRemoved,   cacheEntryUpdated,   cacheFlushed,   cacheGroupAdded,   cacheGroupEntryAdded,   cacheGroupEntryRemoved,   cacheGroupFlushed,   cacheGroupRemoved,   cacheGroupUpdated,   cachePatternFlushed,   handleClusterNotification,   initialize,   sendNotification
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener Detail:
 public synchronized  void finialize() throws FinalizationException 
    Shuts down the JavaGroups being managed by this listener. This occurs once the cache is shut down and this listener is no longer in use.
 public Serializable getCache() 
    We are not using the caching, so we just return something that identifies us. This method should never be called directly.
 public  void handleNotification(Serializable serializable) 
    Handles incoming notification messages from JavaGroups. This method should never be called directly.
 public synchronized  void initialize(Cache cache,
    Config config) throws InitializationException 
    Initializes the broadcasting listener by starting up a JavaGroups notification bus instance to handle incoming and outgoing messages.
 public  void memberJoined(Address address) 
    A callback that is fired when a new member joins the cluster. This method should never be called directly.
 public  void memberLeft(Address address) 
    A callback that is fired when an existing member leaves the cluster. This method should never be called directly.
 protected  void sendNotification(ClusterNotification message) 
    Uses JavaGroups to broadcast the supplied notification message across the cluster.