com.impetus.kundera.cache.ehcache
Class EhCacheWrapper

java.lang.Object
  extended by com.impetus.kundera.cache.ehcache.EhCacheWrapper
All Implemented Interfaces:
javax.persistence.Cache

public class EhCacheWrapper
extends Object
implements Cache

Cache implementation using Ehcache.

Author:
animesh.kumar

Field Summary
private  net.sf.ehcache.Cache ehcache
          The ehcache.
 
Constructor Summary
EhCacheWrapper(net.sf.ehcache.Cache ehcache)
          Instantiates a new eh cache wrapper.
 
Method Summary
 boolean contains(Class arg0, Object arg1)
           
 void evict(Class arg0)
           
 void evict(Class arg0, Object arg1)
           
 void evictAll()
           
 Object get(Object key)
           
private  boolean isAlive()
           
 void put(Object key, Object value)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ehcache

private net.sf.ehcache.Cache ehcache
The ehcache.

Constructor Detail

EhCacheWrapper

public EhCacheWrapper(net.sf.ehcache.Cache ehcache)
Instantiates a new eh cache wrapper.

Parameters:
ehcache - the ehcache
Method Detail

get

public Object get(Object key)

put

public void put(Object key,
                Object value)

size

public int size()

contains

public boolean contains(Class arg0,
                        Object arg1)
Specified by:
contains in interface javax.persistence.Cache

evict

public void evict(Class arg0)
Specified by:
evict in interface javax.persistence.Cache

evict

public void evict(Class arg0,
                  Object arg1)
Specified by:
evict in interface javax.persistence.Cache

evictAll

public void evictAll()
Specified by:
evictAll in interface javax.persistence.Cache

isAlive

private boolean isAlive()


Copyright © 2014. All Rights Reserved.