Class GenericExoCacheCreator
java.lang.Object
org.exoplatform.services.cache.impl.infinispan.generic.GenericExoCacheCreator
- All Implemented Interfaces:
ExoCacheCreator
The generic
ExoCacheCreator for all the expiration available in infinispan.- Version:
- $Id$
- Author:
- Nicolas Filotto
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe Generic implementation of an ExoCache -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longThe default value for maxIdleprotected StringThe default value for the eviction strategyprotected longThe default value for wakeUpIntervalA set of all the implementations supported by this creator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.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> Returns the type ofExoCacheConfigexpected by the creatorReturns a set of all the implementations expected by the creator.
-
Field Details
-
defaultStrategy
The default value for the eviction strategy -
defaultMaxIdle
protected long defaultMaxIdleThe default value for maxIdle -
defaultWakeUpInterval
protected long defaultWakeUpIntervalThe default value for wakeUpInterval -
implementations
A set of all the implementations supported by this creator
-
-
Constructor Details
-
GenericExoCacheCreator
public GenericExoCacheCreator()
-
-
Method Details
-
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
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.ExoCacheInitExceptionCreates 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
-