org.apache.ibatis.cache.decorators
Class SoftCache

java.lang.Object
  extended by org.apache.ibatis.cache.decorators.SoftCache
All Implemented Interfaces:
Cache

public class SoftCache
extends Object
implements Cache

Soft Reference cache decorator Thanks to Dr. Heinz Kabutz for his guidance here.


Constructor Summary
SoftCache(Cache delegate)
           
 
Method Summary
 void clear()
           
 String getId()
           
 Object getObject(Object key)
           
 ReadWriteLock getReadWriteLock()
           
 int getSize()
           
 void putObject(Object key, Object value)
           
 Object removeObject(Object key)
           
 void setSize(int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoftCache

public SoftCache(Cache delegate)
Method Detail

getId

public String getId()
Specified by:
getId in interface Cache

getSize

public int getSize()
Specified by:
getSize in interface Cache

setSize

public void setSize(int size)

putObject

public void putObject(Object key,
                      Object value)
Specified by:
putObject in interface Cache

getObject

public Object getObject(Object key)
Specified by:
getObject in interface Cache

removeObject

public Object removeObject(Object key)
Specified by:
removeObject in interface Cache

clear

public void clear()
Specified by:
clear in interface Cache

getReadWriteLock

public ReadWriteLock getReadWriteLock()
Specified by:
getReadWriteLock in interface Cache


Copyright © 2010-2012 MyBatis.org. All Rights Reserved.