Package io.kroxylicious.proxy.config
Record Class TargetCluster
java.lang.Object
java.lang.Record
io.kroxylicious.proxy.config.TargetCluster
- Record Components:
bootstrapServers- A list of host/port pairs to use for establishing the initial connection to the target (upstream) Kafka cluster.tls- tls configuration if a secure connection is to be used.selectionStrategy- The strategy used for selecting a bootstrap server when multiple servers are specified.
public record TargetCluster(String bootstrapServers, Optional<io.kroxylicious.proxy.config.tls.Tls> tls, BootstrapSelectionStrategy selectionStrategy)
extends Record
Represents the target (upstream) kafka cluster.
-
Constructor Summary
ConstructorsConstructorDescriptionTargetCluster(String bootstrapServers, Optional<io.kroxylicious.proxy.config.tls.Tls> tls) TargetCluster(String bootstrapServers, Optional<io.kroxylicious.proxy.config.tls.Tls> tls, BootstrapSelectionStrategy selectionStrategy) Creates an instance of aTargetClusterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionA list of host/port pairs to use for establishing the initial connection to the target (upstream) Kafka cluster.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theselectionStrategyrecord component.Optional<io.kroxylicious.proxy.config.tls.Tls> tls()Returns the value of thetlsrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
TargetCluster
public TargetCluster(String bootstrapServers, Optional<io.kroxylicious.proxy.config.tls.Tls> tls, @Nullable BootstrapSelectionStrategy selectionStrategy) Creates an instance of aTargetClusterrecord class.- Parameters:
bootstrapServers- the value for thebootstrapServersrecord componenttls- the value for thetlsrecord componentselectionStrategy- the value for theselectionStrategyrecord component
-
TargetCluster
-
-
Method Details
-
bootstrapServers
A list of host/port pairs to use for establishing the initial connection to the target (upstream) Kafka cluster. This list should be in the form host1:port1,host2:port2,...- Returns:
- comma separated list of bootstrap servers.
-
bootstrapServersList
-
bootstrapServer
-
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). -
tls
Returns the value of thetlsrecord component.- Returns:
- the value of the
tlsrecord component
-
selectionStrategy
Returns the value of theselectionStrategyrecord component.- Returns:
- the value of the
selectionStrategyrecord component
-