dk.vajhoej.isam.cache
Class StandardIsamCache

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

public class StandardIsamCache
extends java.lang.Object
implements IsamCache

Class StandardIsamCache is default implementation of cache for CacheIsamSource.


Constructor Summary
StandardIsamCache()
          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

StandardIsamCache

public StandardIsamCache()
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