public abstract class AbstractCache extends java.lang.Object
Constructor and Description |
---|
AbstractCache() |
Modifier and Type | Method and Description |
---|---|
abstract void |
clear()
Clear the cache
|
abstract void |
end()
Call it when you're done with the cache (release resources and cleanup)
|
abstract java.lang.Object |
get(java.lang.Integer key)
Get an object from cache from its key
|
abstract java.util.Collection<java.lang.Integer> |
getAllKeys()
Get all element keys in the cache
|
abstract java.lang.String |
getName() |
long |
getProfilingTime() |
abstract boolean |
isEnabled()
Returns true if the cache is enabled
|
abstract boolean |
isInCache(java.lang.Integer key)
Test presence of a key in the cache
|
abstract boolean |
isOnDiskCache(java.lang.Integer key)
Test presence of a key in the cache
|
abstract boolean |
isOnMemoryCache(java.lang.Integer key)
Test presence of a key in the cache
|
abstract void |
remove(java.lang.Integer key)
Remove an object from the cache from its key
|
void |
resetProfiling() |
abstract void |
set(java.lang.Integer key,
java.lang.Object object,
boolean eternal)
Put an object in cache with its associated key
|
void |
setProfiling(boolean value) |
abstract long |
usedDisk()
Return used disk space for cache (in bytes)
|
abstract long |
usedMemory()
Return used memory for cache (in bytes)
|
public AbstractCache()
public abstract java.lang.String getName()
public void setProfiling(boolean value)
public void resetProfiling()
public long getProfilingTime()
public abstract boolean isEnabled()
public abstract boolean isInCache(java.lang.Integer key)
public abstract boolean isOnMemoryCache(java.lang.Integer key)
public abstract boolean isOnDiskCache(java.lang.Integer key)
public abstract long usedMemory()
public abstract long usedDisk()
public abstract java.util.Collection<java.lang.Integer> getAllKeys() throws CacheException
CacheException
public abstract java.lang.Object get(java.lang.Integer key) throws CacheException
CacheException
public abstract void set(java.lang.Integer key, java.lang.Object object, boolean eternal) throws CacheException
CacheException
public abstract void clear() throws CacheException
CacheException
public abstract void remove(java.lang.Integer key) throws CacheException
CacheException
public abstract void end()