Package akka.cluster
Class JoinConfigCompatChecker
- java.lang.Object
-
- akka.cluster.JoinConfigCompatChecker
-
- Direct Known Subclasses:
JoinConfigCompatCheckCluster
,JoinConfigCompatCheckSharding
public abstract class JoinConfigCompatChecker extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description JoinConfigCompatChecker()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ConfigValidation
check(com.typesafe.config.Config toCheck, com.typesafe.config.Config actualConfig)
Runs the Config check.static ConfigValidation
exists(scala.collection.immutable.Seq<java.lang.String> requiredKeys, com.typesafe.config.Config toCheck)
Checks that allrequiredKeys
are available intoCheck
Config.static ConfigValidation
fullMatch(scala.collection.immutable.Seq<java.lang.String> requiredKeys, com.typesafe.config.Config toCheck, com.typesafe.config.Config actualConfig)
Checks that allrequiredKeys
are available intoCheck
Config and its values match exactly the values incurrentConfig
.abstract scala.collection.immutable.Seq<java.lang.String>
requiredKeys()
The configuration keys that are required for this checker
-
-
-
Method Detail
-
exists
public static ConfigValidation exists(scala.collection.immutable.Seq<java.lang.String> requiredKeys, com.typesafe.config.Config toCheck)
Checks that allrequiredKeys
are available intoCheck
Config.- Parameters:
requiredKeys
- - a Seq of required keystoCheck
- - the Config instance to be checked
-
fullMatch
public static ConfigValidation fullMatch(scala.collection.immutable.Seq<java.lang.String> requiredKeys, com.typesafe.config.Config toCheck, com.typesafe.config.Config actualConfig)
Checks that allrequiredKeys
are available intoCheck
Config 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
public abstract scala.collection.immutable.Seq<java.lang.String> 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.exists
andJoinConfigCompatChecker.fullMatch
- Parameters:
toCheck
- - the Config instance to be checkedactualConfig
- - the Config instance containing the actual values- Returns:
- a
ConfigValidation
. Can beValid
orInvalid
, the later must contain a descriptive list of error messages.
-
-