K
- the type of key.V
- the type of value.public class CacheEventListenerAdaptor<K,V> extends Object implements CacheEventListener
CacheEventListener
uses the adapter pattern for wrapping all cache event listener
types into a single listener.
JCache has multiple CacheEntryListener
sub-interfaces for each event type. This adapter
implementation delegates to the correct subtype using the event type.
Another responsibility of this implementation is filtering events by using the already configured event filters.
CacheEntryCreatedListener
,
CacheEntryUpdatedListener
,
CacheEntryRemovedListener
,
CacheEntryExpiredListener
,
CacheEntryEventFilter
Constructor and Description |
---|
CacheEventListenerAdaptor(ICache<K,V> source,
javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration,
SerializationService serializationService) |
public void handleEvent(Object eventObject)
CacheEventListener
handleEvent
in interface CacheEventListener
eventObject
- Event data object, can be one of CacheEventSet
or CacheEventData
classes.Event Types that can be handled.
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.