|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.cache.notifications.NotifierImpl
public class NotifierImpl
Helper class that handles all notifications to registered listeners.
Constructor Summary | |
---|---|
NotifierImpl()
|
|
NotifierImpl(Cache cache)
|
Method Summary | |
---|---|
void |
addCacheListener(Object listener)
Adds a cache listener to the list of cache listeners registered. |
protected void |
destroy()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getBuddyGroupChangedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getCacheBlockedListeners()
|
Set<Object> |
getCacheListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getCacheStartedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getCacheStoppedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getCacheUnblockedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getNodeActivatedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getNodeCreatedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getNodeEvictedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getNodeLoadedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getNodeModifiedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getNodeMovedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getNodePassivatedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getNodeRemovedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getNodeVisitedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getTransactionCompletedListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getTransactionRegisteredListeners()
|
List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> |
getViewChangedListeners()
|
void |
notifyBuddyGroupChange(BuddyGroup buddyGroup,
boolean pre)
Notifies all registered listeners of a buddy group change event. |
void |
notifyCacheBlocked(boolean pre)
|
void |
notifyCacheStarted()
Notifies all registered listeners of a cacheStarted event. |
void |
notifyCacheStopped()
Notifies all registered listeners of a cacheStopped event. |
void |
notifyCacheUnblocked(boolean pre)
|
void |
notifyNodeActivated(Fqn fqn,
boolean pre,
Map data,
InvocationContext ctx)
Notifies all registered listeners of a nodeActivated event. |
void |
notifyNodeCreated(Fqn fqn,
boolean pre,
InvocationContext ctx)
Notifies all registered listeners of a nodeCreated event. |
void |
notifyNodeEvicted(Fqn fqn,
boolean pre,
InvocationContext ctx)
Notifies all registered listeners of a nodeEvicted event. |
void |
notifyNodeLoaded(Fqn fqn,
boolean pre,
Map data,
InvocationContext ctx)
Notifies all registered listeners of a nodeLoaded event. |
void |
notifyNodeModified(Fqn fqn,
boolean pre,
NodeModifiedEvent.ModificationType modificationType,
Map data,
InvocationContext ctx)
Notifies all registered listeners of a nodeModified event. |
void |
notifyNodeMoved(Fqn originalFqn,
Fqn newFqn,
boolean pre,
InvocationContext ctx)
Notifies all registered listeners of a nodeMoved event. |
void |
notifyNodePassivated(Fqn fqn,
boolean pre,
Map data,
InvocationContext ctx)
Notifies all registered listeners of a nodePassivated event. |
void |
notifyNodeRemoved(Fqn fqn,
boolean pre,
Map data,
InvocationContext ctx)
Notifies all registered listeners of a nodeRemoved event. |
void |
notifyNodeVisited(Fqn fqn,
boolean pre,
InvocationContext ctx)
Notifies all registered listeners of a nodeVisited event. |
void |
notifyTransactionCompleted(Transaction transaction,
boolean successful,
InvocationContext ctx)
Notifies all registered listeners of a transaction completion event. |
void |
notifyTransactionRegistered(Transaction transaction,
InvocationContext ctx)
Notifies all registered listeners of a transaction registration event. |
void |
notifyViewChange(org.jgroups.View newView,
InvocationContext ctx)
Notifies all registered listeners of a viewChange event. |
void |
removeAllCacheListeners()
Removes all listeners from the notifier, including the evictionPolicyListener. |
void |
removeCacheListener(Object listener)
Removes a cache listener from the list of cache listeners registered. |
boolean |
shouldNotifyOnNodeModified()
When notifying about node modifications, in many scenarios there is a need of building a new Map object. |
protected void |
start()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NotifierImpl()
public NotifierImpl(Cache cache)
Method Detail |
---|
protected void destroy()
protected void start()
public void addCacheListener(Object listener)
listener
- public void removeCacheListener(Object listener)
listener
- public void removeAllCacheListeners()
public Set<Object> getCacheListeners()
public void notifyNodeCreated(Fqn fqn, boolean pre, InvocationContext ctx)
Notifier
notifyNodeCreated
in interface Notifier
public void notifyNodeModified(Fqn fqn, boolean pre, NodeModifiedEvent.ModificationType modificationType, Map data, InvocationContext ctx)
Notifier
notifyNodeModified
in interface Notifier
public boolean shouldNotifyOnNodeModified()
Notifier
shouldNotifyOnNodeModified
in interface Notifier
public void notifyNodeRemoved(Fqn fqn, boolean pre, Map data, InvocationContext ctx)
Notifier
notifyNodeRemoved
in interface Notifier
public void notifyNodeVisited(Fqn fqn, boolean pre, InvocationContext ctx)
Notifier
notifyNodeVisited
in interface Notifier
public void notifyNodeMoved(Fqn originalFqn, Fqn newFqn, boolean pre, InvocationContext ctx)
Notifier
notifyNodeMoved
in interface Notifier
public void notifyNodeEvicted(Fqn fqn, boolean pre, InvocationContext ctx)
Notifier
notifyNodeEvicted
in interface Notifier
public void notifyNodeLoaded(Fqn fqn, boolean pre, Map data, InvocationContext ctx)
Notifier
notifyNodeLoaded
in interface Notifier
public void notifyNodeActivated(Fqn fqn, boolean pre, Map data, InvocationContext ctx)
Notifier
notifyNodeActivated
in interface Notifier
public void notifyNodePassivated(Fqn fqn, boolean pre, Map data, InvocationContext ctx)
Notifier
notifyNodePassivated
in interface Notifier
public void notifyCacheStarted()
public void notifyCacheStopped()
public void notifyViewChange(org.jgroups.View newView, InvocationContext ctx)
Notifier
notifyViewChange
in interface Notifier
public void notifyBuddyGroupChange(BuddyGroup buddyGroup, boolean pre)
Notifier
notifyBuddyGroupChange
in interface Notifier
buddyGroup
- buddy group to setpre
- if true, this has occured before the buddy group message is broadcast to the clusterpublic void notifyTransactionCompleted(Transaction transaction, boolean successful, InvocationContext ctx)
Notifier
notifyTransactionCompleted
in interface Notifier
transaction
- the transaction that has just completedsuccessful
- if true, the transaction committed. If false, this is a rollback eventpublic void notifyTransactionRegistered(Transaction transaction, InvocationContext ctx)
Notifier
notifyTransactionRegistered
in interface Notifier
transaction
- the transaction that has just completedpublic void notifyCacheBlocked(boolean pre)
notifyCacheBlocked
in interface Notifier
public void notifyCacheUnblocked(boolean pre)
notifyCacheUnblocked
in interface Notifier
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getCacheStartedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getCacheStoppedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getCacheBlockedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getCacheUnblockedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getNodeCreatedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getNodeRemovedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getNodeVisitedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getNodeModifiedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getNodeMovedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getNodeActivatedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getNodePassivatedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getNodeLoadedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getNodeEvictedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getTransactionRegisteredListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getTransactionCompletedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getViewChangedListeners()
public List<org.jboss.cache.notifications.NotifierImpl.ListenerInvocation> getBuddyGroupChangedListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |