org.mmbase.cache
Class BetterStrategy

Package class diagram package BetterStrategy
java.lang.Object
  extended by org.mmbase.cache.ReleaseStrategy
      extended by org.mmbase.cache.BetterStrategy

public class BetterStrategy
extends ReleaseStrategy

This release strategy is a bit better than 'BasicReleaseStrategy, and also a bit more sophisticated.

Since:
MMBase 1.8
Version:
$Id: BetterStrategy.java 45315 2011-02-18 20:23:11Z michiel $
Author:
Ernst Bunders

Nested Class Summary
 
Nested classes/interfaces inherited from class org.mmbase.cache.ReleaseStrategy
ReleaseStrategy.StrategyResult
 
Constructor Summary
BetterStrategy()
           
 
Method Summary
protected  boolean doEvaluate(NodeEvent event, SearchQuery query, List<MMObjectNode> cachedResult)
          implement this method to create your own strategy.
protected  boolean doEvaluate(RelationEvent event, SearchQuery query, List<MMObjectNode> cachedResult)
          implement this method to create your own strategy.
 String getDescription()
           
 String getName()
           
 
Methods inherited from class org.mmbase.cache.ReleaseStrategy
clear, equals, evaluate, evaluate, getAvgEvaluationTimeInMilis, getConstraintsForField, getSortordersForField, getTotalEvaluated, getTotalEvaluationTimeMillis, getTotalPreserved, hashCode, isEnabled, setEnabled, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BetterStrategy

public BetterStrategy()
Method Detail

getName

public String getName()
Specified by:
getName in class ReleaseStrategy

getDescription

public String getDescription()
Specified by:
getDescription in class ReleaseStrategy

doEvaluate

protected boolean doEvaluate(RelationEvent event,
                             SearchQuery query,
                             List<MMObjectNode> cachedResult)
Description copied from class: ReleaseStrategy
implement this method to create your own strategy.

Specified by:
doEvaluate in class ReleaseStrategy
Parameters:
event - a relation event
Returns:
true if the cache entry should be released

doEvaluate

protected final boolean doEvaluate(NodeEvent event,
                                   SearchQuery query,
                                   List<MMObjectNode> cachedResult)
Description copied from class: ReleaseStrategy
implement this method to create your own strategy.

Specified by:
doEvaluate in class ReleaseStrategy
Parameters:
event - a node event
Returns:
true if query should be released
See Also:
ReleaseStrategy.doEvaluate(org.mmbase.core.event.NodeEvent, org.mmbase.storage.search.SearchQuery, java.util.List)


MMBase2 Core 2.0-SNAPSHOT - 2014-09-22T23:08