Record Class NodeConfig

java.lang.Object
java.lang.Record
io.vertigo.core.node.config.NodeConfig
Record Components:
appName - the logical name of the app
nodeId - the random uuid of a node
componentInitializerConfigs - List of the configs of the initializers

public record NodeConfig(String appName, String nodeId, Optional<String> endPointOpt, Set<String> activeFlags, BootConfig bootConfig, List<ModuleConfig> moduleConfigs, List<ComponentInitializerConfig> componentInitializerConfigs) extends Record
The NodeConfig class defines the config. The node is built from this config. NodeConfig must be created using the NodeConfigBuilder. An node is composed of multiple nodes. AppName is the common name that define the application as a whole. (ex: Facebook, Pharos...)
Author:
pchretien
  • Constructor Details

    • NodeConfig

      public NodeConfig(String appName, String nodeId, Optional<String> endPointOpt, Set<String> activeFlags, BootConfig bootConfig, List<ModuleConfig> moduleConfigs, List<ComponentInitializerConfig> componentInitializerConfigs)
      Creates an instance of a NodeConfig record class.
      Parameters:
      appName - the value for the appName record component
      nodeId - the value for the nodeId record component
      endPointOpt - the value for the endPointOpt record component
      activeFlags - the value for the activeFlags record component
      bootConfig - the value for the bootConfig record component
      moduleConfigs - the value for the moduleConfigs record component
      componentInitializerConfigs - the value for the componentInitializerConfigs record component
  • Method Details

    • hasFlag

      public boolean hasFlag(String flag)
    • builder

      public static NodeConfigBuilder builder()
      Static method factory for NodeConfigBuilder
      Returns:
      NodeConfigBuilder
    • print

      public void print(PrintStream out)
      Allows to print a short description of the config.
      Parameters:
      out - Out
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • appName

      public String appName()
      Returns the value of the appName record component.
      Returns:
      the value of the appName record component
    • nodeId

      public String nodeId()
      Returns the value of the nodeId record component.
      Returns:
      the value of the nodeId record component
    • endPointOpt

      public Optional<String> endPointOpt()
      Returns the value of the endPointOpt record component.
      Returns:
      the value of the endPointOpt record component
    • activeFlags

      public Set<String> activeFlags()
      Returns the value of the activeFlags record component.
      Returns:
      the value of the activeFlags record component
    • bootConfig

      public BootConfig bootConfig()
      Returns the value of the bootConfig record component.
      Returns:
      the value of the bootConfig record component
    • moduleConfigs

      public List<ModuleConfig> moduleConfigs()
      Returns the value of the moduleConfigs record component.
      Returns:
      the value of the moduleConfigs record component
    • componentInitializerConfigs

      public List<ComponentInitializerConfig> componentInitializerConfigs()
      Returns the value of the componentInitializerConfigs record component.
      Returns:
      the value of the componentInitializerConfigs record component