|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A ISemanticCache
keeps rapidly available copies of data in some
underlying system. Data are stored in IChunk
s which contain groups
of data items that are likely to be requested together.
Cache size and consistency with source data must be maintained by ongoing removal
of old data from the cache. However the details are internal and thus not part of
this interface.
NOTE:
This class will throw checked exception only to alert the client of situations when
the requested method could not fulfill its intended semantic. For example assume we have
an implementation of this interface that uses a relational backend to store the cached data,
such implementation will define a new exception that inherits from
CacheException
named RelationalBackendNotAvailable to indicate that the relational
backend couldn't be reached.
Method Summary | |
IQueryResult |
get(IQuery theQuery)
|
java.util.Date |
getEarliestCacheTime(IQuery theQuery)
|
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. |
void |
update(IQueryResult theResult)
Updates semantic regions that are already in the cache with revised data. |
Method Detail |
public IQuery[] remainder(IQuery theQuery, int theMaxGroups) throws CacheException
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
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
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 java.util.Date getEarliestCacheTime(IQuery theQuery) throws CacheException
theQuery
- parameters identifying the scope of data requested
CacheException
- if operation could not be completed successfullypublic void update(IQueryResult theResult) throws CacheException
theResult
- new or changed data items for semantic regions already in the cache
CacheException
- if operation could not be completed successfully
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |