org.mmbase.cache
Class BlobCache

java.lang.Object
  extended byorg.mmbase.cache.Cache
      extended byorg.mmbase.cache.BlobCache
All Implemented Interfaces:
Map, SizeMeasurable

public abstract class BlobCache
extends Cache

The 'blob cache' is used in MMObjectNode to cache small byte-array field values. it is a replacement for the 'handle cache' which was present in MMBase <1.8.

Since:
MMBase 1.8
Version:
$Id: BlobCache.java,v 1.4 2005/07/09 11:10:09 nklasens Exp $
Author:
Michiel Meeuwissen

Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Field Summary
 
Fields inherited from class org.mmbase.cache.Cache
maxEntrySize
 
Constructor Summary
BlobCache(int size)
           
 
Method Summary
protected  int getDefaultMaxEntrySize()
          This has to be overridden by Caches which support max entry size.
 String getDescription()
          Gives a description for this cache type.
 String getKey(int nodeNumber, String fieldName)
           
 String getName()
          Returns a name for this cache type.
 Object put(Object key, Object value)
          Like 'put' of LRUHashtable but considers if the cache is active or not.
 
Methods inherited from class org.mmbase.cache.Cache
checkCachePolicy, clear, contains, containsKey, containsValue, entrySet, equals, get, getByteSize, getByteSize, getCache, getCaches, getCheapByteSize, getCount, getHits, getMaxEntrySize, getMisses, getPuts, getRatio, getStats, getTotalByteSize, hashCode, isActive, isEmpty, keySet, main, maxSize, putAll, putCache, putCache, remove, setActive, setMaxSize, size, toString, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlobCache

public BlobCache(int size)
Method Detail

getDefaultMaxEntrySize

protected int getDefaultMaxEntrySize()
Description copied from class: Cache
This has to be overridden by Caches which support max entry size.

Overrides:
getDefaultMaxEntrySize in class Cache

getName

public String getName()
Description copied from class: Cache
Returns a name for this cache type. Default it is the class name, but this normally will be overriden.

Overrides:
getName in class Cache

getDescription

public String getDescription()
Description copied from class: Cache
Gives a description for this cache type. This can be used in cache overviews.

Overrides:
getDescription in class Cache

getKey

public final String getKey(int nodeNumber,
                           String fieldName)

put

public Object put(Object key,
                  Object value)
Description copied from class: Cache
Like 'put' of LRUHashtable but considers if the cache is active or not.

Specified by:
put in interface Map
Overrides:
put in class Cache


MMBase build 1.8.1.20060716