gnu.beanfactory.jdbc
Class CachedQuery
java.lang.Object
|
+--gnu.beanfactory.jdbc.Query
|
+--gnu.beanfactory.jdbc.CachedQuery
- public class CachedQuery
- extends Query
Query implementation with caching behavior. Instances of CachedQuery will
not cache unless the cacheTTL and cacheRowCountMax
threshold values are set.
| propertyName | description | required? |
|---|
| connectionPool | URL reference to a ConnectionPool | true |
| dataBeanClass | Fully qualified class name of the data bean | true |
| sql | select SQL statement | true |
| propertyMap | Properties cotaining columnName to propertyName mappings | false |
| cacheTTL | Max # of seconds a cached result can remain in the cache before becoming stale. Default: -1 (Will not allow cached entries. | false) |
| cacheRowCountMax | Maximum number of result set rows that can be in the cache. Default: 0 (Will not allow cached entries) | false |
| Methods inherited from class gnu.beanfactory.jdbc.Query |
columnToPropertyName, doSelect, getConnectionPool, getDataBeanClass, getPropertyMap, getSql, newRowBean, select, select, select, selectFirst, selectFirst, selectFirst, selectFirstUncached, selectFirstUncached, selectFirstUncached, selectUncached, selectUncached, selectUncached, setConnectionPool, setDataBeanClass, setPropertyMap, setSql |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CachedQuery
public CachedQuery()
getCacheRowCountMax
public long getCacheRowCountMax()
setCacheRowCountMax
public void setCacheRowCountMax(long l)
getCacheTTL
public long getCacheTTL()
setCacheTTL
public void setCacheTTL(long l)
getCacheRowCount
public long getCacheRowCount()
cacheResults
protected void cacheResults(Query.CacheKey key,
java.lang.Object[] results)
- Overrides:
cacheResults in class Query
getResultsFromCache
protected java.lang.Object[] getResultsFromCache(Query.CacheKey key)
- Overrides:
getResultsFromCache in class Query
flushCache
protected void flushCache(Query.CacheKey key)
- Overrides:
flushCache in class Query
flushCache
protected void flushCache()
- Overrides:
flushCache in class Query