Record Class NetworkCluster
java.lang.Object
java.lang.Record
eu.cloudnetservice.driver.cluster.NetworkCluster
- Record Components:
clusterId- the id of the cluster which is running.nodes- all nodes which are running in the cluster.
public record NetworkCluster(@NonNull UUID clusterId, @NonNull Collection<NetworkClusterNode> nodes)
extends Record
Represents the main entry point which holds all information about a cluster configuration. Essentially, this class
holds everything a cluster needs to run.
- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theclusterIdrecord component.private final @NonNull Collection<NetworkClusterNode> The field for thenodesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionNetworkCluster(@NonNull UUID clusterId, @NonNull Collection<NetworkClusterNode> nodes) Creates an instance of aNetworkClusterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclusterIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.nodes()Returns the value of thenodesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
clusterId
-
nodes
The field for thenodesrecord component.
-
-
Constructor Details
-
NetworkCluster
public NetworkCluster(@NonNull @NonNull UUID clusterId, @NonNull @NonNull Collection<NetworkClusterNode> nodes) Creates an instance of aNetworkClusterrecord class.
-
-
Method Details
-
toString
-
hashCode
-
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). -
clusterId
-
nodes
-