Package io.kroxylicious.proxy.config
Record Class ClusterDefinition
java.lang.Object
java.lang.Record
io.kroxylicious.proxy.config.ClusterDefinition
- Record Components:
name- unique name for this clusterbootstrapServers- comma-separated list of host:port pairstls- optional TLS configuration for the upstream connection
public record ClusterDefinition(String name, String bootstrapServers, io.kroxylicious.proxy.config.tls.Tls tls)
extends Record
A named cluster definition, referenced by routes and virtual clusters.
-
Constructor Summary
ConstructorsConstructorDescriptionClusterDefinition(String name, String bootstrapServers, io.kroxylicious.proxy.config.tls.Tls tls) Creates an instance of aClusterDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebootstrapServersrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.io.kroxylicious.proxy.config.tls.Tlstls()Returns the value of thetlsrecord component.final StringtoString()Returns a string representation of this record class.Converts this definition to aTargetClusterfor use in the runtime.
-
Constructor Details
-
ClusterDefinition
public ClusterDefinition(String name, String bootstrapServers, @Nullable io.kroxylicious.proxy.config.tls.Tls tls) Creates an instance of aClusterDefinitionrecord class.- Parameters:
name- the value for thenamerecord componentbootstrapServers- the value for thebootstrapServersrecord componenttls- the value for thetlsrecord component
-
-
Method Details
-
toTargetCluster
Converts this definition to aTargetClusterfor use in the runtime. -
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
bootstrapServers
Returns the value of thebootstrapServersrecord component.- Returns:
- the value of the
bootstrapServersrecord component
-
tls
@Nullable public io.kroxylicious.proxy.config.tls.Tls tls()Returns the value of thetlsrecord component.- Returns:
- the value of the
tlsrecord component
-