Class JoinConfigCompatChecker

java.lang.Object
org.apache.pekko.cluster.JoinConfigCompatChecker
Direct Known Subclasses:
JoinConfigCompatCheckCluster, JoinConfigCompatCheckSharding

public abstract class JoinConfigCompatChecker extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    check(com.typesafe.config.Config toCheck, com.typesafe.config.Config actualConfig)
    Runs the Config check.
    exists(scala.collection.immutable.Seq<String> requiredKeys, com.typesafe.config.Config toCheck)
    Checks that all requiredKeys are available in toCheck Config.
    fullMatch(scala.collection.immutable.Seq<String> requiredKeys, com.typesafe.config.Config toCheck, com.typesafe.config.Config actualConfig)
    Checks that all requiredKeys are available in toCheck Config and its values match exactly the values in currentConfig.
    abstract scala.collection.immutable.Seq<String>
    The configuration keys that are required for this checker

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 all requiredKeys are available in toCheck Config.

      Parameters:
      requiredKeys - - a Seq of required keys
      toCheck - - 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 all requiredKeys are available in toCheck Config and its values match exactly the values in currentConfig.

      Parameters:
      requiredKeys - - a Seq of required keys
      toCheck - - the Config instance to be checked
      actualConfig - - the Config instance containing the expected values
    • requiredKeys

      public abstract scala.collection.immutable.Seq<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 and JoinConfigCompatChecker.fullMatch

      Parameters:
      toCheck - - the Config instance to be checked
      actualConfig - - the Config instance containing the actual values
      Returns:
      a ConfigValidation. Can be Valid or Invalid, the later must contain a descriptive list of error messages.