Record Class ReconnectState.Reconnecting
java.lang.Object
java.lang.Record
com.botwithus.bot.api.runtime.ReconnectState.Reconnecting
- All Implemented Interfaces:
ReconnectState
- Enclosing interface:
ReconnectState
public static record ReconnectState.Reconnecting(long timestamp, int attempt, long nextDelayMs)
extends Record
implements ReconnectState
-
Nested Class Summary
Nested classes/interfaces inherited from interface ReconnectState
ReconnectState.Connected, ReconnectState.Disconnected, ReconnectState.GivingUp, ReconnectState.Reconnecting -
Constructor Summary
ConstructorsConstructorDescriptionReconnecting(long timestamp, int attempt, long nextDelayMs) Creates an instance of aReconnectingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintattempt()Returns the value of theattemptrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thenextDelayMsrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Reconnecting
public Reconnecting(long timestamp, int attempt, long nextDelayMs) Creates an instance of aReconnectingrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentattempt- the value for theattemptrecord componentnextDelayMs- the value for thenextDelayMsrecord 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. All components in this record class 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
-
attempt
public int attempt()Returns the value of theattemptrecord component.- Returns:
- the value of the
attemptrecord component
-
nextDelayMs
public long nextDelayMs()Returns the value of thenextDelayMsrecord component.- Returns:
- the value of the
nextDelayMsrecord component
-