DODS 7.3 API

org.enhydra.dods.cache
Class TransactionQueryCache

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

public abstract class TransactionQueryCache
extends DOCache

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

Version:
1.0 05.08.2003.
Author:
Tanja Jovanovic, Sinisa Milosevic

Constructor Summary
TransactionQueryCache()
           
 
Method Summary
abstract  QueryCacheItem addComplexQuery(QueryCacheItem queryItem)
          Adds complex query to complex query cache.
abstract  QueryCacheItem addSimpleQuery(QueryCacheItem queryItem)
          Adds simple query to simple query cache.
abstract  void emptyEntries(java.lang.Class tableClass)
          Dumps data structs for all instances of tableClass in transaction cache.
abstract  void emptyEntries(java.util.Vector vec, boolean incrementVersion)
           
abstract  QueryCacheItem getComplexQueryCacheItem(java.lang.String dbName, java.lang.String query)
          Returns QueryCacheItem object for specified database and complex query, if exists, otherwise null.
abstract  QueryResult getComplexQueryResults(java.lang.String dbName, java.lang.String query)
          Returns query results from complex query cache.
abstract  QueryResult getComplexQueryResults(java.lang.String dbName, java.lang.String query, int limit, int maxdb)
          Returns query results from complex query cache.
abstract  QueryResult getComplexQueryResults(java.lang.String dbName, java.lang.String query, int limit, int maxdb, boolean unique)
          Returns query results from complex query cache.
abstract  QueryResult getQueryResults(java.lang.String dbName, java.lang.String query)
          Returns query results from simple or complex query cache.
abstract  QueryCacheItem getSimpleQueryCacheItem(java.lang.String dbName, java.lang.String query)
          Returns QueryCacheItem object for specified database and simple query, if exists, otherwise null.
abstract  QueryResult getSimpleQueryResults(java.lang.String dbName, java.lang.String query)
          Returns query results from simple query cache.
abstract  QueryResult getSimpleQueryResults(java.lang.String dbName, java.lang.String query, int limit, int maxdb)
          Returns query results from simple query cache.
abstract  QueryResult getSimpleQueryResults(java.lang.String dbName, java.lang.String query, int limit, int maxdb, boolean unique)
          Returns query results from simple query cache.
abstract  QueryCacheItem newQueryCacheItemInstance(java.lang.String dbName)
          Creates new QueryCacheItem instance.
abstract  QueryCacheItem removeComplexQuery(QueryCacheItem queryItem)
          Removes complex query from complex query cache.
abstract  void removeEntries(java.lang.Class tableClass)
           
abstract  void removeEntries(java.util.Vector vec)
           
abstract  QueryCacheItem removeSimpleQuery(QueryCacheItem queryItem)
          Removes simple query from simple query cache.
 
Methods inherited from class org.enhydra.dods.cache.DOCache
addDO, deleteDO, getCacheContent, getDOByHandle, isMulti, newInstance, removeDO, removeDO, toReconfigure, updateDO
 
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

TransactionQueryCache

public TransactionQueryCache()
Method Detail

newQueryCacheItemInstance

public abstract QueryCacheItem newQueryCacheItemInstance(java.lang.String dbName)
Creates new QueryCacheItem instance.

Parameters:
dbName - Database name.
Returns:
Created QueryCacheItem.

getSimpleQueryCacheItem

public abstract QueryCacheItem getSimpleQueryCacheItem(java.lang.String dbName,
                                                       java.lang.String query)
Returns QueryCacheItem object for specified database and simple query, if exists, otherwise null.

Parameters:
dbName - Database name.
query - Query in form of String.
Returns:
QueryCacheItem object.

getComplexQueryCacheItem

public abstract QueryCacheItem getComplexQueryCacheItem(java.lang.String dbName,
                                                        java.lang.String query)
Returns QueryCacheItem object for specified database and complex query, if exists, otherwise null.

Parameters:
dbName - Database name.
query - Query in form of String.
Returns:
QueryCacheItem object.

addSimpleQuery

public abstract QueryCacheItem addSimpleQuery(QueryCacheItem queryItem)
Adds simple query to simple query cache.

Parameters:
queryItem - Query that will be added to simple query cache.
Returns:
Query added to simple query cache.

removeSimpleQuery

public abstract QueryCacheItem removeSimpleQuery(QueryCacheItem queryItem)
Removes simple query from simple query cache.

