Record Class ReconnectState.GivingUp
java.lang.Object
java.lang.Record
com.botwithus.bot.api.runtime.ReconnectState.GivingUp
- All Implemented Interfaces:
ReconnectState
- Enclosing interface:
ReconnectState
public static record ReconnectState.GivingUp(long timestamp, int attempts, Throwable lastCause)
extends Record
implements ReconnectState
-
Nested Class Summary
Nested classes/interfaces inherited from interface ReconnectState
ReconnectState.Connected, ReconnectState.Disconnected, ReconnectState.GivingUp, ReconnectState.Reconnecting -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintattempts()Returns the value of theattemptsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelastCauserecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GivingUp
Creates an instance of aGivingUprecord class.- Parameters:
timestamp- the value for thetimestamprecord componentattempts- the value for theattemptsrecord componentlastCause- the value for thelastCauserecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceReconnectState- Returns:
- the value of the
timestamprecord component
-
attempts
public int attempts()Returns the value of theattemptsrecord component.- Returns:
- the value of the
attemptsrecord component
-
lastCause
Returns the value of thelastCauserecord component.- Returns:
- the value of the
lastCauserecord component
-