dk.vajhoej.isam.cache
Class EHCacheWrapper

java.lang.Object
  extended by dk.vajhoej.isam.cache.EHCacheWrapper
All Implemented Interfaces:
IsamCache

public class EHCacheWrapper
extends java.lang.Object
implements IsamCache

Class StandardIsamCache is a wrapper for EHCache for CacheIsamSource.


Constructor Summary
EHCacheWrapper(net.sf.ehcache.CacheManager mgr, java.lang.String cachnam)
          Create instance of StandardIsamCache.
 
Method Summary
<T,TK> T
get(java.lang.Class<T> t, Key<TK> k)
          Get object from cache.
 double getHitRate()
          Get hit rate.
<T,TK> void
put(Key<TK> k, T o)
          Put object in cache.
<T,TK> void
remove(java.lang.Class<T> clz, Key<TK> k)
          Remove object from cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EHCacheWrapper

public EHCacheWrapper(net.sf.ehcache.CacheManager mgr,
                      java.lang.String cachnam)
Create instance of StandardIsamCache.

Method Detail

get

public <T,TK> T get(java.lang.Class<T> t,
                    Key<TK> k)
Description copied from interface: IsamCache
Get object from cache.

Specified by:
get in interface IsamCache
Parameters:
t - type
k - key
Returns:
object

put

public <T,TK> void put(Key<TK> k,
                       T o)
Description copied from interface: IsamCache
Put object in cache.

Specified by:
put in interface IsamCache
Parameters:
k - key
o - object

remove

public <T,TK> void remove(java.lang.Class<T> clz,
                          Key<TK> k)
Description copied from interface: IsamCache
Remove object from cache.

Specified by:
remove in interface IsamCache
Parameters:
clz - type
k - key

getHitRate

public double getHitRate()
Description copied from interface: IsamCache
Get hit rate.

Specified by:
getHitRate in interface IsamCache
Returns:
cache hit rate