|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectme.prettyprint.cassandra.service.FailoverPolicy<E>
public class FailoverPolicy<E extends Throwable>
What should the client do if a call to cassandra node fails and we suspect that the node is down. (e.g. it's a communication error, not an application error). will return the error as is to the user and not try anything smart will try one more random server before returning to the user with an error will try all available servers in the cluster before giving up and returning the communication error to the user.
| Field Summary | |
|---|---|
Set<Class<E>> |
dontRetry
Optional set of classes representing Exceptions/Errors for which retry should not happen. |
static FailoverPolicy |
FAIL_FAST
On communication failure, just return the error to the client and don't retry |
int |
numRetries
|
static FailoverPolicy |
ON_FAIL_TRY_ALL_AVAILABLE
On communication error try all known servers before giving up |
static FailoverPolicy |
ON_FAIL_TRY_ONE_NEXT_AVAILABLE
On communication error try one more server before giving up |
int |
sleepBetweenHostsMilli
|
| Constructor Summary | |
|---|---|
FailoverPolicy(int numRetries,
int sleepBwHostsMilli)
|
|
FailoverPolicy(int numRetries,
int sleepBwHostsMilli,
Class<E> dontRetryForType)
|
|
FailoverPolicy(int numRetries,
int sleepBwHostsMilli,
Set<Class<E>> dontRetryForTypes)
|
|
| Method Summary | |
|---|---|
boolean |
shouldRetryFor(Class<E> candidate)
Determines if a given class is an exception or error that this FailoverPolicy supports retry for. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static FailoverPolicy FAIL_FAST
public static FailoverPolicy ON_FAIL_TRY_ONE_NEXT_AVAILABLE
public static FailoverPolicy ON_FAIL_TRY_ALL_AVAILABLE
public final int numRetries
public final int sleepBetweenHostsMilli
public final Set<Class<E extends Throwable>> dontRetry
| Constructor Detail |
|---|
public FailoverPolicy(int numRetries,
int sleepBwHostsMilli)
public FailoverPolicy(int numRetries,
int sleepBwHostsMilli,
Class<E> dontRetryForType)
public FailoverPolicy(int numRetries,
int sleepBwHostsMilli,
Set<Class<E>> dontRetryForTypes)
| Method Detail |
|---|
public boolean shouldRetryFor(Class<E> candidate)
HConnectionManager.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||