DODS 7.3 API

org.enhydra.dods.cache
Class DOCache

java.lang.Object
  extended by org.enhydra.dods.cache.ConfigurationAdministration
      extended by org.enhydra.dods.cache.DOCache
Direct Known Subclasses:
TransactionQueryCache

public abstract class DOCache
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:
1.0 05.08.2003.
Author:
Tanja Jovanovic, Sinisa Milosevic

Constructor Summary
DOCache()
           
 
Method Summary
abstract  GenericDO addDO(GenericDO newDO)
          Adds DO (data object) to the cache.
abstract  GenericDO deleteDO(GenericDO DO)
          Deletes DO from the cache.
abstract  java.util.Map getCacheContent()
          Returns cache (data or DataStruct) content.
abstract  GenericDO getDOByHandle(java.lang.String handle)
          Returns data object whose String representation of OID is parameter handle.
abstract  boolean isMulti()
          Returns information if multi databases are supported.
abstract  DOCache newInstance()
          Creates DOCache instance.
abstract  GenericDO removeDO(GenericDO DO)
          Removes DO (data object) from the cache.
abstract  GenericDO removeDO(java.lang.String handle)
          Removes DO (data object) from the cache.
abstract  boolean toReconfigure()
          Checks wheather cache reconfiguration needs to be done.
abstract  GenericDO updateDO(GenericDO DO)
          Updates cached DO, or inserts DO 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

DOCache

public DOCache()
Method Detail

newInstance

public abstract DOCache newInstance()
                             throws CacheObjectException
Creates DOCache instance.

Returns:
created data cache instance (for storing data (or DataStruct) objects.
Throws:
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.

addDO

public abstract GenericDO addDO(GenericDO newDO)
Adds DO (data object) to the cache.

Parameters:
newDO - Data object that will be added to the cache.
Returns:
Added data object.

removeDO

public abstract GenericDO removeDO(GenericDO DO)
Removes DO (data object) from the cache.

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

removeDO

public abstract GenericDO removeDO(java.lang.String handle)
Removes DO (data object) from the cache.

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

updateDO

public abstract GenericDO updateDO(GenericDO DO)
Updates cached DO, or inserts DO in the cache if it didn't exist in the cache.

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

deleteDO

public abstract GenericDO deleteDO(GenericDO DO)
Deletes DO from the cache.

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

getDOByHandle

public abstract GenericDO getDOByHandle(java.lang.String handle)
Returns data object whose String representation of OID is parameter handle.

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

DODS 7.3 API