Package org.infinispan.jcache
Class AbstractJCacheNotifier<K,V>
- java.lang.Object
-
- org.infinispan.jcache.AbstractJCacheNotifier<K,V>
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public abstract class AbstractJCacheNotifier<K,V> extends Object implements Closeable
JCache notifications dispatcher. TODO: Deal with asynchronous listeners...- Since:
- 5.3
- Author:
- Galder ZamarreƱo
-
-
Constructor Summary
Constructors Constructor Description AbstractJCacheNotifier()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> reg, AbstractJCache<K,V> jcache, AbstractJCacheNotifier<K,V> notifier)voidaddSyncNotificationLatch(javax.cache.Cache<K,V> cache, K key, V value, CountDownLatch latch)voidclose()protected javax.cache.event.CacheEntryEventFilter<? super K,? super V>createFilterIfNeeded(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> listenerCfg)protected abstract AbstractJCacheListenerAdapter<K,V>createListenerAdapter(AbstractJCache<K,V> jcache, AbstractJCacheNotifier<K,V> notifier)booleanhasSyncCreatedListener()booleanhasSyncRemovedListener()booleanhasSyncUpdatedListener()voidnotifyEntryCreated(javax.cache.Cache<K,V> cache, K key, V value)voidnotifyEntryExpired(javax.cache.Cache<K,V> cache, K key, V value)voidnotifyEntryRemoved(javax.cache.Cache<K,V> cache, K key, V value, V prev)voidnotifyEntryUpdated(javax.cache.Cache<K,V> cache, K key, V value, V prev)voidremoveListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> reg, AbstractJCache<K,V> jcache)voidremoveSyncNotificationLatch(javax.cache.Cache<K,V> cache, K key, V value, CountDownLatch latch)
-
-
-
Method Detail
-
addListener
public void addListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> reg, AbstractJCache<K,V> jcache, AbstractJCacheNotifier<K,V> notifier)
-
removeListener
public void removeListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> reg, AbstractJCache<K,V> jcache)
-
addSyncNotificationLatch
public void addSyncNotificationLatch(javax.cache.Cache<K,V> cache, K key, V value, CountDownLatch latch)
-
removeSyncNotificationLatch
public void removeSyncNotificationLatch(javax.cache.Cache<K,V> cache, K key, V value, CountDownLatch latch)
-
notifyEntryUpdated
public void notifyEntryUpdated(javax.cache.Cache<K,V> cache, K key, V value, V prev)
-
notifyEntryRemoved
public void notifyEntryRemoved(javax.cache.Cache<K,V> cache, K key, V value, V prev)
-
hasSyncCreatedListener
public boolean hasSyncCreatedListener()
-
hasSyncRemovedListener
public boolean hasSyncRemovedListener()
-
hasSyncUpdatedListener
public boolean hasSyncUpdatedListener()
-
createFilterIfNeeded
protected javax.cache.event.CacheEntryEventFilter<? super K,? super V> createFilterIfNeeded(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> listenerCfg)
-
createListenerAdapter
protected abstract AbstractJCacheListenerAdapter<K,V> createListenerAdapter(AbstractJCache<K,V> jcache, AbstractJCacheNotifier<K,V> notifier)
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-