public class NodeWiseFailoverEnvironmentEvaluator extends EnvironmentEvaluator
EnvironmentEvaluator used for processing failover related environment changes. Specifically, used for
node wise failover strategy related changes. This will keep a
list of pinnedNodeswhich will be used to check if the current node has any relationship to those nodes, either as a pinned node or as an acting as node.
| Constructor and Description |
|---|
NodeWiseFailoverEnvironmentEvaluator(int weight,
List<String> pinnedNodes) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getPinnedNodes() |
protected boolean |
isEvaluationPositive(XEnvironment environment)
For example, lets say that an evaluator want to evaluate whether the tags
nodeName:node1, groupName:group1
are there in the environment's tags. |
evaluate, getNegativeWeight, getPositiveWeight, getPriorityprotected boolean isEvaluationPositive(XEnvironment environment)
nodeName:node1, groupName:group1
are there in the environment's tags. Then this method should check whether those tags are there in the
environment and return true/false accordingly. If this returns true, the class which is using
the evaluator for evaluation purposes will be returned a value equal to the positiveWeight.
isEvaluationPositive in class EnvironmentEvaluatorenvironment - the environment subjected to the evaluationCopyright © 2016–2019 AdroitLogic. All rights reserved.