|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.TimerTask
org.quartz.locality.constraint.evaluator.EvaluatorTimerTask
org.quartz.locality.constraint.evaluator.MemoryEvaluator
public class MemoryEvaluator
Evaluates memory constraints
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.quartz.locality.constraint.evaluator.EvaluatorTimerTask |
|---|
EvaluatorTimerTask.Status |
| Constructor Summary | |
|---|---|
MemoryEvaluator()
|
|
| Method Summary | |
|---|---|
void |
initialize(String nodeName,
ConcurrentMap<String,Long> map)
Will start the monitoring, to store available memory on the local node in the shared map. |
boolean |
matches(MemoryConstraint constraint)
Evaluates the constraint against local node. |
boolean |
matches(MemoryConstraint constraint,
String node)
Verifies whether the constraint passed is validating on the node |
void |
monitor()
Performs the monitoring of the free memory on the local node |
List<String> |
suitedNodes(MemoryConstraint constraint)
Returns a list of best suited node (instanceId) based on the constraint |
void |
verify(MemoryConstraint constraint)
Always true |
| Methods inherited from class org.quartz.locality.constraint.evaluator.EvaluatorTimerTask |
|---|
cancelMonitoring, getInterval, getStatus, pauseMonitoring, resumeMonitoring, run, startMonitoring |
| Methods inherited from class java.util.TimerTask |
|---|
cancel, scheduledExecutionTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryEvaluator()
| Method Detail |
|---|
public boolean matches(MemoryConstraint constraint)
matches in interface Evaluator<MemoryConstraint>constraint - The constraint to evaluate
Constraint#matches(Object)
public boolean matches(MemoryConstraint constraint,
String node)
constraint - The constraint to evaluatenode - The node to evaluate against
public List<String> suitedNodes(MemoryConstraint constraint)
suitedNodes in interface Evaluator<MemoryConstraint>constraint - To find best suited nodes for
public void verify(MemoryConstraint constraint)
verify in interface Evaluator<MemoryConstraint>constraint - The constraint to validatepublic void monitor()
monitor in class EvaluatorTimerTask
public void initialize(String nodeName,
ConcurrentMap<String,Long> map)
initialize in interface PersistentEvaluator<MemoryConstraint,Long>nodeName - Local instanceIdmap - the shared persistent storage for the Evaluator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||