com.flexive.shared.cache
Interface FxBackingCacheProvider

All Known Implementing Classes:
AbstractBackingCacheProvider, FxJBossEmbeddedCacheProvider, FxJBossExternalCacheProvider

public interface FxBackingCacheProvider

A FxBackingCache Provider

Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Method Summary
 java.lang.String getDescription()
          Get a description of the provider
 FxBackingCache getInstance()
          Get the cache instance
 void init()
          Initialize the provider
 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)
 void shutdown()
          Shutdown the provider
 

Method Detail

getDescription

java.lang.String getDescription()
Get a description of the provider

Returns:
description of the provider

init

void init()
          throws FxCacheException
Initialize the provider

Throws:
FxCacheException - on errors

shutdown

void shutdown()
              throws FxCacheException
Shutdown the provider

Throws:
FxCacheException - on errors

getInstance

FxBackingCache getInstance()
                           throws FxCacheException
Get the cache instance

Returns:
cache instance
Throws:
FxCacheException - on errors

setEvictionStrategy

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)

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

setEvictionStrategy

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)

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
Since:
3.0.2