org.jafer.record
Class AbstractCache

java.lang.Object
  extended by org.jafer.record.AbstractCache
Direct Known Subclasses:
HashtableCache

public class AbstractCache
extends java.lang.Object


Field Summary
protected  java.util.Map berCache
           
 double clear
           
protected  java.util.Map dataCache
           
protected  int dataCacheSize
           
protected  java.util.TreeMap dataTimeStamp
           
protected static java.util.logging.Logger logger
           
protected  RecordFactory recordFactory
           
protected  java.util.Map xmlCache
           
 
Constructor Summary
private AbstractCache()
           
protected AbstractCache(int dataCacheSize)
           
 
Method Summary
protected  void checkCacheSize(int size)
           
 void clear()
           
 boolean contains(java.lang.Integer recNo)
           
 int getAvailableSlots()
          Returns the number of available slots currently in the cache
 java.lang.Object getBER(org.w3c.dom.Document document, java.lang.String schema, java.lang.Integer recNo)
           
 int getDataCacheSize()
          get the data cache size
 DataObject getDataObject(java.lang.Integer recNo)
           
 org.w3c.dom.Node getXML(org.w3c.dom.Document document, java.lang.String targetSchema, java.lang.Integer recNo)
           
 void put(java.lang.Integer recNo, DataObject dataObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xmlCache

protected java.util.Map xmlCache

berCache

protected java.util.Map berCache

dataCache

protected java.util.Map dataCache

dataCacheSize

protected int dataCacheSize

logger

protected static java.util.logging.Logger logger

recordFactory

protected RecordFactory recordFactory

dataTimeStamp

protected java.util.TreeMap dataTimeStamp

clear

public double clear
Constructor Detail

AbstractCache

private AbstractCache()

AbstractCache

protected AbstractCache(int dataCacheSize)
Method Detail

getXML

public org.w3c.dom.Node getXML(org.w3c.dom.Document document,
                               java.lang.String targetSchema,
                               java.lang.Integer recNo)
                        throws JaferException
Throws:
JaferException

getBER

public java.lang.Object getBER(org.w3c.dom.Document document,
                               java.lang.String schema,
                               java.lang.Integer recNo)
                        throws JaferException
Throws:
JaferException

clear

public void clear()

getDataObject

public DataObject getDataObject(java.lang.Integer recNo)
                         throws JaferException
Throws:
JaferException

contains

public boolean contains(java.lang.Integer recNo)

put

public void put(java.lang.Integer recNo,
                DataObject dataObject)

getAvailableSlots

public int getAvailableSlots()
Returns the number of available slots currently in the cache

Returns:
The number of currently availiable slots

getDataCacheSize

public int getDataCacheSize()
get the data cache size

Returns:
The size of the data cache

checkCacheSize

protected void checkCacheSize(int size)