org.mmbase.module
Class cache

java.lang.Object
  extended byorg.mmbase.module.Module
      extended byorg.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:
$Id: cache.java,v 1.12 2003/03/10 11:50:13 pierre Exp $
Author:
$Author: pierre $
Warning: Will be renamed to:
Cache
Warning: Will be moved to:
org.mmbase.cache.implementation
Class for Application :
cache [utility, implementation]
Warning: No Java Documentation Available.

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()
          prepares the module when loaded.
 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
getInitParameter, getInitParameters, getMaintainer, getMimeType, getMimeTypeFile, getModule, getModule, getModules, getName, getProperties, getProperty, getVersion, hasStarted, loadModulesFromDisk, 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()
Description copied from class: Module
prepares the module when loaded. Onload must be overridden to execute methods that need to be performed when the module is loaded but before any other modules are initailized.
This method is called by Module.startModules(). You should not call onload() directly.

Specified by:
onload in class Module
Warning: Contains Duplicate Code (present in other classes)

reload

public void reload()
Warning: No Java Documentation Available.

shutdown

public void shutdown()
Description copied from class: Module
Shuts down the module. This method is called by shutdownModules.

Overrides:
shutdown in class Module
Warning: Contains Duplicate Code (present in other classes)

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
Warning: No Java Documentation Available.

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
Warning: No Java Documentation Available.

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
Warning: No Java Documentation Available.

init

public void init()
Description copied from class: Module
Initializes the module. Init must 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
Specified by:
init in class Module
Warning: No Java Documentation Available.

unload

public void unload()
Warning: No Java Documentation Available.

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
Warning: No Java Documentation Available.

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
Warning: Contains Duplicate Code (present in other classes)
Should be handled with a standard method in Module that uses the configuration files.


MMBase build 1.7.1.20041002