eXo Kernel :: Cache Extension :: Infinispan Implementation 2.5.0-Alpha3

org.exoplatform.services.cache.impl.infinispan.generic
Class GenericExoCacheCreator

java.lang.Object
  extended by 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

Nested Class Summary
static class GenericExoCacheCreator.GenericExoCache
          The Generic implementation of an ExoCache
 
Field Summary
protected  long defaultMaxIdle
          The default value for maxIdle
protected  String defaultStrategy
          The default value for the eviction strategy
protected  long defaultWakeUpInterval
          The default value for wakeUpInterval
protected  Set<String> implementations
          A set of all the implementations supported by this creator
 
Constructor Summary
GenericExoCacheCreator()
           
 
Method Summary
 ExoCache<Serializable,Object> create(ExoCacheConfig config, org.infinispan.configuration.cache.ConfigurationBuilder confBuilder, Callable<org.infinispan.Cache<Serializable,Object>> cacheGetter)
          Creates an eXo cache according to the given configuration ExoCacheConfig
 Class<? extends ExoCacheConfig> getExpectedConfigType()
          Returns the type of ExoCacheConfig expected by the creator
 Set<String> getExpectedImplementations()
          Returns a set of all the implementations expected by the creator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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


implementations

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

Constructor Detail

GenericExoCacheCreator

public GenericExoCacheCreator()
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:
getExpectedImplementations in interface ExoCacheCreator
Returns:
the expected by the creator

getExpectedConfigType

public Class<? extends ExoCacheConfig> getExpectedConfigType()
Returns the type of ExoCacheConfig expected by the creator

Specified by:
getExpectedConfigType in interface ExoCacheCreator
Returns:
the expected type

create

public ExoCache<Serializable,Object> create(ExoCacheConfig config,
                                            org.infinispan.configuration.cache.ConfigurationBuilder confBuilder,
                                            Callable<org.infinispan.Cache<Serializable,Object>> cacheGetter)
                                     throws 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:
ExoCacheInitException - if an exception happens while initializing the cache

eXo Kernel :: Cache Extension :: Infinispan Implementation 2.5.0-Alpha3

Copyright © 2013 eXo Platform SAS. All Rights Reserved.