MemoryEvaluator (Quartz Parent POM 2.0.1 API)
From Quartz Java
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
org.quartz.locality.constraint.evaluator Class MemoryEvaluator
java.lang.Objectjava.util.TimerTask
org.quartz.locality.constraint.evaluator.EvaluatorTimerTask
org.quartz.locality.constraint.evaluator.MemoryEvaluator
- All Implemented Interfaces:
- Runnable, Evaluator<MemoryConstraint>, PersistentEvaluator<MemoryConstraint,Long>
public class MemoryEvaluator
- extends EvaluatorTimerTask
- implements PersistentEvaluator<MemoryConstraint,Long>
Evaluates memory constraints
- Author:
- Alex Snaps
| 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 |
|---|
MemoryEvaluator
public MemoryEvaluator()
| Method Detail |
|---|
matches
public boolean matches(MemoryConstraint constraint)
- Evaluates the constraint against local node.
- Specified by:
matchesin interfaceEvaluator<MemoryConstraint>
- Parameters:
constraint- The constraint to evaluate- Returns:
- true if local node is a match
- See Also:
Constraint#matches(Object)
matches
public boolean matches(MemoryConstraint constraint, String node)
- Verifies whether the constraint passed is validating on the node
- Parameters:
constraint- The constraint to evaluatenode- The node to evaluate against- Returns:
- true if node is a match
suitedNodes
public List<String> suitedNodes(MemoryConstraint constraint)
- Returns a list of best suited node (instanceId) based on the constraint
- Specified by:
suitedNodesin interfaceEvaluator<MemoryConstraint>
- Parameters:
constraint- To find best suited nodes for- Returns:
- List of best suited Quartz instanceId
verify
public void verify(MemoryConstraint constraint)
- Always true
- Specified by:
verifyin interfaceEvaluator<MemoryConstraint>
- Parameters:
constraint- The constraint to validate
monitor
public void monitor()
- Performs the monitoring of the free memory on the local node
- Specified by:
monitorin classEvaluatorTimerTask
initialize
public void initialize(String nodeName, ConcurrentMap<String,Long> map)
- Will start the monitoring, to store available memory on the local node in the shared map.
- Specified by:
initializein interfacePersistentEvaluator<MemoryConstraint,Long>
- Parameters:
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 | |||||||||
Copyright 2001-2011, Terracotta, Inc.