org.exoplatform.services.cache.impl.jboss.lru
Class LRUExoCacheCreator

java.lang.Object
  extended by org.exoplatform.services.cache.impl.jboss.lru.LRUExoCacheCreator
All Implemented Interfaces:
ExoCacheCreator

public class LRUExoCacheCreator
extends Object
implements ExoCacheCreator

The LRU Implementation of an ExoCacheCreator Created by The eXo Platform SAS Author : eXoPlatform exo@exoplatform.com 21 juil. 2009


Nested Class Summary
static class LRUExoCacheCreator.LRUExoCache
          The LRU implementation of an ExoCache
 
Field Summary
protected  int defaultMaxAgeSeconds
          The default value for the parameter maxAge in seconds
static String EXPECTED_IMPL
          The expected implementation name
 
Constructor Summary
LRUExoCacheCreator()
           
 
Method Summary
 ExoCache create(ExoCacheConfig config, org.jboss.cache.TreeCache cache)
          Creates an eXo cache according to the given configuration ExoCacheConfig
 Class<? extends ExoCacheConfig> getExpectedConfigType()
          Returns the type of ExoCacheConfig expected by the creator
 String getExpectedImplementation()
          Returns the name of the implementation expected by the creator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXPECTED_IMPL

public static final String EXPECTED_IMPL
The expected implementation name

See Also:
Constant Field Values

defaultMaxAgeSeconds

protected int defaultMaxAgeSeconds
The default value for the parameter maxAge in seconds

Constructor Detail

LRUExoCacheCreator

public LRUExoCacheCreator()
Method Detail

create

public ExoCache create(ExoCacheConfig config,
                       org.jboss.cache.TreeCache cache)
                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
cache - the cache to initialize
Throws:
ExoCacheInitException - if an exception happens while initializing the cache

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

getExpectedImplementation

public String getExpectedImplementation()
Returns the name of the implementation expected by the creator. This is mainly used to be backward compatible

Specified by:
getExpectedImplementation in interface ExoCacheCreator
Returns:
the expected by the creator


Copyright © 2009 eXo Platform SAS. All Rights Reserved.