DODS 7.2 API

org.enhydra.dods.cache
Class DataStructCache

java.lang.Object
  extended by org.enhydra.dods.cache.ConfigurationAdministration
      extended by org.enhydra.dods.cache.DataStructCache
Direct Known Subclasses:
DataStructCacheImpl, QueryCache

public abstract class DataStructCache
extends ConfigurationAdministration

This abstract class contains data and mechanisms needed for caching data objects (or DataStruct objects) by their OIDs and provides cache configuration and administration.

Version:
2.0 15.06.2003.
Author:
Tanja Jovanovic, Nenad Vico, Zorica Suvajdzin

Constructor Summary
protected DataStructCache()
           
 
Method Summary
abstract  CoreDataStruct addDataStruct(CoreDataStruct newDS)
          Adds DataStruct object to the cache.
abstract  CoreDataStruct deleteDataStruct(CoreDataStruct data)
          Deletes DataStruct object from the cache.
abstract  java.util.Map getCacheContent()
          Returns cache (data or DataStruct) content.
abstract  CoreDataStruct getDataStructByHandle(java.lang.String handle)
          Returns DataStruct object whose String representation of OID is parameter handle.
protected  boolean isLocked()
           
abstract  boolean isMulti()
          Returns information if multi databases are supported.
abstract  DataStructCache newInstance()
          Creates DataStructCache instance.
abstract  CoreDataStruct removeDataStruct(CoreDataStruct data)
          Removes DataStruct object from the cache.
abstract  CoreDataStruct removeDataStruct(java.lang.String handle)
          Removes DataStruct object from the cache.
abstract  boolean toReconfigure()
          Checks wheather cache reconfiguration needs to be done.
abstract  CoreDataStruct updateDataStruct(CoreDataStruct data)
          Updates cached DataStruct object, or inserts it in the cache if it didn't exist in the cache.
 
Methods inherited from class org.enhydra.dods.cache.ConfigurationAdministration
checkFull, getAsynchLoadPriority, getCacheAdministration, getCachePercentage, getCacheType, getInitialCacheFetchSize, getInitialDSCacheSize, getInitialQueryCache, getLevelOfCaching, getMaxExecuteTimeCacheInit, getQueryTimeLimitCacheInit, getQueryTimeoutCacheInit, getReserveFactor, getSimpleCacheRowCountLimit, getStatistics, getSynchLoadRowCountLimit, getTableConfiguration, isComplete, isDisabled, isFull, readConfiguration, refreshStatistics, setAsynchLoadPriority, setCachePercentage, setInitialCacheFetchSize, setInitialDSCacheSize, setInitialQueryCache, setMaxExecuteTimeCacheInit, setQueryTimeLimitCacheInit, setQueryTimeoutCacheInit, setReserveFactor, setSimpleCacheRowCountLimit, setSynchLoadRowCountLimit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataStructCache

protected DataStructCache()
Method Detail

newInstance

public abstract DataStructCache newInstance()
                                     throws org.enhydra.dods.exceptions.CacheObjectException
Creates DataStructCache instance.

Returns:
created data cache instance (for storing data (or DataStruct) objects.
Throws:
org.enhydra.dods.exceptions.CacheObjectException

getCacheContent

public abstract java.util.Map getCacheContent()
Returns cache (data or DataStruct) content.

Returns:
Cache content as Map of data objects (or DataStruct objects).

isMulti

public abstract boolean isMulti()
Returns information if multi databases are supported.

Returns:
true if multi databases are used, otherwise false.

toReconfigure

public abstract boolean toReconfigure()
Checks wheather cache reconfiguration needs to be done.

Returns:
true if cache reconfiguration needs to be done, otherwise false.

addDataStruct

public abstract CoreDataStruct addDataStruct(CoreDataStruct newDS)
Adds DataStruct object to the cache.

Parameters:
newDS - DataStruct object that will be added to the cache.
Returns:
Added DataStruct object.

removeDataStruct

public abstract CoreDataStruct removeDataStruct(CoreDataStruct data)
Removes DataStruct object from the cache.

Parameters:
data - DataStruct object that will be removed from the cache.
Returns:
Removed DataStruct object, or null if there was no object removed from the cache.

removeDataStruct

public abstract CoreDataStruct removeDataStruct(java.lang.String handle)
Removes DataStruct object from the cache.

Parameters:
handle - Cache handle of DataStruct object that will be removed from the cache. The form of cache handle is: ".".
Returns:
Removed DataStruct object, or null if there was no object removed from the cache.

updateDataStruct

public abstract CoreDataStruct updateDataStruct(CoreDataStruct data)
Updates cached DataStruct object, or inserts it in the cache if it didn't exist in the cache.

Parameters:
data - DataStruct object that will be updated (or inserted if didn't exist in the cache).
Returns:
Updated or inserted DataStruct object.

deleteDataStruct

public abstract CoreDataStruct deleteDataStruct(CoreDataStruct data)
Deletes DataStruct object from the cache.

Parameters:
data - DataStruct object that will be deleted from the cache.
Returns:
Deleted DataStruct object, or null if there was no object deleted from the cache.

getDataStructByHandle

public abstract CoreDataStruct getDataStructByHandle(java.lang.String handle)
Returns DataStruct object whose String representation of OID is parameter handle.

Parameters:
handle - String representation of OID of DataStruct object that is being searched in the cache.
Returns:
DataStruct object whose String representation of OID is handle.

isLocked

protected final boolean isLocked()

DODS 7.2 API