Parameters:
queryItem - QueryItem that will be removed from simple query cache.
Returns:
QueryItem removed from simple query cache.

addComplexQuery

public abstract QueryCacheItem addComplexQuery(QueryCacheItem queryItem)
Adds complex query to complex query cache.

Parameters:
queryItem - Query that will be added to complex query cache.
Returns:
Query added to complex query cache.

removeComplexQuery

public abstract QueryCacheItem removeComplexQuery(QueryCacheItem queryItem)
Removes complex query from complex query cache.

Parameters:
queryItem - Query that will be removed from complex query cache.
Returns:
Query removed from complex query cache.

getSimpleQueryResults

public abstract QueryResult getSimpleQueryResults(java.lang.String dbName,
                                                  java.lang.String query)
Returns query results from simple query cache.

Parameters:
dbName - Database name.
query - Query for which are results searched in simple query cache.
Returns:
Query results retrieved from simple cache, or null, if there are no results retrieved from simple query cache.

getSimpleQueryResults

public abstract QueryResult getSimpleQueryResults(java.lang.String dbName,
                                                  java.lang.String query,
                                                  int limit,
                                                  int maxdb)
Returns query results from simple query cache.

Parameters:
dbName - Database name.
query - Query for which are results searched in simple query cache.
limit - Specified number of results (database limit and read skip).
maxdb - Number of rows retrieved from database (or cache).
Returns:
Query results retrieved from simple cache, or null, if there are no results retrieved from simple query cache.

getSimpleQueryResults

public abstract QueryResult getSimpleQueryResults(java.lang.String dbName,
                                                  java.lang.String query,
                                                  int limit,
                                                  int maxdb,
                                                  boolean unique)
Returns query results from simple query cache.

Parameters:
dbName - Database name.
query - Query for which are results searched in simple query cache.
limit - Specified number of results (database limit and read skip).
maxdb - Number of rows retrieved from database (or cache).
unique - If true, only unique results are returned.
Returns:
Query results retrieved from simple cache, or null, if there are no results retrieved from simple query cache.

getComplexQueryResults

public abstract QueryResult getComplexQueryResults(java.lang.String dbName,
                                                   java.lang.String query)
Returns query results from complex query cache.

Parameters:
dbName - Database name.
query - Query for which are results searched in complex query cache.
Returns:
Query results retrieved from complex cache, or null, if there are no results retrieved from complex query cache.

getComplexQueryResults

public abstract QueryResult getComplexQueryResults(java.lang.String dbName,
                                                   java.lang.String query,
                                                   int limit,
                                                   int maxdb)
Returns query results from complex query cache.

Parameters:
dbName - Database name.
query - Query for which are results searched in complex query cache.
limit - Specified number of results (database limit and read skip).
maxdb - Number of rows retrieved from database (or cache).
Returns:
Query results retrieved from complex cache, or null, if there are no results retrieved from complex query cache.

getComplexQueryResults

public abstract QueryResult getComplexQueryResults(java.lang.String dbName,
                                                   java.lang.String query,
                                                   int limit,
                                                   int maxdb,
                                                   boolean unique)
Returns query results from complex query cache.

Parameters:
dbName - Database name.
query - Query for which are results searched in complex query cache.
limit - Specified number of results (database limit and read skip).
maxdb - Number of rows retrieved from database (or cache).
unique - If true, only unique results are returned.
Returns:
Query results retrieved from complex cache, or null, if there are no results retrieved from complex query cache.

getQueryResults

public abstract QueryResult getQueryResults(java.lang.String dbName,
                                            java.lang.String query)
Returns query results from simple or complex query cache.

Parameters:
dbName - Database name.
query - Query for which are results searched in simple and complex query cache.
Returns:
Query results retrieved from simple or complex cache, or null, if there are no results retrieved from simple and complex query cache.

removeEntries

public abstract void removeEntries(java.util.Vector vec)

removeEntries

public abstract void removeEntries(java.lang.Class tableClass)
Parameters:
tableClass - -

emptyEntries

public abstract void emptyEntries(java.util.Vector vec,
                                  boolean incrementVersion)

emptyEntries

public abstract void emptyEntries(java.lang.Class tableClass)
Dumps data structs for all instances of tableClass in transaction cache.

Parameters:
tableClass - - Class object whose instances will be emptied

DODS 7.3 API