| Constructor and Description |
|---|
SwarmCache(net.sf.swarmcache.ObjectCache cache,
java.lang.String regionName) |
| 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()
Get a reasonable "lock timeout"
|
void |
lock(java.lang.Object key)
If this is a clustered cache, lock the item
|
long |
nextTimestamp()
Generate a (coarse) 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)
Get an item from the cache
|
void |
remove(java.lang.Object key)
Remove an item from the cache
|
java.util.Map |
toMap()
optional operation
|
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)
Add an item to the cache
|
public SwarmCache(net.sf.swarmcache.ObjectCache cache,
java.lang.String regionName)
public java.lang.Object get(java.lang.Object key)
throws CacheException
get in interface Cachekey - CacheExceptionpublic java.lang.Object read(java.lang.Object key)
throws CacheException
Cacheread in interface CacheCacheExceptionpublic void update(java.lang.Object key,
java.lang.Object value)
throws CacheException
update in interface Cachekey - value - CacheExceptionpublic void put(java.lang.Object key,
java.lang.Object value)
throws CacheException
put in interface Cachekey - value - CacheExceptionpublic void remove(java.lang.Object key)
throws CacheException
remove in interface CacheCacheExceptionpublic void clear()
throws CacheException
clear in interface CacheCacheExceptionpublic void destroy()
throws CacheException
destroy in interface CacheCacheExceptionpublic void lock(java.lang.Object key)
throws CacheException
lock in interface CacheCacheExceptionpublic void unlock(java.lang.Object key)
throws CacheException
unlock in interface CacheCacheExceptionpublic long nextTimestamp()
nextTimestamp in interface Cachepublic int getTimeout()
getTimeout in interface Cachepublic java.lang.String getRegionName()
CachegetRegionName in interface Cachepublic long getSizeInMemory()
CachegetSizeInMemory in interface Cachepublic long getElementCountInMemory()
CachegetElementCountInMemory in interface Cachepublic long getElementCountOnDisk()
CachegetElementCountOnDisk in interface Cachepublic java.util.Map toMap()
Cachepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2013. All Rights Reserved.