Record Class RouteDescriptor
java.lang.Object
java.lang.Record
io.kroxylicious.proxy.internal.routing.RouteDescriptor
- Record Components:
name- the route nameid- numeric identifier used in the virtual node ID mapping formulatargetCluster- the target cluster for this route, or null if targeting a nested routerrouterName- the name of a nested router to forward to, or null if targeting a clusterfilters- per-route filter definitions (may be empty)
public record RouteDescriptor(String name, int id, TargetCluster targetCluster, String routerName, List<NamedFilterDefinition> filters)
extends Record
Runtime representation of a resolved route within a router.
-
Constructor Summary
ConstructorsConstructorDescriptionRouteDescriptor(String name, int id, TargetCluster targetCluster, String routerName, List<NamedFilterDefinition> filters) Creates an instance of aRouteDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.filters()Returns the value of thefiltersrecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.Returns the value of therouterNamerecord component.Returns the value of thetargetClusterrecord component.booleanReturns true if this route targets a Kafka cluster.booleanReturns true if this route targets a nested router.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RouteDescriptor
public RouteDescriptor(String name, int id, @Nullable TargetCluster targetCluster, @Nullable String routerName, List<NamedFilterDefinition> filters) Creates an instance of aRouteDescriptorrecord class.- Parameters:
name- the value for thenamerecord componentid- the value for theidrecord componenttargetCluster- the value for thetargetClusterrecord componentrouterName- the value for therouterNamerecord componentfilters- the value for thefiltersrecord component
-
-
Method Details
-
targetsCluster
public boolean targetsCluster()Returns true if this route targets a Kafka cluster. -
targetsRouter
public boolean targetsRouter()Returns true if this route targets a nested router. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
targetCluster
Returns the value of thetargetClusterrecord component.- Returns:
- the value of the
targetClusterrecord component
-
routerName
Returns the value of therouterNamerecord component.- Returns:
- the value of the
routerNamerecord component
-
filters
Returns the value of thefiltersrecord component.- Returns:
- the value of the
filtersrecord component
-