Class JCacheContext

java.lang.Object
com.tangosol.coherence.jcache.common.JCacheContext

public class JCacheContext extends Object
Coherence JCache Context on each storage member node for JCache Cache.
Since:
Coherence 12.1.3
Author:
jf 2013.10.24
  • Constructor Details

    • JCacheContext

      protected JCacheContext(JCacheIdentifier id, javax.cache.configuration.CompleteConfiguration config)
      Constructs a context for a JCache cache on each coherence storage node.
      Parameters:
      id - JCache cache unique identifier
      config - configuration for JCache {code}id{/code}
  • Method Details

    • getExpiryPolicy

      public javax.cache.expiry.ExpiryPolicy getExpiryPolicy()
      Get ExpiryPolicy
      Returns:
      the contexts ExpiryPolicy
    • isReadThrough

      public boolean isReadThrough()
      Is read-through enabled.
      Returns:
      true if readThrough is enabled
    • getCacheLoader

      public javax.cache.integration.CacheLoader getCacheLoader()
      Return the configured CacheLoader independent if read-through is enabled or not. Note: JCache loadAll works independent of read-through being enabled.
      Returns:
      the configured CacheLoader
    • getCacheWriter

      public javax.cache.integration.CacheWriter getCacheWriter()
      If write-through is enabled, return the CacheWriter.
      Returns:
      configured CacheWriter
    • getConfiguration

      public javax.cache.configuration.CompleteConfiguration getConfiguration()
      Return the JCache cache configuration
      Returns:
      the JCache cache configuration
    • getStatistics

      public JCacheStatistics getStatistics()
      Return the statistics for this storage node.
      Returns:
      statistics
    • getContext

      public static JCacheContext getContext(ResourceRegistry reg, JCacheIdentifier cacheId)
      Get a JCacheContext for cacheId in ResourceRegistry
      Parameters:
      reg - Resource Registry to lookup up or create JCacheContext within.
      cacheId - identifier for JCacheContext
      Returns:
      JCacheContext for cache identified by cacheId or null if not registered yet.
    • getContext

      public static JCacheContext getContext(ResourceRegistry reg, JCacheIdentifier cacheId, javax.cache.configuration.CompleteConfiguration config)
      Get or Create a JCacheContext for cacheId in ResourceRegistry
      Parameters:
      reg - Resource Registry to lookup up or create JCacheContext within.
      cacheId - identifier for JCacheContext
      config - JCache Configuration to associate with a new JCacheContext.
      Returns:
      JCacheContext for cache identified by cacheId
    • unregister

      public static void unregister(ResourceRegistry reg, JCacheIdentifier cacheId)