ca.uhn.cache
Interface IPreFetchingCache

All Superinterfaces:
ISemanticCache

public interface IPreFetchingCache
extends ISemanticCache

TODO: this should extend IDataSource, not ISemanticCache. An extension of ISemanticCache that allows a caller to express that queries to a certain data scope are likely in the near future. This allows the cache to (optionally) retrieve this information in advance.

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

Method Summary
 void claimInterest(IQuery theScope, java.util.Date theEffectiveTime, java.util.Date theExpiryTime, java.lang.String theContextId)
          Indicates that queries within the specified data scope are likely in the near future.
 void disclaimInterest(java.util.Date theEffectiveTime, java.lang.String theContextId)
          Explicitly indicates that a previously claimed interest in some scope of data is at an end.
 
Methods inherited from interface ca.uhn.cache.ISemanticCache
get, getEarliestCacheTime, put, remainder, update
 

Method Detail

claimInterest

public void claimInterest(IQuery theScope,
                          java.util.Date theEffectiveTime,
                          java.util.Date theExpiryTime,
                          java.lang.String theContextId)
Indicates that queries within the specified data scope are likely in the near future.

Parameters:
theScope - defines the scope of anticipated queries
theEffectiveTime - the time at which such queries may begin
theExpiryTime - the time at which such queries are likely to be finished
theContextId - a unique identifier for the caller or context, so that calls to disclaimInterest() can be related to calls to this method (for example if two users claim an interest in the same data we don't want to remove the data from cache until they both disclaim their interest).

disclaimInterest

public void disclaimInterest(java.util.Date theEffectiveTime,
                             java.lang.String theContextId)
Explicitly indicates that a previously claimed interest in some scope of data is at an end.

Parameters:
theEffectiveTime - the time at which the interest is to expire
theContextId - a unique identifier that was provided in a corresponding call to claimInterest()


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