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, boolean acceptingPlayers, 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
ConstructorsConstructorDescriptionHealth(boolean healthy, boolean acceptingPlayers, int capacity, double load, String protocolVersion, String build) Hosts without actual player telemetry report unknown, never a synthetic zero.Health(boolean healthy, boolean acceptingPlayers, int capacity, double load, String protocolVersion, String build, ProviderClient.PlayerCount playerCount) Creates an instance of aHealthrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theacceptingPlayersrecord component.build()Returns the value of thebuildrecord component.intcapacity()Returns the value of thecapacityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhealthy()Returns the value of thehealthyrecord component.doubleload()Returns the value of theloadrecord component.Returns the value of theplayerCountrecord component.Returns the value of theprotocolVersionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Health
public Health(boolean healthy, boolean acceptingPlayers, int capacity, double load, String protocolVersion, String build, ProviderClient.PlayerCount playerCount) Creates an instance of aHealthrecord class.- Parameters:
healthy- the value for thehealthyrecord componentacceptingPlayers- the value for theacceptingPlayersrecord componentcapacity- the value for thecapacityrecord componentload- the value for theloadrecord componentprotocolVersion- the value for theprotocolVersionrecord componentbuild- the value for thebuildrecord componentplayerCount- the value for theplayerCountrecord component
-
Health
public Health(boolean healthy, boolean acceptingPlayers, int capacity, double load, String protocolVersion, String build) Hosts without actual player telemetry report unknown, never a synthetic zero.
-
-
Method Details
-
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 '=='. -
healthy
public boolean healthy()Returns the value of thehealthyrecord component.- Returns:
- the value of the
healthyrecord component
-
acceptingPlayers
public boolean acceptingPlayers()Returns the value of theacceptingPlayersrecord component.- Returns:
- the value of the
acceptingPlayersrecord component
-
capacity
public int capacity()Returns the value of thecapacityrecord component.- Returns:
- the value of the
capacityrecord component
-
load
public double load()Returns the value of theloadrecord component.- Returns:
- the value of the
loadrecord component
-
protocolVersion
Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
build
Returns the value of thebuildrecord component.- Returns:
- the value of the
buildrecord component
-
playerCount
Returns the value of theplayerCountrecord component.- Returns:
- the value of the
playerCountrecord component
-