Record Class RelayConfig.ForwardConfig

java.lang.Object
java.lang.Record
org.jgroups.protocols.relay.config.RelayConfig.ForwardConfig
Record Components:
to - The destination
gateway - The gateway to use for the above destination
Enclosing class:
RelayConfig

public static record RelayConfig.ForwardConfig(String to, String gateway) extends Record
Forwards to site 'to' via route 'gateway'. Example: if site HF is reachable via NET1, if NET2 is not directly connected to HF, it needs to have a ForwardConfig with to="HF" and gateway="NET1". This means that a message to site HF will be forwarded to NET1, which then forwards it to HF.
Since:
3.2
Author:
Bela Ban
  • Constructor Details

    • ForwardConfig

      public ForwardConfig(String to, String gateway)
      Creates an instance of a ForwardConfig record class.
      Parameters:
      to - the value for the to record component
      gateway - the value for the gateway record component
  • Method Details

    • toString

      public 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • to

      public String to()
      Returns the value of the to record component.
      Returns:
      the value of the to record component
    • gateway

      public String gateway()
      Returns the value of the gateway record component.
      Returns:
      the value of the gateway record component