public class GemFireCache
extends java.lang.Object
implements org.hibernate.cache.Cache
| Constructor and Description |
|---|
GemFireCache(Region region,
DistributedLockService lockService) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the cache
|
void |
destroy()
Clean up
|
java.lang.Object |
get(java.lang.Object key)
Get an item from the cache
|
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.
|
java.lang.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()
Return the lock timeout for this cache.
|
void |
lock(java.lang.Object key)
If this is a clustered cache, lock the item
|
long |
nextTimestamp()
Generate the next timestamp
|
void |
put(java.lang.Object key,
java.lang.Object value)
Add an item to the cache
|
java.lang.Object |
read(java.lang.Object key) |
void |
remove(java.lang.Object key)
Remove an item from the cache
|
java.util.Map<?,?> |
toMap() |
java.lang.String |
toString() |
void |
unlock(java.lang.Object key)
If this is a clustered cache, unlock the item
|
void |
update(java.lang.Object key,
java.lang.Object value) |
public GemFireCache(Region region, DistributedLockService lockService)
public void clear()
throws org.hibernate.cache.CacheException
clear in interface org.hibernate.cache.Cacheorg.hibernate.cache.CacheExceptionpublic void destroy()
throws org.hibernate.cache.CacheException
destroy in interface org.hibernate.cache.Cacheorg.hibernate.cache.CacheExceptionpublic java.lang.Object get(java.lang.Object key)
throws org.hibernate.cache.CacheException
get in interface org.hibernate.cache.Cachekey - org.hibernate.cache.CacheExceptionpublic long getElementCountInMemory()
getElementCountInMemory in interface org.hibernate.cache.Cachepublic long getElementCountOnDisk()
getElementCountOnDisk in interface org.hibernate.cache.Cachepublic java.lang.String getRegionName()
getRegionName in interface org.hibernate.cache.Cachepublic long getSizeInMemory()
getSizeInMemory in interface org.hibernate.cache.Cachepublic int getTimeout()
getTimeout in interface org.hibernate.cache.Cachepublic void lock(java.lang.Object key)
throws org.hibernate.cache.CacheException
lock in interface org.hibernate.cache.Cacheorg.hibernate.cache.CacheExceptionpublic long nextTimestamp()
nextTimestamp in interface org.hibernate.cache.Cachepublic void put(java.lang.Object key,
java.lang.Object value)
throws org.hibernate.cache.CacheException
put in interface org.hibernate.cache.Cachekey - value - org.hibernate.cache.CacheExceptionpublic java.lang.Object read(java.lang.Object key)
throws org.hibernate.cache.CacheException
read in interface org.hibernate.cache.Cacheorg.hibernate.cache.CacheExceptionpublic void remove(java.lang.Object key)
throws org.hibernate.cache.CacheException
remove in interface org.hibernate.cache.Cacheorg.hibernate.cache.CacheExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic void unlock(java.lang.Object key)
throws org.hibernate.cache.CacheException
unlock in interface org.hibernate.cache.Cacheorg.hibernate.cache.CacheExceptionpublic void update(java.lang.Object key,
java.lang.Object value)
throws org.hibernate.cache.CacheException
update in interface org.hibernate.cache.Cacheorg.hibernate.cache.CacheExceptionpublic java.util.Map<?,?> toMap()
toMap in interface org.hibernate.cache.Cache