public abstract class QueryResultCache extends Cache<SearchQuery,List<MMObjectNode>> implements NodeEventListener, RelationEventListener
SearchQuerylock, maxEntrySize| Constructor and Description |
|---|
QueryResultCache(int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
addReleaseStrategies(List<ReleaseStrategy> strategies) |
void |
addReleaseStrategy(ReleaseStrategy releaseStrategy)
This method lets you add a release strategy to the cache.
|
void |
clear() |
double |
getAvarageValueLength()
Returns the average 'length' of the values in the cache.
|
ChainedReleaseStrategy |
getReleaseStrategy() |
protected int |
nodeChanged(Event event) |
void |
notify(NodeEvent event) |
void |
notify(RelationEvent event) |
List<MMObjectNode> |
put(SearchQuery query,
List<MMObjectNode> queryResult)
Puts a search result in this cache.
|
List<MMObjectNode> |
remove(Object key)
Removes an object from the cache.
|
String |
toString() |
checkCachePolicy, contains, containsKey, containsValue, entrySet, equals, get, getByteSize, getByteSize, getCheapByteSize, getCount, getDefaultMaxEntrySize, getDescription, getHits, getImplementation, getLock, getMaxEntrySize, getMaxSize, getMisses, getName, getPuts, getRatio, getSize, getStats, hashCode, isActive, isEmpty, keySet, maxSize, putAll, putCache, reset, setActive, setImplementation, setMaxEntrySize, setMaxSize, size, valuesclone, finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic void addReleaseStrategies(List<ReleaseStrategy> strategies)
strategies - public void addReleaseStrategy(ReleaseStrategy releaseStrategy)
ChainedReleaseStrategy, which
is the default base release strategy.releaseStrategy - A releaseStrategy to add.public ChainedReleaseStrategy getReleaseStrategy()
public List<MMObjectNode> put(SearchQuery query, List<MMObjectNode> queryResult)
put in interface Map<SearchQuery,List<MMObjectNode>>put in class Cache<SearchQuery,List<MMObjectNode>>public List<MMObjectNode> remove(Object key)
remove in interface Map<SearchQuery,List<MMObjectNode>>remove in class Cache<SearchQuery,List<MMObjectNode>>key - A SearchQuery object.Map.remove(java.lang.Object)public double getAvarageValueLength()
CacheQueryResultCache the length obviously is the length of the cached lists.
May return NaN if unknown or undetermined.getAvarageValueLength in interface CacheMBeangetAvarageValueLength in class Cache<SearchQuery,List<MMObjectNode>>public String toString()
toString in class Cache<SearchQuery,List<MMObjectNode>>public void notify(RelationEvent event)
notify in interface RelationEventListenerRelationEventListener.notify(org.mmbase.core.event.RelationEvent)public void notify(NodeEvent event)
notify in interface NodeEventListenerNodeEventListener.notify(org.mmbase.core.event.NodeEvent)protected int nodeChanged(Event event) throws IllegalArgumentException
IllegalArgumentExceptionpublic void clear()
clear in interface Map<SearchQuery,List<MMObjectNode>>clear in interface CacheMBeanclear in class Cache<SearchQuery,List<MMObjectNode>>Map.clear()MMBase 1.9-SNAPSHOT - ${javadoctimestamp}