Package com.tnsai.coordination.lifecycle
Record Class GracefulShutdown.ShutdownResult
java.lang.Object
java.lang.Record
com.tnsai.coordination.lifecycle.GracefulShutdown.ShutdownResult
- Record Components:
groupId- the group's IDduration- how long the shutdown tookmembersRemoved- number of members removed during shutdowngraceful- whether the shutdown completed gracefully within timeoutreason- human-readable description of the shutdown outcome
- Enclosing class:
GracefulShutdown
public static record GracefulShutdown.ShutdownResult(String groupId, Duration duration, int membersRemoved, boolean graceful, String reason)
extends Record
Result of a group shutdown operation.
-
Constructor Summary
ConstructorsConstructorDescriptionShutdownResult(String groupId, Duration duration, int membersRemoved, boolean graceful, String reason) Creates a ShutdownResult with validation. -
Method Summary
Modifier and TypeMethodDescriptionduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.booleangraceful()Returns the value of thegracefulrecord component.groupId()Returns the value of thegroupIdrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themembersRemovedrecord component.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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 '=='. -
groupId
Returns the value of thegroupIdrecord component.- Returns:
- the value of the
groupIdrecord component
-
duration
Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
membersRemoved
public int membersRemoved()Returns the value of themembersRemovedrecord component.- Returns:
- the value of the
membersRemovedrecord component
-
graceful
public boolean graceful()Returns the value of thegracefulrecord component.- Returns:
- the value of the
gracefulrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-