org.mmbase.module
Class cache

java.lang.Object
  |
  +--org.mmbase.module.Module
        |
        +--org.mmbase.module.cache
All Implemented Interfaces:
cacheInterface

public class cache
extends Module
implements cacheInterface

Simple file cache system that can be used by any servlet

Version:
$Revision: 1.10 $ $Date: 2002/01/03 10:41:26 $
Author:
$Author: pierre $

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(java.lang.Object wanted)
          Try to get a cacheline from cache, returns null if not found
 java.lang.String getModuleInfo()
          provide some info on the module
 void init()
          Initializes the module.
 LRUHashtable lines()
          Old interface to the inner table, will be removed soon
 void maintainance()
          Maintainance call, will be called by the admin to perform managment tasks.
 void onload()
           
 cacheline put(java.lang.Object key, java.lang.Object value)
          Try to put a cacheline in cache, returns old one if available In all other cases returns null.
 void reload()
           
 cacheline remove(java.lang.Object key)
          Remove the entry identified by key from the cache
 void shutdown()
          Shuts down the module.
 java.util.Hashtable state()
          state, returns the state hashtable that is/can be used to debug.
 void unload()
           
 
Methods inherited from class org.mmbase.module.Module
getClassName, getInitParameter, getInitParameters, getMaintainer, getMimeType, getMimeTypeFile, getModule, getModule, getModules, getName, getProperties, getProperty, getVersion, hasStarted, loadModulesFromDisk, setClassName, setInitParameter, setMaintainer, setName, setVersion, shutdownModules, startModule, startModules
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

cache

public cache()
Simple file cache system that can be used by any servlet
Method Detail

onload

public void onload()
Overrides:
onload in class Module

reload

public void reload()

shutdown

public void shutdown()
Description copied from class: Module
Shuts down the module.
Overrides:
shutdown in class Module

lines

public LRUHashtable lines()
Old interface to the inner table, will be removed soon
Specified by:
lines in interface cacheInterface

get

public cacheline get(java.lang.Object wanted)
Try to get a cacheline from cache, returns null if not found
Specified by:
get in interface cacheInterface

put

public cacheline put(java.lang.Object key,
                     java.lang.Object value)
Try to put a cacheline in cache, returns old one if available In all other cases returns null.
Specified by:
put in interface cacheInterface

clear

public boolean clear()
Clear the whole cache in one go
Specified by:
clear in interface cacheInterface

remove

public cacheline remove(java.lang.Object key)
Remove the entry identified by key from the cache
Specified by:
remove in interface cacheInterface

init

public void init()
Description copied from class: Module
Initializes the module. Init can be overridden to read the environment variables it needs.
This method is called by Module.startModule(), which makes sure it is not called more than once. You should not call init() directly, call startModule() instead.
Specified by:
init in interface cacheInterface
Overrides:
init in class Module

unload

public void unload()

state

public java.util.Hashtable state()
Description copied from class: Module
state, returns the state hashtable that is/can be used to debug. Should be overridden when live state should be done.
Overrides:
state in class Module

maintainance

public void maintainance()
Maintainance call, will be called by the admin to perform managment tasks. This can be used instead of its own thread.
Overrides:
maintainance in class Module

getModuleInfo

public java.lang.String getModuleInfo()
Description copied from class: Module
provide some info on the module
Overrides:
getModuleInfo in class Module


MMBase build 1.6.5.20030923