Class GCacheFactory

  • All Implemented Interfaces:
    javax.cache.CacheFactory

    public class GCacheFactory
    extends Object
    implements javax.cache.CacheFactory
    JCache CacheFactory implementation using Memcache.
    • Field Detail

      • EXPIRATION_DELTA

        public static final int EXPIRATION_DELTA
        Property key for expiration time in seconds set for all put operations as an Integer.
        See Also:
        Constant Field Values
      • EXPIRATION_DELTA_MILLIS

        public static final int EXPIRATION_DELTA_MILLIS
        Property key for expiration time in milliseconds set for all put operations as an Integer.
        See Also:
        Constant Field Values
      • EXPIRATION

        public static final int EXPIRATION
        Property key for absolute expiration time for all put operations as a Date.
        See Also:
        Constant Field Values
      • SET_POLICY

        public static final int SET_POLICY
        Property key for put operation policy as a MemcacheService.SetPolicy. Defaults to SetPolicy.SET_ALWAYS if not specified.
        See Also:
        Constant Field Values
      • MEMCACHE_SERVICE

        public static final int MEMCACHE_SERVICE
        Property key for memcache service to use as a MemcacheService. Defaults to that provided by MemcacheServiceFactory.getMemcacheService if not specified.
        See Also:
        Constant Field Values
      • NAMESPACE

        public static final int NAMESPACE
        Property key for defining a non-default namespace. This has the same effect setting a namespace using MemcacheServiceFactory.getMemcacheService(String). This property is ignored if MEMCACHE_SERVICE property specified.
        See Also:
        Constant Field Values
    • Constructor Detail

      • GCacheFactory

        public GCacheFactory()
    • Method Detail

      • createCache

        public javax.cache.Cache createCache​(Map map)
        Creates a cache instance using the memcache service.
        Specified by:
        createCache in interface javax.cache.CacheFactory
        Parameters:
        map - A map of properties.
        Returns:
        a cache.