ca.uhn.cache.util
Class UnstationaryQueryProcessor
java.lang.Object
ca.uhn.cache.util.QueryProcessor
ca.uhn.cache.util.UnstationaryQueryProcessor
- public class UnstationaryQueryProcessor
- extends QueryProcessor
An extension of QueryProcessor to handle unstationary data.
See IUnstationaryDataSource for discussion.
- Version:
- $Revision: 1.1 $ updated on $Date: 2005/01/24 22:51:49 $ by $Author: bryan_tripp $
- Author:
- Bryan Tripp
Method Summary |
java.util.Date |
getUpdateBoundary()
|
protected void |
init()
Does nothing (over-rides default of starting cache query ... |
void |
setUpdate(IQueryResult theUpdate)
Must be called before getCombinedData(). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnstationaryQueryProcessor
public UnstationaryQueryProcessor(IQuery theQuery,
ISemanticCache theCache,
int theMaxGroups,
EDU.oswego.cs.dl.util.concurrent.Executor theExecutor)
throws CacheException
- Parameters:
theQuery
- the query to processtheCache
- the cache against which to process ittheMaxGroups
- maximum number of remainder queriestheExecutor
- handler of concurrent tasks (defaults to DirectExecutor if null)
- Throws:
CacheException
- if there is a problem finding the query remainder
init
protected void init()
- Does nothing (over-rides default of starting cache query ... this is deferred until
setUpdate() is called).
- Overrides:
init
in class QueryProcessor
getUpdateBoundary
public java.util.Date getUpdateBoundary()
throws CacheException
- Returns:
- the date since which updates are needed from the source system, for cached regions,
in order to ensure cache consistency. Should be used in a source system query (for
example against an IUnstationaryDataSource) and the results should be passed to setUpdate(...).
- Throws:
CacheException
- if unable to perform
setUpdate
public void setUpdate(IQueryResult theUpdate)
throws CacheException
- Must be called before getCombinedData(). The cache is not queried until it is updated
via this call.
- Parameters:
theUpdate
- results of an update query against the original source data. The update query
has the same scope as theQuery, except that it is limited to data that have been updated
since corresponding cached data were cached. It is used to make cached regions current before
performing the main query. An IUnstationaryDataSource can be used as a source. This is
essential only for unstationary data, i.e. data that may move between semantic regions.
Unstationary data, if not updated, may result in records missing from getCombinedResult().
- Throws:
CacheException
- if unable to perform
Copyright © 2004-2005 University Health Network. All Rights Reserved.