Package org.apache.pekko.cluster
Class JoinConfigCompatChecker
java.lang.Object
org.apache.pekko.cluster.JoinConfigCompatChecker
- Direct Known Subclasses:
JoinConfigCompatCheckCluster,JoinConfigCompatCheckSharding
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ConfigValidationcheck(com.typesafe.config.Config toCheck, com.typesafe.config.Config actualConfig) Runs the Config check.static ConfigValidationChecks that allrequiredKeysare available intoCheckConfig.static ConfigValidationfullMatch(scala.collection.immutable.Seq<String> requiredKeys, com.typesafe.config.Config toCheck, com.typesafe.config.Config actualConfig) Checks that allrequiredKeysare available intoCheckConfig and its values match exactly the values incurrentConfig.abstract scala.collection.immutable.Seq<String>The configuration keys that are required for this checker
-
Constructor Details
-
JoinConfigCompatChecker
public JoinConfigCompatChecker()
-
-
Method Details
-
exists
public static ConfigValidation exists(scala.collection.immutable.Seq<String> requiredKeys, com.typesafe.config.Config toCheck) Checks that allrequiredKeysare available intoCheckConfig.- Parameters:
requiredKeys- - a Seq of required keystoCheck- - the Config instance to be checked
-
fullMatch
public static ConfigValidation fullMatch(scala.collection.immutable.Seq<String> requiredKeys, com.typesafe.config.Config toCheck, com.typesafe.config.Config actualConfig) Checks that allrequiredKeysare available intoCheckConfig and its values match exactly the values incurrentConfig.- Parameters:
requiredKeys- - a Seq of required keystoCheck- - the Config instance to be checkedactualConfig- - the Config instance containing the expected values
-
requiredKeys
The configuration keys that are required for this checker -
check
public abstract ConfigValidation check(com.typesafe.config.Config toCheck, com.typesafe.config.Config actualConfig) Runs the Config check.Implementers are free to define what makes Config entry compatible or not. We do provide some pre-build checks tough:
JoinConfigCompatChecker.existsandJoinConfigCompatChecker.fullMatch- Parameters:
toCheck- - the Config instance to be checkedactualConfig- - the Config instance containing the actual values- Returns:
- a
ConfigValidation. Can beValidorInvalid, the later must contain a descriptive list of error messages.
-