Package io.microraft

Class HoconRaftConfigParser

java.lang.Object
io.microraft.HoconRaftConfigParser

public final class HoconRaftConfigParser extends Object
RaftConfig parser for HOCON files
  • Method Details

    • parseConfig

      public static RaftConfig parseConfig(@Nonnull com.typesafe.config.Config config)
      Parses the given config object to populate RaftConfig
      Returns:
      the created RaftConfig object
      Throws:
      NullPointerException - if the given config object is null
      IllegalArgumentException - if the given config object has no "raft.*" field
      com.typesafe.config.ConfigException.WrongType - if a configuration value has wrong type