com.hazelcast.cache.impl
Class CacheEventListenerAdaptor<K,V>
java.lang.Object
com.hazelcast.cache.impl.CacheEventListenerAdaptor<K,V>
- Type Parameters:
K
- the type of key.V
- the type of value.
- All Implemented Interfaces:
- CacheEventListener
public class CacheEventListenerAdaptor<K,V>
- extends Object
- implements CacheEventListener
This implementation of 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.
- See Also:
CacheEntryCreatedListener
,
CacheEntryUpdatedListener
,
CacheEntryRemovedListener
,
CacheEntryExpiredListener
,
CacheEntryEventFilter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheEventListenerAdaptor
public CacheEventListenerAdaptor(ICache<K,V> source,
javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration,
SerializationService serializationService)
handleEvent
public void handleEvent(Object eventObject)
- Description copied from interface:
CacheEventListener
- Cache Event handling function.
- Specified by:
handleEvent
in interface CacheEventListener
- Parameters:
eventObject
- Event data object, can be one of CacheEventSet
or CacheEventData
classes.- See Also:
Event Types that can be handled.
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.