Record Class MetadataDiscoveryBrokerEndpointBinding
java.lang.Object
java.lang.Record
io.kroxylicious.proxy.internal.net.MetadataDiscoveryBrokerEndpointBinding
- Record Components:
endpointGateway- the endpoint gatewaynodeId- kafka nodeId of the target broker
- All Implemented Interfaces:
EndpointBinding,NodeSpecificEndpointBinding
public record MetadataDiscoveryBrokerEndpointBinding(EndpointGateway endpointGateway, Integer nodeId)
extends Record
implements NodeSpecificEndpointBinding
A bootstrap binding which can only be used for metadata discovery.
Its role is to allow the proxy to bind known ports without knowing the full upstream topology.
Once the upstream topology is discovered this should be replaced with a BrokerEndpointBinding for the same nodeId
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataDiscoveryBrokerEndpointBinding(EndpointGateway endpointGateway, Integer nodeId) Creates an instance of aMetadataDiscoveryBrokerEndpointBindingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theendpointGatewayrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.nodeId()Returns the value of thenodeIdrecord component.booleanIf set true, the upstream target must only be used for metadata discovery.final StringtoString()Returns a string representation of this record class.The upstream target of this binding.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.kroxylicious.proxy.internal.net.NodeSpecificEndpointBinding
refersToSameVirtualClusterAndNode
-
Constructor Details
-
MetadataDiscoveryBrokerEndpointBinding
Creates an instance of aMetadataDiscoveryBrokerEndpointBindingrecord class.- Parameters:
endpointGateway- the value for theendpointGatewayrecord componentnodeId- the value for thenodeIdrecord component
-
-
Method Details
-
upstreamTarget
Description copied from interface:EndpointBindingThe upstream target of this binding.- Specified by:
upstreamTargetin interfaceEndpointBinding- Returns:
- upstream target.
-
restrictUpstreamToMetadataDiscovery
public boolean restrictUpstreamToMetadataDiscovery()Description copied from interface:EndpointBindingIf set true, the upstream target must only be used for metadata discovery.- Specified by:
restrictUpstreamToMetadataDiscoveryin interfaceEndpointBinding- Returns:
- true if the target must be restricted to metadata discovery.
-
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). -
endpointGateway
Returns the value of theendpointGatewayrecord component.- Specified by:
endpointGatewayin interfaceEndpointBinding- Returns:
- the value of the
endpointGatewayrecord component
-
nodeId
Returns the value of thenodeIdrecord component.- Specified by:
nodeIdin interfaceEndpointBinding- Specified by:
nodeIdin interfaceNodeSpecificEndpointBinding- Returns:
- the value of the
nodeIdrecord component
-