|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.uhn.cache.impl.ChunkBasedSemanticCache
Semantic cache implementation that uses the chunk approach described in
Constructor Summary | |
ChunkBasedSemanticCache()
|
Method Summary | |
IQueryResult |
get(IQuery theQuery)
|
IChunkStore |
getChunkStore()
|
java.util.Date |
getEarliestCacheTime(IQuery theQuery)
TODO: optimize!! |
IParamSpace |
getParamSpace()
|
IQueryResultStore |
getQueryResultStore()
|
void |
put(IQuery theQueryScope,
IQueryResult theResult)
|
IQuery[] |
remainder(IQuery theQuery,
int theMaxGroups)
Given an IQuery, find a small list of new IQuery that span all the data in the original IQuery that are not present in the cache. Some extra data may (i.e. data in the cache or data not requested) may be spaned. Generally there is a trade-off between extra data and number of new queries returned. |
void |
setChunkStore(IChunkStore theChunkStore)
|
void |
setParamSpace(IParamSpace theParamSpace)
|
void |
setQueryResultStore(IQueryResultStore theQueryResultStore)
|
void |
update(IQueryResult theResult)
Updates semantic regions that are already in the cache with revised data. This does not change the semantic scope of the cache, but may add or alter data items. If a data item moves from one semantic region to another as a result of an update, then if both regions are cached, the changed data will replace the old data, effectively removing it from the old region. If the new region is not cached, the data will remain in the old region, until it is evicted. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ChunkBasedSemanticCache()
Method Detail |
public IQuery[] remainder(IQuery theQuery, int theMaxGroups) throws CacheException
remainder
in interface ISemanticCache
theQuery
- parameters identifying the scope of data requestedtheMaxGroups
- maximum number of IQuery
s returned (lower numbers
will generally force more extra data to be spanned). A value of 0 means that
no grouping is requested.
CacheException
- If the remainder operation could not be successfully completed.public IQueryResult get(IQuery theQuery) throws CacheException
get
in interface ISemanticCache
theQuery
- parameters identifying the scope of data requested
CacheException
- If the get operation could not be successfully completed.public void put(IQuery theQueryScope, IQueryResult theResult) throws CacheException
put
in interface ISemanticCache
theQueryScope
- parameters identifying the scope of a querytheResult
- the results from the underlying system that are not
already in the cache (to be cached)
CacheException
- If the put operation could not be successfully completed.public void update(IQueryResult theResult) throws CacheException
update
in interface ISemanticCache
theResult
- new or changed data items for semantic regions already in the cache
CacheException
- if operation could not be completed successfullypublic IParamSpace getParamSpace()
public void setParamSpace(IParamSpace theParamSpace)
theParamSpace
- The paramSpace to set.public IChunkStore getChunkStore()
public void setChunkStore(IChunkStore theChunkStore)
theChunkStore
- The chunkStore to set.public IQueryResultStore getQueryResultStore()
public void setQueryResultStore(IQueryResultStore theQueryResultStore)
theQueryResultStore
- The queryResultStore to set.public java.util.Date getEarliestCacheTime(IQuery theQuery) throws CacheException
getEarliestCacheTime
in interface ISemanticCache
theQuery
- parameters identifying the scope of data requested
CacheException
- if operation could not be completed successfullyISemanticCache.getEarliestCacheTime(ca.uhn.cache.IQuery)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |