Class AbstractCoherenceBasedCache<K,V,C extends CoherenceBasedConfiguration<K,V>>

java.lang.Object
com.tangosol.coherence.jcache.AbstractCoherenceBasedCache<K,V,C>
Type Parameters:
K - the type of the Cache keys
V - the type of the Cache values
C - the type of the Cache configuration
All Implemented Interfaces:
CoherenceBasedCache<K,V>, Closeable, AutoCloseable, Iterable<javax.cache.Cache.Entry<K,V>>, javax.cache.Cache<K,V>
Direct Known Subclasses:
LocalCache, PartitionedCache, PassThroughCache, RemoteCache

public abstract class AbstractCoherenceBasedCache<K,V,C extends CoherenceBasedConfiguration<K,V>> extends Object implements CoherenceBasedCache<K,V>
The base implementation of a CoherenceBasedCache.
Since:
Coherence 12.1.3
Author:
bo 2013.11.04
  • Field Details

  • Constructor Details

  • Method Details

    • 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
    • getConfiguration

      public <T extends javax.cache.configuration.Configuration<K, V>> T getConfiguration(Class<T> clz)
      Specified by:
      getConfiguration in interface javax.cache.Cache<K,V>
    • getName

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

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

      public boolean isClosed()
      Specified by:
      isClosed in interface javax.cache.Cache<K,V>
    • unwrap

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

      protected void ensureOpen() throws IllegalStateException
      Ensures that the CoherenceBasedCache is open (not closed).
      Throws:
      IllegalStateException - if the CoherenceBasedCache is closed
    • onBeforeClosing

      public abstract void onBeforeClosing()
      Closes a CoherenceBasedCache at the request of a call to Cache.close().
    • getClassLoader

      protected ClassLoader getClassLoader()
      Determine the ClassLoader to use for the CoherenceBasedCache.
      Returns:
      the ClassLoader
    • getMBean

      public abstract javax.cache.management.CacheMXBean getMBean()
      Get JMX Bean associated with Cache.
      Returns:
      JMX Bean
    • getStatistics

      public abstract JCacheStatistics getStatistics()
      Get JCache Statistics associated with Cache.
      Returns:
      JCache Statistics if exist or null.
    • setManagementEnabled

      public abstract void setManagementEnabled(boolean fEnabled)
      Set JCache Management status.
      Parameters:
      fEnabled - true to enable
    • setStatisticsEnabled

      public abstract void setStatisticsEnabled(boolean fEnabled)
      Set JCache statistics status
      Parameters:
      fEnabled - true to enable
    • isStatisticsEnabled

      public abstract boolean isStatisticsEnabled()
      Get JCache Statistics status
      Returns:
      true if enabled, otherwise false
    • getIdentifier

      public abstract JCacheIdentifier getIdentifier()
      Description copied from interface: CoherenceBasedCache
      Obtain the internal identifier used for JCache caches.
      Specified by:
      getIdentifier in interface CoherenceBasedCache<K,V>
      Returns:
      the internal JCacheIdentifier