Package cloud.spawnery.agent.api
Record Class GroupStatus
java.lang.Object
java.lang.Record
cloud.spawnery.agent.api.GroupStatus
public record GroupStatus(String name, Group.Kind kind, String phase, int replicas, int readyReplicas, int players, OptionalDouble lowestTps, ResourceUsage usage)
extends Record
One group in a
NetworkStatus. lowestTps is empty for a proxy
group and for a group none of whose servers reported one.-
Constructor Summary
ConstructorsConstructorDescriptionGroupStatus(String name, Group.Kind kind, String phase, int replicas, int readyReplicas, int players, OptionalDouble lowestTps, ResourceUsage usage) Creates an instance of aGroupStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.Returns the value of thelowestTpsrecord component.name()Returns the value of thenamerecord component.phase()Returns the value of thephaserecord component.intplayers()Returns the value of theplayersrecord component.intReturns the value of thereadyReplicasrecord component.intreplicas()Returns the value of thereplicasrecord component.final StringtoString()Returns a string representation of this record class.usage()Returns the value of theusagerecord component.
-
Constructor Details
-
GroupStatus
public GroupStatus(String name, Group.Kind kind, String phase, int replicas, int readyReplicas, int players, OptionalDouble lowestTps, ResourceUsage usage) Creates an instance of aGroupStatusrecord class.- Parameters:
name- the value for thenamerecord componentkind- the value for thekindrecord componentphase- the value for thephaserecord componentreplicas- the value for thereplicasrecord componentreadyReplicas- the value for thereadyReplicasrecord componentplayers- the value for theplayersrecord componentlowestTps- the value for thelowestTpsrecord componentusage- the value for theusagerecord component
-
-
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
phase
Returns the value of thephaserecord component.- Returns:
- the value of the
phaserecord component
-
replicas
public int replicas()Returns the value of thereplicasrecord component.- Returns:
- the value of the
replicasrecord component
-
readyReplicas
public int readyReplicas()Returns the value of thereadyReplicasrecord component.- Returns:
- the value of the
readyReplicasrecord component
-
players
public int players()Returns the value of theplayersrecord component.- Returns:
- the value of the
playersrecord component
-
lowestTps
Returns the value of thelowestTpsrecord component.- Returns:
- the value of the
lowestTpsrecord component
-
usage
Returns the value of theusagerecord component.- Returns:
- the value of the
usagerecord component
-