public class EventImpl extends Object implements CacheBlockedEvent, CacheUnblockedEvent, CacheStartedEvent, CacheStoppedEvent, NodeActivatedEvent, NodeCreatedEvent, NodeEvictedEvent, NodeLoadedEvent, NodeModifiedEvent, NodeMovedEvent, NodePassivatedEvent, NodeRemovedEvent, NodeVisitedEvent, TransactionCompletedEvent, TransactionRegisteredEvent, ViewChangedEvent, BuddyGroupChangedEvent, NodeInvalidatedEvent
NodeModifiedEvent.ModificationType
Constructor and Description |
---|
EventImpl() |
EventImpl(boolean pre,
Cache cache,
NodeModifiedEvent.ModificationType modificationType,
Map data,
Fqn fqn,
Transaction transaction,
boolean originLocal,
Fqn targetFqn,
boolean successful,
org.jgroups.View newView,
Event.Type type) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
BuddyGroup |
getBuddyGroup() |
Cache |
getCache() |
Map |
getData()
When called with isPre() == true, this is the initial state of the
Node
before modification. |
Fqn |
getFqn() |
NodeModifiedEvent.ModificationType |
getModificationType() |
org.jgroups.View |
getNewView() |
Fqn |
getTargetFqn() |
Transaction |
getTransaction() |
Event.Type |
getType() |
int |
hashCode() |
boolean |
isOriginLocal() |
boolean |
isPre() |
boolean |
isSuccessful() |
void |
setBuddyGroup(BuddyGroup buddyGroup) |
void |
setCache(Cache cache) |
void |
setData(Map data) |
void |
setFqn(Fqn fqn) |
void |
setModificationType(NodeModifiedEvent.ModificationType modificationType) |
void |
setNewView(org.jgroups.View newView) |
void |
setOriginLocal(boolean originLocal) |
void |
setPre(boolean pre) |
void |
setSuccessful(boolean successful) |
void |
setTargetFqn(Fqn targetFqn) |
void |
setTransaction(Transaction transaction) |
void |
setType(Event.Type type) |
String |
toString() |
public EventImpl(boolean pre, Cache cache, NodeModifiedEvent.ModificationType modificationType, Map data, Fqn fqn, Transaction transaction, boolean originLocal, Fqn targetFqn, boolean successful, org.jgroups.View newView, Event.Type type)
public EventImpl()
public Event.Type getType()
public boolean isPre()
public Cache getCache()
public NodeModifiedEvent.ModificationType getModificationType()
getModificationType
in interface NodeModifiedEvent
NodeModifiedEvent.ModificationType
enumeration.public Map getData()
NodeModifiedEvent
Node
before modification.
When called with isPre() == false, this depends on the value of getModificationType():
NodeModifiedEvent.ModificationType.PUT_DATA
: Map contains the single key/value pair that was added or modified.NodeModifiedEvent.ModificationType.REMOVE_DATA
: Map contains the key/value pairs that were removed.NodeModifiedEvent.ModificationType.PUT_MAP
: Map contains the new state of the Node
following modification. This map includes modified key/value
pairs as well as any that were not affected.NodeModifiedEvent.ModificationType.PUT_MAP
case
can cache the value of getData() map passed when isPre() == true, and then when the
isPre() == false callback is received, pass the cached map and the new result of getData() to
Util.diffNodeData(java.util.Map,java.util.Map)
getData
in interface NodeActivatedEvent
getData
in interface NodeLoadedEvent
getData
in interface NodeModifiedEvent
getData
in interface NodePassivatedEvent
getData
in interface NodeRemovedEvent
Map
of data being activated. Empty map when Event.isPre()
returns true.public Fqn getFqn()
public Transaction getTransaction()
getTransaction
in interface TransactionalEvent
public boolean isOriginLocal()
isOriginLocal
in interface TransactionalEvent
public Fqn getTargetFqn()
getTargetFqn
in interface NodeMovedEvent
public boolean isSuccessful()
isSuccessful
in interface TransactionCompletedEvent
public org.jgroups.View getNewView()
getNewView
in interface ViewChangedEvent
public void setPre(boolean pre)
public void setCache(Cache cache)
public void setModificationType(NodeModifiedEvent.ModificationType modificationType)
public void setData(Map data)
public void setFqn(Fqn fqn)
public void setTransaction(Transaction transaction)
public void setOriginLocal(boolean originLocal)
public void setTargetFqn(Fqn targetFqn)
public void setSuccessful(boolean successful)
public void setNewView(org.jgroups.View newView)
public void setType(Event.Type type)
public void setBuddyGroup(BuddyGroup buddyGroup)
public BuddyGroup getBuddyGroup()
getBuddyGroup
in interface BuddyGroupChangedEvent
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.