net.fortuna.mstor.util
Class EhCacheAdapter

java.lang.Object
  extended by net.fortuna.mstor.util.CacheAdapter
      extended by net.fortuna.mstor.util.EhCacheAdapter

public class EhCacheAdapter
extends CacheAdapter

A CacheAdapter implementation that uses the Ehcache library.


Constructor Summary
EhCacheAdapter(java.lang.String cacheName)
           
 
Method Summary
 void clearCache()
          Clears the cache.
 void putObjectIntoCache(int index, java.lang.Object object)
          Puts the object in the cache.
 java.lang.Object retrieveObjectFromCache(int index)
          Retrieves the object from cache (if it's there).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EhCacheAdapter

public EhCacheAdapter(java.lang.String cacheName)
Method Detail

clearCache

public void clearCache()
Clears the cache.

Overrides:
clearCache in class CacheAdapter

retrieveObjectFromCache

public java.lang.Object retrieveObjectFromCache(int index)
Description copied from class: CacheAdapter
Retrieves the object from cache (if it's there).

Overrides:
retrieveObjectFromCache in class CacheAdapter
Parameters:
index - the index of the required object
Returns:
the object, or null if the object with the given index is not in the cache

putObjectIntoCache

public void putObjectIntoCache(int index,
                               java.lang.Object object)
Description copied from class: CacheAdapter
Puts the object in the cache.

Overrides:
putObjectIntoCache in class CacheAdapter
Parameters:
index - the index of the object
object - the object that is to be cached


Copyright © 2004-2011 Micronode. All Rights Reserved.