Record Class VirtualCluster

java.lang.Object
java.lang.Record
io.kroxylicious.proxy.config.VirtualCluster
Record Components:
name - virtual cluster name
targetCluster - inline target cluster definition (mutually exclusive with target)
target - reference to a named cluster or router (mutually exclusive with targetCluster)
gateways - virtual cluster gateways
logNetwork - if true, network will be logged
logFrames - if true, kafka rpcs will be logged
filters - filters applied to requests
subjectBuilder - subject builder configuration (optional)
topicNameCache - topic-name cache configuration (optional)
drainTimeout - maximum time to wait for in-flight requests to complete during graceful connection draining for this cluster

public record VirtualCluster(String name, TargetCluster targetCluster, RouteTarget target, List<VirtualClusterGateway> gateways, boolean logNetwork, boolean logFrames, List<String> filters, TransportSubjectBuilderConfig subjectBuilder, CacheConfiguration topicNameCache, Duration drainTimeout) extends Record
A virtual cluster.
  • Constructor Details

  • Method Details

    • router

      @Nullable public String router()
    • namedTargetCluster

      @Nullable public String namedTargetCluster()
    • sameAs

      public boolean sameAs(@Nullable VirtualCluster other)
      Returns true if this cluster's deployment-time configuration is semantically identical to other's. Used by the configuration change-detection pipeline (see VirtualClusterChangeDetector) to decide whether a virtual cluster needs to be restarted across a reconfigure().

      Implementation uses the record's auto-generated equals(Object) after canonicalising gateway order — gateways is a name-keyed semantic set, so reordering YAML entries is a no-op and must not produce a false positive. All other components (including any added in the future) are compared by the record's auto-equals, so this method extends automatically.

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • targetCluster

      @Deprecated(since="0.22.0", forRemoval=true) @Nullable public TargetCluster targetCluster()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the value of the targetCluster record component.
      Returns:
      the value of the targetCluster record component
    • target

      @Nullable public RouteTarget target()
      Returns the value of the target record component.
      Returns:
      the value of the target record component
    • gateways

      public List<VirtualClusterGateway> gateways()
      Returns the value of the gateways record component.
      Returns:
      the value of the gateways record component
    • logNetwork

      public boolean logNetwork()
      Returns the value of the logNetwork record component.
      Returns:
      the value of the logNetwork record component
    • logFrames

      public boolean logFrames()
      Returns the value of the logFrames record component.
      Returns:
      the value of the logFrames record component
    • filters

      @Nullable public List<String> filters()
      Returns the value of the filters record component.
      Returns:
      the value of the filters record component
    • subjectBuilder

      @Nullable public TransportSubjectBuilderConfig subjectBuilder()
      Returns the value of the subjectBuilder record component.
      Returns:
      the value of the subjectBuilder record component
    • topicNameCache

      @Nullable public CacheConfiguration topicNameCache()
      Returns the value of the topicNameCache record component.
      Returns:
      the value of the topicNameCache record component
    • drainTimeout

      @Nullable public Duration drainTimeout()
      Returns the value of the drainTimeout record component.
      Returns:
      the value of the drainTimeout record component