Class ClusterCacheInvalidationRequestSender
java.lang.Object
org.wso2.carbon.caching.impl.clustering.ClusterCacheInvalidationRequestSender
- All Implemented Interfaces:
EventListener,CacheInvalidationRequestSender,CacheEntryCreatedListener,CacheEntryListener,CacheEntryRemovedListener,CacheEntryUpdatedListener
public class ClusterCacheInvalidationRequestSender
extends Object
implements CacheEntryRemovedListener, CacheEntryUpdatedListener, CacheEntryCreatedListener, CacheInvalidationRequestSender
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidentryCreated(CacheEntryEvent event) Called after the entry has been created (put into the cache where no previous mapping existed).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(CacheEntryInfo cacheEntryInfo) Called when CacheInvalidationMessage to Send into other nodes.
-
Constructor Details
-
ClusterCacheInvalidationRequestSender
public ClusterCacheInvalidationRequestSender()
-
-
Method Details
-
entryRemoved
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:
-
entryUpdated
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
-
entryCreated
Description copied from interface:CacheEntryCreatedListenerCalled after the entry has been created (put into the cache where no previous mapping existed).- Specified by:
entryCreatedin interfaceCacheEntryCreatedListener- Parameters:
event- The entry just added.- Throws:
CacheEntryListenerException- if there is problem executing the listener
-
send
Description copied from interface:CacheInvalidationRequestSenderCalled when CacheInvalidationMessage to Send into other nodes.- Specified by:
sendin interfaceCacheInvalidationRequestSender- Parameters:
cacheEntryInfo-CacheEntryInfoobject
-