Evaluator (Quartz Parent POM 2.0.1 API)

Quartz Java



org.quartz.locality.constraint.evaluator Interface Evaluator<T extends Constraint>

Type Parameters:
T - The constraint this evaluator is uniquely responsible for
All Known Subinterfaces:
PersistentEvaluator<T,V>
All Known Implementing Classes:
CpuEvaluator, EhcacheEvaluator, MemoryEvaluator, NodeGroupEvaluator, OsEvaluator

public interface Evaluator<T extends Constraint>

An Evaluator will match and potentially return best suited nodes for a Job to execute on.

Author:
Alex Snaps
See Also:
Constraint

Method Summary
 boolean matches(T constraint)
          Evaluates the constraint against local node.
 List<String> suitedNodes(T constraint)
          Returns a list of best suited node (instanceId) based on the constraint
 void verify(T constraint)
          Verifies the validity of a constraint.
 

Method Detail

matches

boolean matches(T constraint)
Evaluates the constraint against local node.

Parameters:
constraint - The constraint to evaluate
Returns:
true if local node is a match
See Also:
Constraint#matches(Object)

suitedNodes

List<String> suitedNodes(T constraint)
Returns a list of best suited node (instanceId) based on the constraint

Parameters:
constraint - To find best suited nodes for
Returns:
List of best suited Quartz instanceId

verify

void verify(T constraint)
            throws LocalityException
Verifies the validity of a constraint. Throws exception should the constraint fail to validate.

Parameters:
constraint - The constraint to validate
Throws:
LocalityException - if validation fails


Copyright 2001-2011, Terracotta, Inc.