net.sf.ehcache.distribution.jgroups
Class JGroupEventMessage
java.lang.Object
net.sf.ehcache.distribution.EventMessage
net.sf.ehcache.distribution.jgroups.JGroupEventMessage
- All Implemented Interfaces:
- java.io.Serializable
public class JGroupEventMessage
- extends EventMessage
An EventMessage used for JGroups
- Version:
- $Id: JGroupEventMessage.java 704 2008-07-13 00:17:52Z gregluck $
EventMessage class for the JGroupsCacheReplicator.
- Author:
- Pierre Monestie (pmonestie[at]@gmail.com), Greg Luck
- See Also:
- Serialized Form
Constructor Summary |
JGroupEventMessage(int event,
java.io.Serializable key,
Element element,
Ehcache cache,
java.lang.String cacheName)
An event message for the JGroupsCacheReplicator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JGroupEventMessage
public JGroupEventMessage(int event,
java.io.Serializable key,
Element element,
Ehcache cache,
java.lang.String cacheName)
- An event message for the JGroupsCacheReplicator. We keep as transient the
origin cache and we serialize the cacheName. That way the JgroupManager
will know from which cache the message came from
- Parameters:
event
- (PUT,REMOVE,REMOVE_ALL)key
- the serializable key of the cache elementelement
- The element itself. In case of a put.cache
- the Ehcache instance. This is a transient variablecacheName
- the name of the cache
getCache
public Ehcache getCache()
- Returns:
- the cache from which this event originated
getCacheName
public java.lang.String getCacheName()
- Returns the cache name
- Returns:
- the cache name