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.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 java.lang.Object get(java.lang.Object key) throws org.hibernate.cache.CacheException
get
in interface org.hibernate.cache.Cache
key
- org.hibernate.cache.CacheException
public long getElementCountInMemory()
getElementCountInMemory
in interface org.hibernate.cache.Cache
public long getElementCountOnDisk()
getElementCountOnDisk
in interface org.hibernate.cache.Cache
public java.lang.String getRegionName()
getRegionName
in interface org.hibernate.cache.Cache
public long getSizeInMemory()
getSizeInMemory
in interface org.hibernate.cache.Cache
public int getTimeout()
getTimeout
in interface org.hibernate.cache.Cache
public void lock(java.lang.Object key) throws org.hibernate.cache.CacheException
lock
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public long nextTimestamp()
nextTimestamp
in interface org.hibernate.cache.Cache
public void put(java.lang.Object key, java.lang.Object value) throws org.hibernate.cache.CacheException
put
in interface org.hibernate.cache.Cache
key
- value
- org.hibernate.cache.CacheException
public java.lang.Object read(java.lang.Object key) throws org.hibernate.cache.CacheException
read
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public void remove(java.lang.Object key) throws org.hibernate.cache.CacheException
remove
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public java.lang.String toString()
toString
in class java.lang.Object
public void unlock(java.lang.Object key) throws org.hibernate.cache.CacheException
unlock
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public void update(java.lang.Object key, java.lang.Object value) throws org.hibernate.cache.CacheException
update
in interface org.hibernate.cache.Cache
org.hibernate.cache.CacheException
public java.util.Map<?,?> toMap()
toMap
in interface org.hibernate.cache.Cache