Package org.terrier.structures.cache
Class GrowingMapQueryResultCache<K>
- java.lang.Object
-
- org.terrier.structures.cache.GrowingMapQueryResultCache<K>
-
- All Implemented Interfaces:
QueryResultCache
- Direct Known Subclasses:
GrowingMapQueryStringResultCache
public abstract class GrowingMapQueryResultCache<K> extends java.lang.Object implements QueryResultCache
an abstract results cache that puts stuff into an ever-growing Map
-
-
Constructor Summary
Constructors Constructor Description GrowingMapQueryResultCache()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidadd(SearchRequest q)Add the results for the specified query to the cacheResultSetcheckCache(SearchRequest q)Returns the ResultSet for the specified query, or null if that query has no cached results.protected abstract KhashQuery(SearchRequest q)voidreset()Clears the cache
-
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:QueryResultCacheClears the cache- Specified by:
resetin interfaceQueryResultCache
-
hashQuery
protected abstract K hashQuery(SearchRequest q)
-
add
public void add(SearchRequest q)
Description copied from interface:QueryResultCacheAdd the results for the specified query to the cache- Specified by:
addin interfaceQueryResultCache
-
checkCache
public ResultSet checkCache(SearchRequest q)
Description copied from interface:QueryResultCacheReturns the ResultSet for the specified query, or null if that query has no cached results.- Specified by:
checkCachein interfaceQueryResultCache
-
-