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 void
addListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> reg, AbstractJCache<K,V> jcache, AbstractJCacheNotifier<K,V> notifier)
void
addSyncNotificationLatch(javax.cache.Cache<K,V> cache, K key, V value, CountDownLatch latch)
void
close()
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)
boolean
hasSyncCreatedListener()
boolean
hasSyncRemovedListener()
boolean
hasSyncUpdatedListener()
void
notifyEntryCreated(javax.cache.Cache<K,V> cache, K key, V value)
void
notifyEntryExpired(javax.cache.Cache<K,V> cache, K key, V value)
void
notifyEntryRemoved(javax.cache.Cache<K,V> cache, K key, V value, V prev)
void
notifyEntryUpdated(javax.cache.Cache<K,V> cache, K key, V value, V prev)
void
removeListener(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> reg, AbstractJCache<K,V> jcache)
void
removeSyncNotificationLatch(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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-