Class ClusterCacheInvalidationRequestSender
- java.lang.Object
-
- org.wso2.carbon.caching.impl.clustering.ClusterCacheInvalidationRequestSender
-
- All Implemented Interfaces:
EventListener,CacheEntryListener,CacheEntryRemovedListener,CacheEntryUpdatedListener
public class ClusterCacheInvalidationRequestSender extends Object implements CacheEntryRemovedListener, CacheEntryUpdatedListener
Listens for cache entry removals and updates, and sends a cache invalidation request to the other members in the cluster.This is feature intended only when separate local caches are maintained by each node in the cluster.
-
-
Constructor Summary
Constructors Constructor Description ClusterCacheInvalidationRequestSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidentryRemoved(CacheEntryEvent event)Called after the entry has been removed.voidentryUpdated(CacheEntryEvent event)todo change this to have two args: the old value and the new value Called after the entry has been updated (put into the cache where a previous mapping existed).voidsend(CacheEntryEvent cacheEntryEvent)We will invalidate the particular cache in other nodes whenever there is an remove/update of the local cache in the current node.
-
-
-
Method Detail
-
entryRemoved
public void entryRemoved(CacheEntryEvent event) throws CacheEntryListenerException
Description copied from interface:CacheEntryRemovedListenerCalled after the entry has been removed. If no entry existed for key the event is not called.- Specified by:
entryRemovedin interfaceCacheEntryRemovedListener- Parameters:
event- The entry just removed.- Throws:
CacheEntryListenerException- if there is problem executing the listener- See Also:
CacheEntryRemovedListener.entryRemoved(CacheEntryEvent)
-
entryUpdated
public void entryUpdated(CacheEntryEvent event) throws CacheEntryListenerException
Description copied from interface:CacheEntryUpdatedListenertodo change this to have two args: the old value and the new value Called after the entry has been updated (put into the cache where a previous mapping existed).- Specified by:
entryUpdatedin interfaceCacheEntryUpdatedListener- Parameters:
event- The event just updated.- Throws:
CacheEntryListenerException- if there is problem executing the listener
-
send
public void send(CacheEntryEvent cacheEntryEvent)
We will invalidate the particular cache in other nodes whenever there is an remove/update of the local cache in the current node.
-
-