Class AbstractJCache<K,V>

java.lang.Object
org.infinispan.jcache.AbstractJCache<K,V>
All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<javax.cache.Cache.Entry<K,V>>, javax.cache.Cache<K,V>

public abstract class AbstractJCache<K,V> extends Object implements javax.cache.Cache<K,V>
  • Field Details

    • configuration

      protected final javax.cache.configuration.MutableConfiguration<K,V> configuration
    • expiryPolicy

      protected final javax.cache.expiry.ExpiryPolicy expiryPolicy
    • notifier

      protected final AbstractJCacheNotifier<K,V> notifier
    • jcacheLoader

      protected javax.cache.integration.CacheLoader<K,V> jcacheLoader
    • jcacheWriter

      protected javax.cache.integration.CacheWriter<? super K,? super V> jcacheWriter
  • Constructor Details

    • AbstractJCache

      public AbstractJCache(javax.cache.configuration.MutableConfiguration<K,V> configuration, javax.cache.CacheManager cacheManager, AbstractJCacheNotifier<K,V> notifier)
  • Method Details

    • addConfigurationListeners

      protected void addConfigurationListeners()
    • getConfiguration

      public <C extends javax.cache.configuration.Configuration<K, V>> C getConfiguration(Class<C> clazz)
      Specified by:
      getConfiguration in interface javax.cache.Cache<K,V>
    • checkNotNull

      public AbstractJCache<K,V> checkNotNull(Object obj, String name)
    • setCacheLoader

      protected void setCacheLoader(javax.cache.configuration.CompleteConfiguration<K,V> c)
    • setCacheWriter

      protected void setCacheWriter(javax.cache.configuration.CompleteConfiguration<K,V> c)
    • addCacheLoaderAdapter

      protected abstract void addCacheLoaderAdapter(javax.cache.integration.CacheLoader<K,V> cacheLoader)
    • addCacheWriterAdapter

      protected abstract void addCacheWriterAdapter(javax.cache.integration.CacheWriter<? super K,? super V> cacheWriter)
    • setListenerCompletion

      protected void setListenerCompletion(javax.cache.integration.CompletionListener listener)
    • setListenerException

      protected void setListenerException(javax.cache.integration.CompletionListener listener, Throwable t)
    • filterLoadAllKeys

      protected List<K> filterLoadAllKeys(Set<? extends K> keys, boolean replaceExistingValues, boolean cacheEvict)
    • loadAllKeys

      protected Map<K,V> loadAllKeys(Collection<? extends K> keysToLoad)
    • loadAllFromJCacheLoader

      protected void loadAllFromJCacheLoader(Set<? extends K> keys, boolean replaceExistingValues, javax.cache.integration.CompletionListener listener, org.infinispan.commons.api.BasicCache<K,V> cache, org.infinispan.commons.api.BasicCache<K,V> createCheckCache)
    • processEntryProcessor

      protected <T> T processEntryProcessor(MutableJCacheEntry<K,V> mutable, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object[] arguments)
    • checkNotClosed

      protected abstract AbstractJCache<K,V> checkNotClosed()
    • verifyKeys

      protected AbstractJCache<K,V> verifyKeys(Set<? extends K> keys)
    • invokeAll

      public <T> Map<K,javax.cache.processor.EntryProcessorResult<T>> invokeAll(Set<? extends K> keys, javax.cache.processor.EntryProcessor<K,V,T> entryProcessor, Object... arguments)
      Specified by:
      invokeAll in interface javax.cache.Cache<K,V>
    • evict

      protected abstract void evict(K key)
    • put

      protected V put(org.infinispan.commons.api.BasicCache<K,V> cache, org.infinispan.commons.api.BasicCache<K,V> createCheckCache, K key, V value, boolean isPutIfAbsent)
    • updateTTLForAccessed

      protected void updateTTLForAccessed(org.infinispan.commons.api.BasicCache<K,V> cache, K key, V value)
    • replace

      protected boolean replace(org.infinispan.commons.api.BasicCache<K,V> cache, org.infinispan.commons.api.BasicCache<K,V> existsCheckCache, K key, V oldValue, V value, boolean isConditional)
    • replace

      protected V replace(org.infinispan.commons.api.BasicCache<K,V> cache, K key, V value)
    • remove

      protected boolean remove(org.infinispan.commons.api.BasicCache<K,V> cache, K key, V oldValue)
    • getCacheManager

      public javax.cache.CacheManager getCacheManager()
      Specified by:
      getCacheManager in interface javax.cache.Cache<K,V>
    • getMBeanServer

      protected abstract MBeanServer getMBeanServer()
    • getCacheMXBean

      protected Object getCacheMXBean()
    • getCacheStatisticsMXBean

      protected abstract Object getCacheStatisticsMXBean()
    • setManagementEnabled

      public void setManagementEnabled(boolean enabled)
    • setStatisticsEnabled

      public void setStatisticsEnabled(boolean enabled)
    • addListener

      protected abstract void addListener(AbstractJCacheListenerAdapter<K,V> listenerAdapter)
    • removeListener

      protected abstract void removeListener(AbstractJCacheListenerAdapter<K,V> listenerAdapter)
    • unwrap

      public <T> T unwrap(Class<T> clazz)
      Specified by:
      unwrap in interface javax.cache.Cache<K,V>
    • addCacheEntryListenerConfiguration

      protected void addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> listenerCfg)
    • removeCacheEntryListenerConfiguration

      protected void removeCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> listenerCfg)
    • statisticsEnabled

      protected boolean statisticsEnabled()
    • managementEnabled

      public boolean managementEnabled()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface javax.cache.Cache<K,V>
      Specified by:
      close in interface Closeable