Package akka.cluster
Class JoinConfigCompatChecker
- java.lang.Object
-
- akka.cluster.JoinConfigCompatChecker
-
- Direct Known Subclasses:
ClusterReceptionistConfigCompatChecker,JoinConfigCompatCheckCluster,JoinConfigCompatCheckerClusterSharding,JoinConfigCompatCheckSharding
public abstract class JoinConfigCompatChecker extends java.lang.ObjectThe configuration keys that are required for this checker
-
-
Constructor Summary
Constructors Constructor Description JoinConfigCompatChecker()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ConfigValidationcheck(com.typesafe.config.Config toCheck, com.typesafe.config.Config actualConfig)Runs the Config check.static ConfigValidationexists(scala.collection.immutable.Seq<java.lang.String> requiredKeys, com.typesafe.config.Config toCheck)static com.typesafe.config.ConfigfilterWithKeys(scala.collection.immutable.Seq<java.lang.String> requiredKeys, com.typesafe.config.Config config)INTERNAL API Builds a new Config object containing only the required entries defined byrequiredKeysstatic ConfigValidationfullMatch(scala.collection.immutable.Seq<java.lang.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.static JoinConfigCompatCheckerload(ExtendedActorSystem system, ClusterSettings clusterSettings)INTERNAL APIstatic scala.collection.immutable.Seq<java.lang.String>removeSensitiveKeys(com.typesafe.config.Config config, ClusterSettings clusterSettings)INTERNAL API Builds a Seq of keys using the passedConfignot including any sensitive keys, as defined in 'akka.cluster.configuration-compatibility-check.sensitive-config-paths'.static scala.collection.immutable.Seq<java.lang.String>removeSensitiveKeys(scala.collection.immutable.Seq<java.lang.String> requiredKeys, ClusterSettings clusterSettings)INTERNAL API Removes sensitive keys, as defined in 'akka.cluster.configuration-compatibility-check.sensitive-config-paths', from the passedrequiredKeysSeq.abstract scala.collection.immutable.Seq<java.lang.String>requiredKeys()
-
-
-
Method Detail
-
exists
public static ConfigValidation exists(scala.collection.immutable.Seq<java.lang.String> requiredKeys, com.typesafe.config.Config toCheck)
-
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 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- Returns:
- (undocumented)
-
filterWithKeys
public static com.typesafe.config.Config filterWithKeys(scala.collection.immutable.Seq<java.lang.String> requiredKeys, com.typesafe.config.Config config)INTERNAL API Builds a new Config object containing only the required entries defined byrequiredKeysThis method is used from the joining side to prepare the
Configinstance that will be sent over the wire. We don't send the full config to avoid unnecessary data transfer, but also to avoid leaking any sensitive information that users may have added to their configuration.- Parameters:
requiredKeys- (undocumented)config- (undocumented)- Returns:
- (undocumented)
-
removeSensitiveKeys
public static scala.collection.immutable.Seq<java.lang.String> removeSensitiveKeys(scala.collection.immutable.Seq<java.lang.String> requiredKeys, ClusterSettings clusterSettings)INTERNAL API Removes sensitive keys, as defined in 'akka.cluster.configuration-compatibility-check.sensitive-config-paths', from the passedrequiredKeysSeq.- Parameters:
requiredKeys- (undocumented)clusterSettings- (undocumented)- Returns:
- (undocumented)
-
removeSensitiveKeys
public static scala.collection.immutable.Seq<java.lang.String> removeSensitiveKeys(com.typesafe.config.Config config, ClusterSettings clusterSettings)INTERNAL API Builds a Seq of keys using the passedConfignot including any sensitive keys, as defined in 'akka.cluster.configuration-compatibility-check.sensitive-config-paths'.- Parameters:
config- (undocumented)clusterSettings- (undocumented)- Returns:
- (undocumented)
-
load
public static JoinConfigCompatChecker load(ExtendedActorSystem system, ClusterSettings clusterSettings)
INTERNAL APIThis method loads the
JoinConfigCompatCheckerdefined in the configuration. Checkers are then combined to be used whenever a join node tries to join an existing cluster.- Parameters:
system- (undocumented)clusterSettings- (undocumented)- Returns:
- (undocumented)
-
requiredKeys
public abstract scala.collection.immutable.Seq<java.lang.String> requiredKeys()
-
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: {@link JoinConfigCompatChecker.exists()} and {@link JoinConfigCompatChecker.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.
-
-