net.dataforte.cassandra.pool
Enum HostFailoverPolicy

java.lang.Object
  extended by java.lang.Enum<HostFailoverPolicy>
      extended by net.dataforte.cassandra.pool.HostFailoverPolicy
All Implemented Interfaces:
Serializable, Comparable<HostFailoverPolicy>

public enum HostFailoverPolicy
extends Enum<HostFailoverPolicy>

This enum was taken from Hector

Author:
Tristan Tarrant

Enum Constant Summary
FAIL_FAST
          On communication failure, just return the error to the client and don't retry
ON_FAIL_TRY_ALL_AVAILABLE
          On communication error try all known servers before giving up
ON_FAIL_TRY_ONE_NEXT_AVAILABLE
          On communication error try one more server before giving up
 
Field Summary
 int numRetries
           
 
Method Summary
static HostFailoverPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HostFailoverPolicy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FAIL_FAST

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


ON_FAIL_TRY_ONE_NEXT_AVAILABLE

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


ON_FAIL_TRY_ALL_AVAILABLE

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

Field Detail

numRetries

public final int numRetries
Method Detail

values

public static HostFailoverPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (HostFailoverPolicy c : HostFailoverPolicy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static HostFailoverPolicy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2011. All Rights Reserved.