me.prettyprint.cassandra.service
Class FailoverPolicy

java.lang.Object
  extended by me.prettyprint.cassandra.service.FailoverPolicy

public class FailoverPolicy
extends Object

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
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)
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FAIL_FAST

public static FailoverPolicy FAIL_FAST
On communication failure, just return the error to the client and don't retry


ON_FAIL_TRY_ONE_NEXT_AVAILABLE

public static FailoverPolicy ON_FAIL_TRY_ONE_NEXT_AVAILABLE
On communication error try one more server before giving up


ON_FAIL_TRY_ALL_AVAILABLE

public static FailoverPolicy ON_FAIL_TRY_ALL_AVAILABLE
On communication error try all known servers before giving up


numRetries

public final int numRetries

sleepBetweenHostsMilli

public final int sleepBetweenHostsMilli
Constructor Detail

FailoverPolicy

public FailoverPolicy(int numRetries,
                      int sleepBwHostsMilli)


Copyright © 2011. All Rights Reserved.