|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.uhn.cache.impl.SelfCachingDataSource
An IDataSource
that is an underlying IDataSource
wrapped in a read-through cache.
TODO: We allow a single result to correspond to multiple queries in
IDataSource ... this might create a cache consistency problem ... if a query
is performed, then we get remainder results, then the cached portion is
purged, then we populate the cache with the remainder, then the descriptor of
the remainder will include the cached portion which has been purged. We don't
get this problem if we only allow one query per result.
Constructor Summary | |
SelfCachingDataSource()
Default constructor. |
Method Summary | |
void |
afterPropertiesSet()
|
IQueryResult |
execute(IQuery[] theQueries)
Note that there is no optimization for sending multiple queries at once (queries are executed in series). |
IDataSource |
getDataSource()
The underlying data source. |
int |
getMaxQueryGroups()
|
ISemanticCache |
getSemanticCache()
|
void |
setDataSource(IDataSource theDataSource)
|
void |
setMaxQueryGroups(int theMaxQueryGroups)
|
void |
setSemanticCache(ISemanticCache theSemanticCache)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SelfCachingDataSource()
Method Detail |
public IQueryResult execute(IQuery[] theQueries) throws DataSourceException
execute
in interface IDataSource
theQueries
- queries to run
DataSourceException
- If the execute operation could not be successfully completed.IDataSource.execute(ca.uhn.cache.IQuery[])
public ISemanticCache getSemanticCache()
public void setSemanticCache(ISemanticCache theSemanticCache)
theSemanticCache
- The semantic cache to set.public int getMaxQueryGroups()
ISemanticCache.remainder(IQuery, int)
public void setMaxQueryGroups(int theMaxQueryGroups)
theMaxQueryGroups
- The maxQueryGroups to set.public IDataSource getDataSource()
public void setDataSource(IDataSource theDataSource)
theDataSource
- The source to set.public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |