org.mmbase.cache
Class BasicReleaseStrategy

java.lang.Object
  extended by org.mmbase.cache.ReleaseStrategy
      extended by org.mmbase.cache.BasicReleaseStrategy

public class BasicReleaseStrategy
extends ReleaseStrategy

This class provides a very basic release strategy. In fact it will release the cache in nearly every instance, except when the event is for a step in the SearchQuery that has 'nodes' set for it and the changed node is not one of those. This release strategy is in fact the original one and will allways be the first in the hierarchy of the ChainedReleaseStrategy.

Since:
MMBase-1.8
Version:
$Id: BasicReleaseStrategy.java 34900 2009-05-01 16:29:42Z michiel $
Author:
Ernst Bunders

Nested Class Summary
 
Nested classes/interfaces inherited from class org.mmbase.cache.ReleaseStrategy
ReleaseStrategy.StrategyResult, ReleaseStrategy.Timer
 
Constructor Summary
BasicReleaseStrategy()
           
 
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

BasicReleaseStrategy

public BasicReleaseStrategy()
Method Detail

getName

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

getDescription

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

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 the cache entry should be released

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


MMBase 2.0-SNAPSHOT - null