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 genericExoCacheCreatorfor all the expiration available in infinispan.- Version:
- $Id$
- Author:
- Nicolas Filotto
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGenericExoCacheCreator.GenericExoCacheThe Generic implementation of an ExoCache
-
Field Summary
Fields Modifier and Type Field Description protected longdefaultMaxIdleThe default value for maxIdleprotected StringdefaultStrategyThe default value for the eviction strategyprotected longdefaultWakeUpIntervalThe default value for wakeUpIntervalprotected Set<String>implementationsA set of all the implementations supported by this creator
-
Constructor Summary
Constructors Constructor Description GenericExoCacheCreator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)Creates an eXo cache according to the given configurationExoCacheConfigClass<? extends org.exoplatform.services.cache.ExoCacheConfig>getExpectedConfigType()Returns the type ofExoCacheConfigexpected by the creatorSet<String>getExpectedImplementations()Returns a set of all the implementations expected by the creator.
-
-
-
Field Detail
-
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
-
-
Method Detail
-
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:
getExpectedImplementationsin interfaceExoCacheCreator- Returns:
- the expected by the creator
-
getExpectedConfigType
public Class<? extends org.exoplatform.services.cache.ExoCacheConfig> getExpectedConfigType()
Returns the type ofExoCacheConfigexpected by the creator- Specified by:
getExpectedConfigTypein interfaceExoCacheCreator- 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 configurationExoCacheConfig- Specified by:
createin interfaceExoCacheCreator- Parameters:
config- the configuration of the cache to applyconfBuilder- the configuration builder of the infinispan cachecacheGetter- aCallableinstance from which we can get the cache- Throws:
org.exoplatform.services.cache.ExoCacheInitException- if an exception happens while initializing the cache
-
-