Package org.infinispan.jcache
Class AbstractJCacheNotifier<K,V>
java.lang.Object
org.infinispan.jcache.AbstractJCacheNotifier<K,V>
- All Implemented Interfaces:
Closeable,AutoCloseable
JCache notifications dispatcher.
TODO: Deal with asynchronous listeners...
- Since:
- 5.3
- Author:
- Galder ZamarreƱo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(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()createFilterIfNeeded(javax.cache.configuration.CacheEntryListenerConfiguration<K, V> listenerCfg) protected abstract AbstractJCacheListenerAdapter<K, V> createListenerAdapter(AbstractJCache<K, V> jcache, AbstractJCacheNotifier<K, V> notifier) booleanbooleanbooleanvoidnotifyEntryCreated(javax.cache.Cache<K, V> cache, K key, V value) voidnotifyEntryExpired(javax.cache.Cache<K, V> cache, K key, V value) voidvoidvoidremoveListener(javax.cache.configuration.CacheEntryListenerConfiguration<K, V> reg, AbstractJCache<K, V> jcache) voidremoveSyncNotificationLatch(javax.cache.Cache<K, V> cache, K key, V value, CountDownLatch latch)
-
Constructor Details
-
AbstractJCacheNotifier
public AbstractJCacheNotifier()
-
-
Method Details
-
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) -
notifyEntryCreated
-
notifyEntryUpdated
-
notifyEntryRemoved
-
notifyEntryExpired
-
hasSyncCreatedListener
public boolean hasSyncCreatedListener() -
hasSyncRemovedListener
public boolean hasSyncRemovedListener() -
hasSyncUpdatedListener
public boolean hasSyncUpdatedListener() -
createFilterIfNeeded
-
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
-