static class ConnectionManager.ServerErrorTracker extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
ConnectionManager.ServerErrorTracker.ServerErrors
The record of errors for a server.
|
Modifier and Type | Field and Description |
---|---|
private long |
canRetryUntil |
private ConcurrentMap<ServerName,ConnectionManager.ServerErrorTracker.ServerErrors> |
errorsByServer |
private int |
maxRetries |
private long |
startTrackingTime |
Constructor and Description |
---|
ConnectionManager.ServerErrorTracker(long timeout,
int maxRetries) |
Modifier and Type | Method and Description |
---|---|
(package private) long |
calculateBackoffTime(ServerName server,
long basePause)
Calculates the back-off time for a retrying request to a particular server.
|
(package private) boolean |
canRetryMore(int numRetry)
We stop to retry when we have exhausted BOTH the number of retries and the time allocated.
|
(package private) long |
getStartTrackingTime() |
(package private) void |
reportServerError(ServerName server)
Reports that there was an error on the server to do whatever bean-counting necessary.
|
private final ConcurrentMap<ServerName,ConnectionManager.ServerErrorTracker.ServerErrors> errorsByServer
private final long canRetryUntil
private final int maxRetries
private final long startTrackingTime
public ConnectionManager.ServerErrorTracker(long timeout, int maxRetries)
boolean canRetryMore(int numRetry)
long calculateBackoffTime(ServerName server, long basePause)
server
- The server in question.basePause
- The default hci pause.void reportServerError(ServerName server)
server
- The server in question.long getStartTrackingTime()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.