OsEvaluator (Quartz Parent POM 2.0.1 API)

Quartz Java



org.quartz.locality.constraint.evaluator Class OsEvaluator

java.lang.Object
  extended by org.quartz.locality.constraint.evaluator.OsEvaluator
All Implemented Interfaces:
Evaluator<OsConstraint>, PersistentEvaluator<OsConstraint,Set<String>>

public class OsEvaluator
extends Object
implements PersistentEvaluator<OsConstraint,Set<String>>

Evaluator that persists all nodes' Operation Systems

Author:
Alex Snaps

Constructor Summary
OsEvaluator()
           
 
Method Summary
 void initialize(String nodeName, ConcurrentMap<String,Set<String>> storage)
          During its bootstrapping, the JobStore will call this method once on each node, passing a Clustered ConcurrentMap instance and the local instanceId of the Scheduler
 boolean matches(OsConstraint constraint)
          Evaluates the constraint against local node.
 List<String> suitedNodes(OsConstraint constraint)
          Returns a list of best suited node (instanceId) based on the constraint
 void verify(OsConstraint constraint)
          Verifies the validity of a constraint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OsEvaluator

public OsEvaluator()
Method Detail

matches

public boolean matches(OsConstraint constraint)
Evaluates the constraint against local node.

Specified by:
matches in interface Evaluator<OsConstraint>
Parameters:
constraint - The constraint to evaluate
Returns:
true if local node is a match
See Also:
Constraint#matches(Object)

suitedNodes

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

Specified by:
suitedNodes in interface Evaluator<OsConstraint>
Parameters:
constraint - To find best suited nodes for
Returns:
List of best suited Quartz instanceId

verify

public void verify(OsConstraint constraint)
Verifies the validity of a constraint. Throws exception should the constraint fail to validate.

Specified by:
verify in interface Evaluator<OsConstraint>
Parameters:
constraint - The constraint to validate

initialize

public void initialize(String nodeName,
                       ConcurrentMap<String,Set<String>> storage)
During its bootstrapping, the JobStore will call this method once on each node, passing a Clustered ConcurrentMap instance and the local instanceId of the Scheduler

Specified by:
initialize in interface PersistentEvaluator<OsConstraint,Set<String>>
Parameters:
nodeName - Local instanceId
storage - the shared persistent storage for the Evaluator


Copyright 2001-2011, Terracotta, Inc.