public class GroupFailoverEnvironmentEvaluator extends EnvironmentEvaluator
EnvironmentEvaluator
class which is to be used for evaluating environment changes related to
group failover strategy. This will check whether this node's group
is related to pinnedGroupseither directly or as an acting as group.
Constructor and Description |
---|
GroupFailoverEnvironmentEvaluator(int weight,
List<String> pinnedGroups) |
Modifier and Type | Method and Description |
---|---|
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, getPriority
protected 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 EnvironmentEvaluator
environment
- the environment subjected to the evaluationCopyright © 2016–2019 AdroitLogic. All rights reserved.