org.ofbiz.base.util.cache
Class CacheLineTable<K,V>

java.lang.Object
  extended by org.ofbiz.base.util.cache.CacheLineTable<K,V>
All Implemented Interfaces:
java.io.Serializable

public class CacheLineTable<K,V>
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  java.lang.String cacheName
           
protected  java.lang.String fileStore
           
protected  jdbm.htree.HTree fileTable
           
protected  boolean isNullSet
           
protected static jdbm.RecordManager jdbmMgr
           
protected  int maxInMemory
           
protected  java.util.Map<K,CacheLine<V>> memoryTable
           
static java.lang.String module
           
protected  CacheLine<V> nullValue
           
 
Constructor Summary
CacheLineTable(java.lang.String fileStore, java.lang.String cacheName, boolean useFileSystemStore, int maxInMemory)
           
 
Method Summary
 void clear()
           
 CacheLine<V> get(java.lang.Object key)
           
 K getKeyFromMemory(int index)
           
protected  CacheLine<V> getNoCheck(java.lang.Object key)
           
 java.util.Set<? extends K> keySet()
           
 CacheLine<V> put(K key, CacheLine<V> value)
           
 CacheLine<V> remove(java.lang.Object key)
           
 void setLru(int newSize)
           
 int size()
           
 java.util.Collection<? extends CacheLine<V>> values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

module

public static final java.lang.String module

jdbmMgr

protected static transient jdbm.RecordManager jdbmMgr

fileTable

protected transient jdbm.htree.HTree fileTable

memoryTable

protected java.util.Map<K,CacheLine<V>> memoryTable

fileStore

protected java.lang.String fileStore

cacheName

protected java.lang.String cacheName

maxInMemory

protected int maxInMemory

isNullSet

protected boolean isNullSet

nullValue

protected CacheLine<V> nullValue
Constructor Detail

CacheLineTable

public CacheLineTable(java.lang.String fileStore,
                      java.lang.String cacheName,
                      boolean useFileSystemStore,
                      int maxInMemory)
Method Detail

put

public CacheLine<V> put(K key,
                        CacheLine<V> value)

get

public CacheLine<V> get(java.lang.Object key)

getNoCheck

protected CacheLine<V> getNoCheck(java.lang.Object key)

remove

public CacheLine<V> remove(java.lang.Object key)

values

public java.util.Collection<? extends CacheLine<V>> values()

keySet

public java.util.Set<? extends K> keySet()
Returns:
An unmodifiable Set for the keys for this cache; to remove while iterating call the remove method on this class.

clear

public void clear()

size

public int size()

setLru

public void setLru(int newSize)

getKeyFromMemory

public K getKeyFromMemory(int index)