public class cache extends Module implements cacheInterface
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
hits |
(package private) LRUHashtable<Object,Object> |
lines |
(package private) int |
miss |
(package private) boolean |
state_up |
configurationPath, getMaintainerFunction, getVersionFunction, properties, STATE_START_TIMEdescription, guiName, namefunctions, getFunctions| Constructor and Description |
|---|
cache()
Simple file cache system that can be used by any servlet
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
clear()
Clear the whole cache in one go
|
cacheline |
get(Object wanted)
Try to get a cacheline from cache, returns null if not found
|
String |
getModuleInfo()
Provide some info on the module;
By default, this returns the module description for the default locale
|
Map<String,String> |
getStates()
Returns the module's runtime-generated state information as a unmodifiable map with name-value pairs.
|
void |
init()
Initializes the module.
|
LRUHashtable<Object,Object> |
lines()
Old interface to the inner table, will be removed soon
|
void |
onload()
prepares the module when loaded.
|
cacheline |
put(Object key,
Object value)
Try to put a cacheline in cache, returns old one if available
In all other cases returns null.
|
(package private) void |
readParams() |
void |
reload() |
cacheline |
remove(Object key)
Remove the entry identified by key from the cache
|
void |
shutdown()
Shuts down the module.
|
Map<String,String> |
state() |
void |
unload() |
addInitParameters, getInitParameter, getInitParameter, getInitParameter, getInitParameters, getInitParameters, getMaintainer, getModule, getModule, getModule, getModule, getModuleLoader, getModuleReader, getModuleReader, getModules, getState, getVersion, hasModule, hasStarted, loadInitParameters, loadInitParameters, maintainance, setInitParameter, setMaintainer, setState, setVersion, shutdownModules, startModule, startModulesgetDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName, setNameaddFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstanceboolean state_up
int hits
int miss
LRUHashtable<Object,Object> lines
public void onload()
ModuleModule.startModules(). You should not call onload() directly.public void reload()
public void shutdown()
Modulepublic LRUHashtable<Object,Object> lines()
lines in interface cacheInterfacepublic cacheline get(Object wanted)
get in interface cacheInterfacepublic cacheline put(Object key, Object value)
put in interface cacheInterfacepublic boolean clear()
clear in interface cacheInterfacepublic cacheline remove(Object key)
remove in interface cacheInterfacepublic void init()
ModuleModule.startModule(), which makes sure it is not called
more than once. You should not call init() directly, call startModule() instead.init in interface cacheInterfaceinit in class Modulepublic void unload()
public Map<String,String> getStates()
Modulevoid readParams()
public String getModuleInfo()
ModulegetModuleInfo in class ModuleMMBase 1.9-SNAPSHOT - ${javadoctimestamp}