public final class TruncatedBinaryExponentialBackOffStrategy extends Object implements ReconnectionStrategy
| Constructor and Description |
|---|
TruncatedBinaryExponentialBackOffStrategy(int slotTime,
int ceiling) |
| Modifier and Type | Method and Description |
|---|---|
int |
getNextReconnectionAttempt(int attempt)
Gets the time (in seconds) until the next reconnection is attempted.
|
public TruncatedBinaryExponentialBackOffStrategy(int slotTime,
int ceiling)
slotTime - The slot time (in seconds), usually 60.ceiling - The ceiling, i.e. when the time is truncated. E.g. if the ceiling is 5public int getNextReconnectionAttempt(int attempt)
ReconnectionStrategygetNextReconnectionAttempt in interface ReconnectionStrategyattempt - The current reconnection attempt. The first attempt is 0, the second attempt is 1, etc...Copyright © 2014 XMPP.rocks. All rights reserved.