Record Class ProxyInfo

java.lang.Object
java.lang.Record
cloud.spawnery.agent.api.ProxyInfo
Record Components:
name - the proxy's pod name
group - the proxy group it belongs to
ready - whether it passes its ready gate
draining - whether it takes no new connections and stops once empty
players - the players its agent reports

public record ProxyInfo(String name, String group, boolean ready, boolean draining, int players, String node) extends Record
One proxy of this network, as the operator last described it.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProxyInfo(String name, String group, boolean ready, boolean draining, int players)
    The record as it was before node, which it reads as not scheduled.
    ProxyInfo(String name, String group, boolean ready, boolean draining, int players, String node)
    Creates an instance of a ProxyInfo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the draining record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the group record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the name record component.
    Returns the value of the node record component.
    int
    Returns the value of the players record component.
    boolean
    Returns the value of the ready record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ProxyInfo

      public ProxyInfo(String name, String group, boolean ready, boolean draining, int players, String node)
      Creates an instance of a ProxyInfo record class.
      Parameters:
      name - the value for the name record component
      group - the value for the group record component
      ready - the value for the ready record component
      draining - the value for the draining record component
      players - the value for the players record component
      node - the value for the node record component
    • ProxyInfo

      public ProxyInfo(String name, String group, boolean ready, boolean draining, int players)
      The record as it was before node, which it reads as not scheduled.
  • Method Details

    • 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
    • group

      public String group()
      Returns the value of the group record component.
      Returns:
      the value of the group record component
    • ready

      public boolean ready()
      Returns the value of the ready record component.
      Returns:
      the value of the ready record component
    • draining

      public boolean draining()
      Returns the value of the draining record component.
      Returns:
      the value of the draining record component
    • players

      public int players()
      Returns the value of the players record component.
      Returns:
      the value of the players record component
    • node

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