Package cloud.spawnery.agent.api
Record Class BoostResult
java.lang.Object
java.lang.Record
cloud.spawnery.agent.api.BoostResult
- Record Components:
replicas- how many servers this boost adds, as the operator counted them.
The extra capacity a
SpawneryApi.boost(java.lang.String, int, java.time.Duration) call created.
expiresAt is the operator's clock, not yours, so comparing
it against Instant.now() is off by any clock skew between the two.
What it is good for is telling a person when the extra servers go away.
-
Constructor Summary
ConstructorsConstructorDescriptionBoostResult(int replicas, Instant expiresAt) Creates an instance of aBoostResultrecord 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
-
BoostResult
Creates an instance of aBoostResultrecord 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
-