クラス org.objectweb.cjdbc.controller.cache.result.AbstractResultCache

org.objectweb.cjdbc.controller.cache.result.AbstractResultCacheに対する継承グラフ

Inheritance graph
[凡例]
すべてのメンバ一覧

説明

This class defines the minimal functionnalities that a request cache must provide.

Only read requests (SELECTs) can be cached, there is no sense to cache writes as they do not provide any result to cache. However, the cache must be notified of the write queries in order to maintain cache coherency.

作者:
Emmanuel Cecchet

Nicolas Modrzyk

バージョン:
1.0

AbstractResultCache.java53 行で定義されています。

Public メソッド

int getParsingGranularity ()
void setParsingGranularity (int parsingGranularity)
void setDatabaseSchema (DatabaseSchema dbs)
void mergeDatabaseSchema (DatabaseSchema dbs)
abstract void addCachingRule (ResultCacheRule rule)
abstract ResultCacheRule getDefaultRule ()
abstract void setDefaultRule (ResultCacheRule defaultRule)
abstract void addToCache (SelectRequest request, ControllerResultSet result) throws CacheException
abstract CacheEntry getFromCache (SelectRequest request, boolean addToPendingQueries)
abstract void removeFromCache (SelectRequest request)
abstract void removeFromPendingQueries (SelectRequest request)
abstract void writeNotify (AbstractWriteRequest request) throws CacheException
abstract boolean isUpdateNecessary (UpdateRequest request) throws CacheException
abstract void flushCache ()
abstract void commit (long transactionId) throws CacheException
abstract void rollback (long transactionId) throws CacheException
String getXml ()
abstract String[][] getCacheData () throws CacheException
abstract String[][] getCacheStatsData () throws CacheException
abstract CacheStatistics getCacheStatistics ()
abstract long getCacheSize ()

Protected メソッド

abstract String getXmlImpl ()

Protected 変数

int parsingGranularity = ParsingGranularities.NO_PARSING

Static Protected 変数

Trace logger


メソッド

abstract void org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.addCachingRule ResultCacheRule  rule  )  [pure virtual]
 

Add precise management and configuration of the cache behavior. A cache rule contains information on a query pattern and how to act if that pattern was matched.

引数:
rule of action for the cache
参照:
org.objectweb.cjdbc.controller.cache.result.ResultCacheRule

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

abstract void org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.addToCache SelectRequest  request,
ControllerResultSet  result
throws CacheException [pure virtual]
 

Adds an entry request/reply to the cache. Note that if the request was already in the cache, its result must be updated in any case but the request must never appear twice in the cache.

引数:
request the request
result the result corresponding to the request
例外:
CacheException if an error occurs

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

abstract void org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.commit long  transactionId  )  throws CacheException [pure virtual]
 

Commit a transaction given its id.

引数:
transactionId the transaction id
例外:
CacheException if an error occurs

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

abstract void org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.flushCache  )  [pure virtual]
 

Removes all entries from the cache.

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

abstract String [][] org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getCacheData  )  throws CacheException [pure virtual]
 

Returns the content of the cache as displayable array of array of string

戻り値:
the data
例外:
CacheException if fails

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

参照元 org.objectweb.cjdbc.controller.monitoring.datacollector.DataCollector.retrieveCacheData().

abstract long org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getCacheSize  )  [pure virtual]
 

Returns number of entries in the cache

戻り値:
integer value representing the total number of entries

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

abstract CacheStatistics org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getCacheStatistics  )  [pure virtual]
 

Returns pointer to the stats collector

戻り値:
CacheStatistics object

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

abstract String [][] org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getCacheStatsData  )  throws CacheException [pure virtual]
 

Returns a bunch of stats collected by the cache, such as cache hits.

戻り値:
the data
例外:
CacheException if fails to collect the data.

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

参照元 org.objectweb.cjdbc.controller.monitoring.datacollector.DataCollector.retrieveCacheStatsData().

abstract ResultCacheRule org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getDefaultRule  )  [pure virtual]
 

Return the default cache rule

戻り値:
default query cache rule. Cannot be null

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

abstract CacheEntry org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getFromCache SelectRequest  request,
boolean  addToPendingQueries
[pure virtual]
 

Gets the result to the given request from the cache.

The returned ResultCacheEntry is null if the request is not present in the cache.

An invalid CacheEntry may be returned (it means that the result is null) but the already parsed query can be retrieved from the cache entry.

引数:
request an SQL select request
addToPendingQueries true if the request must be added to the pending query list on a cache miss
戻り値:
the ResultCacheEntry if found, else null

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

int org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getParsingGranularity  ) 
 

Gets the needed query parsing granularity.

戻り値:
needed query parsing granularity
参照:
setParsingGranularity

