org.mmbase.cache
Class ConstraintsMatchingStrategy

java.lang.Object
  extended byorg.mmbase.cache.ReleaseStrategy
      extended byorg.mmbase.cache.ConstraintsMatchingStrategy

public class ConstraintsMatchingStrategy
extends ReleaseStrategy

This strategy will evaluate the constraint on a a query object against a NodeEvent. It will apply the following rules:
new node/delete node

change node Like the above, but an extra check has to be made:

Since:
MMBase-1.8
Version:
$Id: ConstraintsMatchingStrategy.java,v 1.25 2006/07/09 11:53:57 michiel Exp $
Author:
Ernst Bunders

Nested Class Summary
 
Nested classes inherited from class org.mmbase.cache.ReleaseStrategy
ReleaseStrategy.StrategyResult, ReleaseStrategy.Timer
 
Constructor Summary
ConstraintsMatchingStrategy()
           
 
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.
protected static org.mmbase.cache.ConstraintsMatchingStrategy.AbstractConstraintMatcher findMatcherForConstraint(Constraint constraint)
          This method will find a constraint matcher that supports the given constraint, and will return the UnsupportedConstraintMatcher if none is found.
 String getDescription()
           
 String getName()
           
static void main(String[] args)
           
 
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

ConstraintsMatchingStrategy

public ConstraintsMatchingStrategy()
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 final 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

findMatcherForConstraint

protected static final org.mmbase.cache.ConstraintsMatchingStrategy.AbstractConstraintMatcher findMatcherForConstraint(Constraint constraint)
                                                                                                                throws InvocationTargetException,
                                                                                                                       NoSuchMethodException,
                                                                                                                       InstantiationException,
                                                                                                                       IllegalAccessException
This method will find a constraint matcher that supports the given constraint, and will return the UnsupportedConstraintMatcher if none is found.

Parameters:
constraint -
Throws:
InvocationTargetException
NoSuchMethodException
InstantiationException
IllegalAccessException

main

public static void main(String[] args)
Parameters:
args -


MMBase build 1.8.1.20060716