ca.uhn.cache
Interface IParamSpace

All Known Implementing Classes:
ParamSpace

public interface IParamSpace

A multi-dimensional space of IQueryParams. A data item has a location in this space (see IDataInspector). Data items are divided into IChunks that represent regions of the space.

Version:
$Revision: 1.1 $ updated on $Date: 2005/01/24 22:52:08 $ by $Author: bryan_tripp $
Author:
Bryan Tripp

Method Summary
 IQueryParam[] chunk(IQueryParam theParam)
          TODO: this assumes that chunk sizes along a given dimension are independent of other dimensions, but this may not be feasible.
 IDimension[] getDimensions()
           
 IQuery[] group(IQuery[] theQueries, int theMaxGroups)
          Given a list of queries, finds a small set of queries that includes all of them, without including too many queries that aren't in the list.
 

Method Detail

getDimensions

public IDimension[] getDimensions()
Returns:
a list of dimensions according to which data are chunked.

chunk

public IQueryParam[] chunk(IQueryParam theParam)
TODO: this assumes that chunk sizes along a given dimension are independent of other dimensions, but this may not be feasible. For example, possibly sparse data (e.g. ECG should be divided into longer time spans than oft-collected data (e.g. CBC), in order to have an efficient number of data items per chunk. RESOLUTION: allow multiple caches in SelfCachingDataSource

Parameters:
theParam - a IQueryParam
Returns:
a list of IQueryParams that together encompasses the given IQueryParam, each of which corresponds to the size of a IChunk.

group

public IQuery[] group(IQuery[] theQueries,
                      int theMaxGroups)
Given a list of queries, finds a small set of queries that includes all of them, without including too many queries that aren't in the list. There may be a trade-off between number of queries returned and extra queries included. For example, one query could be returned for each original query, in which case no extra queries would be included. On the other hand a single query could be returnd which covers the whole IParamSpace. Good solutions lie somewhere between these extremes.

Parameters:
theQueries - a list of IQueryies to be covered by the returned IQuerys
theMaxGroups - maximum number of IQuerys returned (lower numbers will generally force more extra chunks to be spanned)
Returns:
a list of IQuerys that include all the specified chunks


Copyright © 2004-2005 University Health Network. All Rights Reserved.