com.flexive.shared.cache.impl
Class AbstractBackingCacheProvider<T extends FxBackingCache>

java.lang.Object
  extended by com.flexive.shared.cache.impl.AbstractBackingCacheProvider<T>
All Implemented Interfaces:
FxBackingCacheProvider
Direct Known Subclasses:
FxJBossEmbeddedCacheProvider, FxJBossExternalCacheProvider

public abstract class AbstractBackingCacheProvider<T extends FxBackingCache>
extends java.lang.Object
implements FxBackingCacheProvider

Base backing cache provider implementation.

Version:
$Rev: 2919 $
Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Field Summary
protected  T cache
           
 
Constructor Summary
AbstractBackingCacheProvider()
           
 
Method Summary
 void setEvictionStrategy(java.lang.String path, int maxContents, int timeToIdle, int timeToLive)
          Set the eviction strategy for a path (if the backing cache supports this)
 void setEvictionStrategy(java.lang.String path, int maxContents, int timeToIdle, int timeToLive, boolean overwrite)
          Set the eviction strategy for a path (if the backing cache supports this)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.flexive.shared.cache.FxBackingCacheProvider
getDescription, getInstance, init, shutdown
 

Field Detail

cache

protected T extends FxBackingCache cache
Constructor Detail

AbstractBackingCacheProvider

public AbstractBackingCacheProvider()
Method Detail

setEvictionStrategy

public void setEvictionStrategy(java.lang.String path,
                                int maxContents,
                                int timeToIdle,
                                int timeToLive,
                                boolean overwrite)
                         throws FxCacheException
Set the eviction strategy for a path (if the backing cache supports this)

Specified by:
setEvictionStrategy in interface FxBackingCacheProvider
Parameters:
path - path
maxContents - max. number of entries to allow (0=unlimited)
timeToIdle - time a value has to be idle to be evicted (0=forever)
timeToLive - time to live (0=forever)
overwrite - if an existing policy should be overwritten
Throws:
FxCacheException - on cache errors

setEvictionStrategy

public void setEvictionStrategy(java.lang.String path,
                                int maxContents,
                                int timeToIdle,
                                int timeToLive)
                         throws FxCacheException
Set the eviction strategy for a path (if the backing cache supports this)

Specified by:
setEvictionStrategy in interface FxBackingCacheProvider
Parameters:
path - path
maxContents - max. number of entries to allow (0=unlimited)
timeToIdle - time a value has to be idle to be evicted (0=forever)
timeToLive - time to live (0=forever)
Throws:
FxCacheException - on cache errors