|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.hibernate.cache.SimpleMapCache
public class SimpleMapCache
Simple map cache implements Hibenrate second level cache non-transactionally. Supports
concurrency strategies of read-only
, read-write
.
Constructor Summary | |
---|---|
SimpleMapCache(String regionName,
IMap map,
long timeToLive,
long waitForResponse)
|
Method Summary | |
---|---|
void |
clear()
Clear the cache |
void |
destroy()
Clean up |
Object |
get(Object key)
Get an item from the cache, nontransactionally |
long |
getElementCountInMemory()
The count of entries currently contained in the regions in-memory store. |
long |
getElementCountOnDisk()
The count of entries currently contained in the regions disk store. |
String |
getRegionName()
Get the name of the cache region |
long |
getSizeInMemory()
The number of bytes is this cache region currently consuming in memory. |
int |
getTimeout()
Get a reasonable "lock timeout" |
void |
lock(Object key)
If this is a clustered cache, lock the item |
long |
nextTimestamp()
Generate a timestamp |
void |
put(Object key,
Object value)
Add an item to the cache, nontransactionally, with failfast semantics |
Object |
read(Object key)
Get an item from the cache |
void |
remove(Object key)
Remove an item from the cache |
Map |
toMap()
optional operation |
void |
unlock(Object key)
If this is a clustered cache, unlock the item |
void |
update(Object key,
Object value)
Add an item to the cache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleMapCache(String regionName, IMap map, long timeToLive, long waitForResponse)
Method Detail |
---|
public Object read(Object key) throws org.hibernate.cache.CacheException
read
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public Object get(Object key) throws org.hibernate.cache.CacheException
get
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public void put(Object key, Object value) throws org.hibernate.cache.CacheException
put
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public void update(Object key, Object value) throws org.hibernate.cache.CacheException
update
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public void remove(Object key) throws org.hibernate.cache.CacheException
remove
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public void clear() throws org.hibernate.cache.CacheException
clear
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public void destroy() throws org.hibernate.cache.CacheException
destroy
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public void lock(Object key) throws org.hibernate.cache.CacheException
lock
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public void unlock(Object key) throws org.hibernate.cache.CacheException
unlock
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public long nextTimestamp()
nextTimestamp
in interface org.hibernate.cache.Cache
public int getTimeout()
getTimeout
in interface org.hibernate.cache.Cache
public String getRegionName()
getRegionName
in interface org.hibernate.cache.Cache
public long getSizeInMemory()
getSizeInMemory
in interface org.hibernate.cache.Cache
public long getElementCountInMemory()
getElementCountInMemory
in interface org.hibernate.cache.Cache
public long getElementCountOnDisk()
getElementCountOnDisk
in interface org.hibernate.cache.Cache
public Map toMap()
toMap
in interface org.hibernate.cache.Cache
|
GigaSpaces XAP 7.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |