|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.functions.FunctionProvider
org.mmbase.util.functions.DescribedFunctionProvider
org.mmbase.module.Module
org.mmbase.module.cache
public class cache
Simple file cache system that can be used by any servlet
| Field Summary | |
|---|---|
(package private) int |
hits
|
(package private) LRUHashtable<Object,Object> |
lines
|
(package private) int |
miss
|
(package private) boolean |
state_up
|
| Fields inherited from class org.mmbase.module.Module |
|---|
configurationPath, getMaintainerFunction, getVersionFunction, properties, STATE_START_TIME |
| Fields inherited from class org.mmbase.util.functions.DescribedFunctionProvider |
|---|
description, guiName, name |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
functions, getFunctions |
| Constructor Summary | |
|---|---|
cache()
Simple file cache system that can be used by any servlet |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.mmbase.module.Module |
|---|
addInitParameters, checkModules, 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, startModules |
| Methods inherited from class org.mmbase.util.functions.DescribedFunctionProvider |
|---|
getDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName, setName |
| Methods inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
addFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
boolean state_up
int hits
int miss
LRUHashtable<Object,Object> lines
| Constructor Detail |
|---|
public cache()
| Method Detail |
|---|
public void onload()
ModuleModule.startModules(). You should not call onload() directly.
onload in class Modulepublic void reload()
public void shutdown()
Module
shutdown in class Modulepublic LRUHashtable<Object,Object> lines()
lines in interface cacheInterfacepublic cacheline get(Object wanted)
get in interface cacheInterface
public 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()
Module
getStates in class Modulepublic Map<String,String> state()
void readParams()
public String getModuleInfo()
Module
getModuleInfo in class Module
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||