public class QueryStrategyCache
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
QueryStrategyCache.Mapping
A Mapping represents a current use of a cache entry, keeping that
entry alive for the duration of its use.
|
static interface |
QueryStrategyCache.StrategyLoader
Users of the cache provide an implementation of this interface in order to load cache
items.
|
| Constructor and Description |
|---|
QueryStrategyCache(int sizeLimit,
QueryStrategyCache.StrategyLoader itemManager)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
QueryStrategyCache.Mapping |
get(OjaiQuery query)
Look in the cache for a entry for the given query.
|
java.util.Set<OjaiQuery> |
getCached()
Returns the set of queries whose QueryStrategys are currently in the cache.
|
public QueryStrategyCache(int sizeLimit,
QueryStrategyCache.StrategyLoader itemManager)
sizeLimit - the size of the cacheitemManager - the ItemManager to use to load QueryStrategyspublic QueryStrategyCache.Mapping get(OjaiQuery query)
query - the query we want to executepublic java.util.Set<OjaiQuery> getCached()