org.jafer.record
Class SynchronizedCache

java.lang.Object
  extended by org.jafer.record.SynchronizedCache
All Implemented Interfaces:
Cache

public class SynchronizedCache
extends java.lang.Object
implements Cache


Field Summary
(package private)  Cache cache
           
 
Constructor Summary
SynchronizedCache(Cache cache)
           
 
Method Summary
 void clear()
          clear
 boolean contains(java.lang.Integer recNo)
          contains
 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)
          getBER
 int getDataCacheSize()
          get the data cache size
 DataObject getDataObject(java.lang.Integer recNo)
          getDataObject
 org.w3c.dom.Node getXML(org.w3c.dom.Document document, java.lang.String targetSchema, java.lang.Integer recNo)
          getXML
 void put(java.lang.Integer recNo, DataObject dataObject)
          put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

Cache cache
Constructor Detail

SynchronizedCache

public SynchronizedCache(Cache cache)
Method Detail

clear

public void clear()
clear

Specified by:
clear in interface Cache

contains

public boolean contains(java.lang.Integer recNo)
contains

Specified by:
contains in interface Cache
Parameters:
recNo - Integer
Returns:
boolean

getBER

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

Specified by:
getBER in interface Cache
Parameters:
document - Document
schema - String
recNo - Integer
Returns:
Object
Throws:
JaferException

getDataObject

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

Specified by:
getDataObject in interface Cache
Parameters:
recNo - Integer
Returns:
DataObject
Throws:
JaferException

getXML

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

Specified by:
getXML in interface Cache
Parameters:
document - Document
targetSchema - String
recNo - Integer
Returns:
Node
Throws:
JaferException

put

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

Specified by:
put in interface Cache
Parameters:
recNo - Integer
dataObject - DataObject

getAvailableSlots

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

Specified by:
getAvailableSlots in interface Cache
Returns:
The number of currently availiable slots

getDataCacheSize

public int getDataCacheSize()
get the data cache size

Specified by:
getDataCacheSize in interface Cache
Returns:
The size of the data cache