public class BasicReconnectionManager extends Object implements ReconnectionManager
| Modifier and Type | Field and Description |
|---|---|
static int |
INITIAL_EXPONENTIAL_BACKOFF_MILLIS |
static int |
INITIAL_LINEAR_BACKOFF_MILLIS |
static int |
MAX_EXPONENTIAL_BACKOFF_MILLIS |
static int |
MAX_LINEAR_BACKOFF_MILLIS |
| Constructor and Description |
|---|
BasicReconnectionManager(int maxRetries) |
| Modifier and Type | Method and Description |
|---|---|
int |
estimateBackfill(double tps)
Estimates the backfill count param given the tps
|
void |
handleExponentialBackoff() |
void |
handleLinearBackoff() |
void |
resetCounts()
Call this when we have an active connection established
|
boolean |
shouldReconnectOn400s() |
public static final int INITIAL_EXPONENTIAL_BACKOFF_MILLIS
public static final int INITIAL_LINEAR_BACKOFF_MILLIS
public static final int MAX_LINEAR_BACKOFF_MILLIS
public static final int MAX_EXPONENTIAL_BACKOFF_MILLIS
public void handleExponentialBackoff()
handleExponentialBackoff in interface ReconnectionManagerpublic void handleLinearBackoff()
handleLinearBackoff in interface ReconnectionManagerpublic boolean shouldReconnectOn400s()
shouldReconnectOn400s in interface ReconnectionManagerpublic int estimateBackfill(double tps)
ReconnectionManagerestimateBackfill in interface ReconnectionManagerpublic void resetCounts()
ReconnectionManagerresetCounts in interface ReconnectionManagerCopyright © 2014. All Rights Reserved.