Package discord4j.gateway.retry
Class RetryContext
- java.lang.Object
-
- discord4j.gateway.retry.RetryContext
-
public class RetryContext extends Object
-
-
Constructor Summary
Constructors Constructor Description RetryContext(Duration firstBackoff, Duration maxBackoffInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAttempts()
Duration
getFirstBackoff()
Duration
getMaxBackoffInterval()
int
getResetCount()
boolean
isConnected()
void
next()
Signal that the next retry attempt should be underway.void
reset()
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.
-
getFirstBackoff
public Duration getFirstBackoff()
-
getMaxBackoffInterval
public Duration getMaxBackoffInterval()
-
isConnected
public boolean isConnected()
-
getAttempts
public int getAttempts()
-
getResetCount
public int getResetCount()
-
-