Package discord4j.common.retry
Class ReconnectContext
- java.lang.Object
-
- discord4j.common.retry.ReconnectContext
-
public class ReconnectContext extends Object
-
-
Constructor Summary
Constructors Constructor Description ReconnectContext(Duration firstBackoff, Duration maxBackoffInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear the attempt count, treating further calls tonext()as brand new retry context.intgetAttempts()DurationgetFirstBackoff()DurationgetMaxBackoffInterval()intgetResetCount()voidnext()Signal that the next retry attempt should be underway.voidreset()Reset the attempt count, treating further calls tonext()as new retry sequences.
-
-
-
Method Detail
-
next
public void next()
Signal that the next retry attempt should be underway.
-
reset
public void reset()
Reset the attempt count, treating further calls tonext()as new retry sequences.
-
clear
public void clear()
Clear the attempt count, treating further calls tonext()as brand new retry context.
-
getFirstBackoff
public Duration getFirstBackoff()
-
getMaxBackoffInterval
public Duration getMaxBackoffInterval()
-
getAttempts
public int getAttempts()
-
getResetCount
public int getResetCount()
-
-