Package io.vertigo.core.node.config
Record Class NodeConfig
java.lang.Object
java.lang.Record
io.vertigo.core.node.config.NodeConfig
- Record Components:
appName- the logical name of the appnodeId- the random uuid of a nodecomponentInitializerConfigs- 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 Summary
ConstructorsConstructorDescriptionNodeConfig(String appName, String nodeId, Optional<String> endPointOpt, Set<String> activeFlags, BootConfig bootConfig, List<ModuleConfig> moduleConfigs, List<ComponentInitializerConfig> componentInitializerConfigs) Creates an instance of aNodeConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactiveFlagsrecord component.appName()Returns the value of theappNamerecord component.Returns the value of thebootConfigrecord component.static NodeConfigBuilderbuilder()Static method factory for NodeConfigBuilderReturns the value of thecomponentInitializerConfigsrecord component.Returns the value of theendPointOptrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfinal inthashCode()Returns a hash code value for this object.Returns the value of themoduleConfigsrecord component.nodeId()Returns the value of thenodeIdrecord component.voidprint(PrintStream out) Allows to print a short description of the config.final StringtoString()Returns a string representation of this record class.
-
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 aNodeConfigrecord class.- Parameters:
appName- the value for theappNamerecord componentnodeId- the value for thenodeIdrecord componentendPointOpt- the value for theendPointOptrecord componentactiveFlags- the value for theactiveFlagsrecord componentbootConfig- the value for thebootConfigrecord componentmoduleConfigs- the value for themoduleConfigsrecord componentcomponentInitializerConfigs- the value for thecomponentInitializerConfigsrecord component
-
-
Method Details
-
hasFlag
-
builder
Static method factory for NodeConfigBuilder- Returns:
- NodeConfigBuilder
-
print
Allows to print a short description of the config.- Parameters:
out- Out
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
appName
Returns the value of theappNamerecord component.- Returns:
- the value of the
appNamerecord component
-
nodeId
Returns the value of thenodeIdrecord component.- Returns:
- the value of the
nodeIdrecord component
-
endPointOpt
Returns the value of theendPointOptrecord component.- Returns:
- the value of the
endPointOptrecord component
-
activeFlags
Returns the value of theactiveFlagsrecord component.- Returns:
- the value of the
activeFlagsrecord component
-
bootConfig
Returns the value of thebootConfigrecord component.- Returns:
- the value of the
bootConfigrecord component
-
moduleConfigs
Returns the value of themoduleConfigsrecord component.- Returns:
- the value of the
moduleConfigsrecord component
-
componentInitializerConfigs
Returns the value of thecomponentInitializerConfigsrecord component.- Returns:
- the value of the
componentInitializerConfigsrecord component
-