org.mmbase.cache
Class BasicReleaseStrategy

java.lang.Object
  extended byorg.mmbase.cache.ReleaseStrategy
      extended byorg.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,v 1.13 2006/06/27 07:31:45 michiel Exp $
Author:
Ernst Bunders

Nested Class Summary
 
Nested classes inherited from class org.mmbase.cache.ReleaseStrategy
ReleaseStrategy.StrategyResult, ReleaseStrategy.Timer
 
Constructor Summary
BasicReleaseStrategy()
           
 
Method Summary
protected  boolean doEvaluate(NodeEvent event, SearchQuery query, List cachedResult)
          implement this method to create your own strategy.
protected  boolean doEvaluate(RelationEvent event, SearchQuery query, List 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, getFieldSteps, 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 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
query -
cachedResult -
Returns:
true if the cache entry should be released

doEvaluate

protected boolean doEvaluate(RelationEvent event,
                             SearchQuery query,
                             List 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
query -
cachedResult -
Returns:
true if the cache entry should be released


MMBase build 1.8.1.20060716