public final class EhcacheCache extends Object implements org.apache.ibatis.cache.Cache
| Constructor and Description |
|---|
EhcacheCache(String id) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
equals(Object obj) |
String |
getId() |
Object |
getObject(Object key) |
ReadWriteLock |
getReadWriteLock() |
int |
getSize() |
int |
hashCode() |
void |
putObject(Object key,
Object value) |
Object |
removeObject(Object key) |
void |
setMaxEntriesLocalDisk(long maxEntriesLocalDisk)
Sets the maximum number elements on Disk.
|
void |
setMaxEntriesLocalHeap(long maxEntriesLocalHeap)
Sets the maximum objects to be held in memory (0 = no limit).
|
void |
setMemoryStoreEvictionPolicy(String memoryStoreEvictionPolicy)
Sets the eviction policy.
|
void |
setTimeToIdleSeconds(long timeToIdleSeconds)
Sets the time to idle for an element before it expires.
|
void |
setTimeToLiveSeconds(long timeToLiveSeconds)
Sets the time to idle for an element before it expires.
|
String |
toString() |
public EhcacheCache(String id)
id - public void clear()
clear in interface org.apache.ibatis.cache.Cachepublic String getId()
getId in interface org.apache.ibatis.cache.Cachepublic Object getObject(Object key)
getObject in interface org.apache.ibatis.cache.Cachepublic ReadWriteLock getReadWriteLock()
getReadWriteLock in interface org.apache.ibatis.cache.Cachepublic int getSize()
getSize in interface org.apache.ibatis.cache.Cachepublic void putObject(Object key, Object value)
putObject in interface org.apache.ibatis.cache.Cachepublic Object removeObject(Object key)
removeObject in interface org.apache.ibatis.cache.Cachepublic void setTimeToIdleSeconds(long timeToIdleSeconds)
timeToIdleSeconds - the default amount of time to live for an element from its last accessed or modified datepublic void setTimeToLiveSeconds(long timeToLiveSeconds)
timeToLiveSeconds - the default amount of time to live for an element from its creation datepublic void setMaxEntriesLocalHeap(long maxEntriesLocalHeap)
maxElementsInMemory - The maximum number of elements in memory, before they are evicted (0 == no limit)public void setMaxEntriesLocalDisk(long maxEntriesLocalDisk)
maxElementsOnDisk - the maximum number of Elements to allow on the disk. 0 means unlimited.public void setMemoryStoreEvictionPolicy(String memoryStoreEvictionPolicy)
memoryStoreEvictionPolicy - a String representation of the policy. One of "LRU", "LFU" or "FIFO".Copyright © 2010-2013 MyBatis.org. All Rights Reserved.