org.objectweb.cjdbc.controller.cache.result.ResultCacheで再定義されています。

AbstractResultCache.java84 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.parsingGranularity.

00085 { 00086 return parsingGranularity; 00087 }

String org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getXml  ) 
 

参照:
org.objectweb.cjdbc.common.xml.XmlComponent.getXml()
AbstractResultCache.java259 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getXmlImpl().

00261 { 00262 return getXmlImpl(); 00263 }

abstract String org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getXmlImpl  )  [protected, pure virtual]
 

Gets information about the request cache in xml

戻り値:
xml formatted String containing information

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

参照元 org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getXml().

abstract boolean org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.isUpdateNecessary UpdateRequest  request  )  throws CacheException [pure virtual]
 

Returns true if the cache does not contain the values that are given in the update statement.

引数:
request the update request that needs to be executed
戻り値:
false if the request shouldn't be executed, true otherwise.
例外:
CacheException if an error occurs

org.objectweb.cjdbc.controller.cache.result.ResultCache, org.objectweb.cjdbc.controller.cache.result.ResultCacheColumn, org.objectweb.cjdbc.controller.cache.result.ResultCacheColumnUnique, org.objectweb.cjdbc.controller.cache.result.ResultCacheDatabase, と org.objectweb.cjdbc.controller.cache.result.ResultCacheTableで実装されています.

void org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.mergeDatabaseSchema DatabaseSchema  dbs  ) 
 

Merge the given DatabaseSchema with the current one.

引数:
dbs a DatabaseSchema value
参照:
org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema

org.objectweb.cjdbc.controller.cache.result.ResultCacheで再定義されています。

AbstractResultCache.java118 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.logger.

00119 { 00120 if (logger.isInfoEnabled()) 00121 logger.info(Translate.get("cache.scheduler.doesnt.support.schemas")); 00122 }

abstract void org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.removeFromCache SelectRequest  request  )  [pure virtual]
 

Removes an entry from the cache (both request and reply are dropped). The request is NOT removed from the pending query list, but it shouldn't be in this list.

引数:
request a SelectRequest

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

参照元 org.objectweb.cjdbc.controller.cache.result.entries.ResultCacheEntryEager.invalidate().

abstract void org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.removeFromPendingQueries SelectRequest  request  )  [pure virtual]
 

Removes an entry from the pending query list.

引数:
request a SelectRequest

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

abstract void org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.rollback long  transactionId  )  throws CacheException [pure virtual]
 

Rollback a transaction given its id.

引数:
transactionId the transaction id
例外:
CacheException if an error occurs

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

void org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.setDatabaseSchema DatabaseSchema  dbs  ) 
 

Sets the DatabaseSchema of the current virtual database.

引数:
dbs a DatabaseSchema value
参照:
org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema

org.objectweb.cjdbc.controller.cache.result.ResultCacheで再定義されています。

AbstractResultCache.java106 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.logger.

00107 { 00108 if (logger.isInfoEnabled()) 00109 logger.info(Translate.get("cache.schemas.not.supported")); 00110 }

abstract void org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.setDefaultRule ResultCacheRule  defaultRule  )  [pure virtual]
 

Set the default query rule

引数:
defaultRule default rule to set

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.

void org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.setParsingGranularity int  parsingGranularity  ) 
 

Sets the needed query parsing granularity.

引数:
parsingGranularity the query parsing granularity to set
参照:
getParsingGranularity
AbstractResultCache.java95 行で定義されています。
00096 { 00097 this.parsingGranularity = parsingGranularity; 00098 }

abstract void org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.writeNotify AbstractWriteRequest  request  )  throws CacheException [pure virtual]
 

Notifies the cache that the given write request has been issued, so that cache coherency can be maintained. If the cache is distributed, this method is reponsible for broadcasting this information to other caches.

引数:
request an AbstractWriteRequest value
例外:
CacheException if an error occurs

org.objectweb.cjdbc.controller.cache.result.ResultCacheで実装されています.


変数

Trace org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.logger [static, protected]
 

初期値:

Trace .getLogger("org.objectweb.cjdbc.controller.cache")
Logger instance. AbstractResultCache.java71 行で定義されています。

参照元 org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.mergeDatabaseSchema(), と org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.setDatabaseSchema().

int org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.parsingGranularity = ParsingGranularities.NO_PARSING [protected]
 

Parsing granularity. Default is: org.objectweb.cjdbc.common.sql.ParsingGranularities#NO_PARSING. AbstractResultCache.java68 行で定義されています。

参照元 org.objectweb.cjdbc.controller.cache.result.AbstractResultCache.getParsingGranularity().


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.4に対してTue Oct 12 15:16:36 2004に生成されました。 doxygen 1.3.8