org.mmbase.cache
Class ConstraintsMatchingStrategy

java.lang.Object
  extended by org.mmbase.cache.ReleaseStrategy
      extended by org.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 36364 2009-06-24 17:55:56Z michiel $
Author:
Ernst Bunders

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

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<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 final 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

findMatcherForConstraint

protected static final 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


MMBase 2.0-SNAPSHOT - null