org.activemath.content
Class ItemCache

java.lang.Object
  extended by org.activemath.content.ItemCache
All Implemented Interfaces:
EventListener, ActivemathEventListener, CacheControl

public class ItemCache
extends Object
implements CacheControl, ActivemathEventListener

The Item cache. Wrapper for org.apache.commons.cache.Cache


Field Summary
static String CACHE_ID
           
protected static Category log
           
 
Method Summary
 void clear()
           
 CacheInfo getCacheInfo()
           
 void onActivemathEvent(ActivemathEvent event)
          Handle an Activemath event.
 void registerStorageListener(StorageListener listener)
           
 void remove(String mbaseId)
          Remove a content Item from the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Category log

CACHE_ID

public static final String CACHE_ID
See Also:
Constant Field Values
Method Detail

remove

public void remove(String mbaseId)
Remove a content Item from the cache. Key is the absolute MBase id.

Specified by:
remove in interface CacheControl
See Also:
CacheControl.remove(java.lang.String)

clear

public void clear()
Specified by:
clear in interface CacheControl
See Also:
CacheControl.clear()

getCacheInfo

public CacheInfo getCacheInfo()
Specified by:
getCacheInfo in interface CacheControl
See Also:
CacheControl.getCacheInfo()

registerStorageListener

public void registerStorageListener(StorageListener listener)

onActivemathEvent

public void onActivemathEvent(ActivemathEvent event)
Description copied from interface: ActivemathEventListener
Handle an Activemath event.

This method must return as quickly as possible and must not block the calling thread for long.

Specified by:
onActivemathEvent in interface ActivemathEventListener
Parameters:
event - the event to respond to