Record Class ProviderClient.Health

java.lang.Object
java.lang.Record
org.cloudburstmc.netty.signalling.ProviderClient.Health
Enclosing class:
ProviderClient

public static record ProviderClient.Health(boolean healthy, int capacity, double load, String protocolVersion, String build, ProviderClient.PlayerCount playerCount) extends Record
Capacity and playerCount describe the same observation. Public server status is independent.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Health(boolean healthy, int capacity, double load, String protocolVersion, String build)
    Hosts without actual player telemetry report unknown, never a synthetic zero.
    Health(boolean healthy, int capacity, double load, String protocolVersion, String build, ProviderClient.PlayerCount playerCount)
    Creates an instance of a Health record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the build record component.
    int
    Returns the value of the capacity record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the healthy record component.
    double
    Returns the value of the load record component.
    Returns the value of the playerCount record component.
    Returns the value of the protocolVersion 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

    • Health

      public Health(boolean healthy, int capacity, double load, String protocolVersion, String build, ProviderClient.PlayerCount playerCount)
      Creates an instance of a Health record class.
      Parameters:
      healthy - the value for the healthy record component
      capacity - the value for the capacity record component
      load - the value for the load record component
      protocolVersion - the value for the protocolVersion record component
      build - the value for the build record component
      playerCount - the value for the playerCount record component
    • Health

      public Health(boolean healthy, int capacity, double load, String protocolVersion, String build)
      Hosts without actual player telemetry report unknown, never a synthetic zero.
  • 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.
    • healthy

      public boolean healthy()
      Returns the value of the healthy record component.
      Returns:
      the value of the healthy record component
    • capacity

      public int capacity()
      Returns the value of the capacity record component.
      Returns:
      the value of the capacity record component
    • load

      public double load()
      Returns the value of the load record component.
      Returns:
      the value of the load record component
    • protocolVersion

      public String protocolVersion()
      Returns the value of the protocolVersion record component.
      Returns:
      the value of the protocolVersion record component
    • build

      public String build()
      Returns the value of the build record component.
      Returns:
      the value of the build record component
    • playerCount

      public ProviderClient.PlayerCount playerCount()
      Returns the value of the playerCount record component.
      Returns:
      the value of the playerCount record component