Package cloud.spawnery.agent.api
Record Class ScaleResult
java.lang.Object
java.lang.Record
cloud.spawnery.agent.api.ScaleResult
- Record Components:
replicas- the size the group is now held at.
The pin a
SpawneryApi.scale(java.lang.String, int, java.time.Duration) call created.
expiresAt is the operator's clock, not yours; it is good
for telling a person when the pin ends.
-
Constructor Summary
ConstructorsConstructorDescriptionScaleResult(int replicas, Instant expiresAt) Creates an instance of aScaleResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.final inthashCode()Returns a hash code value for this object.intreplicas()Returns the value of thereplicasrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScaleResult
Creates an instance of aScaleResultrecord class.- Parameters:
replicas- the value for thereplicasrecord componentexpiresAt- the value for theexpiresAtrecord 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 '=='. -
replicas
public int replicas()Returns the value of thereplicasrecord component.- Returns:
- the value of the
replicasrecord component
-
expiresAt
Returns the value of theexpiresAtrecord component.- Returns:
- the value of the
expiresAtrecord component
-