Class GenericExoCacheCreator

java.lang.Object
org.exoplatform.services.cache.impl.infinispan.generic.GenericExoCacheCreator
All Implemented Interfaces:
ExoCacheCreator

public class GenericExoCacheCreator extends Object implements ExoCacheCreator
The generic ExoCacheCreator for all the expiration available in infinispan.
Version:
$Id$
Author:
Nicolas Filotto
  • Field Details

    • defaultStrategy

      protected String defaultStrategy
      The default value for the eviction strategy
    • defaultMaxIdle

      protected long defaultMaxIdle
      The default value for maxIdle
    • defaultWakeUpInterval

      protected long defaultWakeUpInterval
      The default value for wakeUpInterval
    • implementations

      protected Set<String> implementations
      A set of all the implementations supported by this creator
  • Constructor Details

    • GenericExoCacheCreator

      public GenericExoCacheCreator()
  • Method Details

    • getExpectedImplementations

      public Set<String> getExpectedImplementations()
      Returns a set of all the implementations expected by the creator. This is mainly used to be backward compatible
      Specified by:
      getExpectedImplementations in interface ExoCacheCreator
      Returns:
      the expected by the creator
    • getExpectedConfigType

      public Class<? extends org.exoplatform.services.cache.ExoCacheConfig> getExpectedConfigType()
      Returns the type of ExoCacheConfig expected by the creator
      Specified by:
      getExpectedConfigType in interface ExoCacheCreator
      Returns:
      the expected type
    • create

      public org.exoplatform.services.cache.ExoCache<Serializable,Object> create(org.exoplatform.services.cache.ExoCacheConfig config, org.infinispan.configuration.cache.ConfigurationBuilder confBuilder, Callable<org.infinispan.Cache<Serializable,Object>> cacheGetter) throws org.exoplatform.services.cache.ExoCacheInitException
      Creates an eXo cache according to the given configuration ExoCacheConfig
      Specified by:
      create in interface ExoCacheCreator
      Parameters:
      config - the configuration of the cache to apply
      confBuilder - the configuration builder of the infinispan cache
      cacheGetter - a Callable instance from which we can get the cache
      Throws:
      org.exoplatform.services.cache.ExoCacheInitException - if an exception happens while initializing the cache