com.netflix.astyanax.test
Enum TestHostType

java.lang.Object
  extended by java.lang.Enum<TestHostType>
      extended by com.netflix.astyanax.test.TestHostType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TestHostType>

public enum TestHostType
extends java.lang.Enum<TestHostType>


Enum Constant Summary
ABORTED_CONNECTION
           
ALTERNATING_SOCKET_TIMEOUT_200
           
ALWAYS_DOWN
           
CONNECT_BAD_REQUEST_EXCEPTION
           
CONNECT_FAIL_FIRST
           
CONNECT_FAIL_FIRST_TWO
           
CONNECT_TIMEOUT
           
CONNECT_TRANSPORT_ERROR
           
CONNECT_WITH_UNCHECKED_EXCEPTION
           
FAIL_AFTER_10_SLOW_CLOSE
           
FAIL_AFTER_100
           
FAIL_AFTER_100_RANDOM
           
GOOD_FAST
           
GOOD_IMMEDIATE
           
GOOD_SLOW
           
LOST_CONNECTION
           
OPERATION_TIMEOUT
           
RANDOM_ALL
           
RECONNECT_2ND_TRY
           
SOCKET_TIMEOUT
           
SOCKET_TIMEOUT_AFTER10
           
SWAP_EVERY_200
           
THRASHING_TIMEOUT
           
 
Method Summary
 void close()
           
abstract
<R> OperationResult<R>
execute(HostConnectionPool<TestClient> pool, Operation<TestClient,R> op)
           
static TestHostType get(int ordinal)
           
abstract  void open(long timeout)
           
static TestHostType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TestHostType[] 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

ALWAYS_DOWN

public static final TestHostType ALWAYS_DOWN

CONNECT_WITH_UNCHECKED_EXCEPTION

public static final TestHostType CONNECT_WITH_UNCHECKED_EXCEPTION

CONNECT_TIMEOUT

public static final TestHostType CONNECT_TIMEOUT

CONNECT_TRANSPORT_ERROR

public static final TestHostType CONNECT_TRANSPORT_ERROR

CONNECT_FAIL_FIRST

public static final TestHostType CONNECT_FAIL_FIRST

CONNECT_FAIL_FIRST_TWO

public static final TestHostType CONNECT_FAIL_FIRST_TWO

LOST_CONNECTION

public static final TestHostType LOST_CONNECTION

SOCKET_TIMEOUT_AFTER10

public static final TestHostType SOCKET_TIMEOUT_AFTER10

OPERATION_TIMEOUT

public static final TestHostType OPERATION_TIMEOUT

SOCKET_TIMEOUT

public static final TestHostType SOCKET_TIMEOUT

ALTERNATING_SOCKET_TIMEOUT_200

public static final TestHostType ALTERNATING_SOCKET_TIMEOUT_200

CONNECT_BAD_REQUEST_EXCEPTION

public static final TestHostType CONNECT_BAD_REQUEST_EXCEPTION

GOOD_SLOW

public static final TestHostType GOOD_SLOW

GOOD_FAST

public static final TestHostType GOOD_FAST

GOOD_IMMEDIATE

public static final TestHostType GOOD_IMMEDIATE

FAIL_AFTER_100

public static final TestHostType FAIL_AFTER_100

FAIL_AFTER_100_RANDOM

public static final TestHostType FAIL_AFTER_100_RANDOM

THRASHING_TIMEOUT

public static final TestHostType THRASHING_TIMEOUT

RECONNECT_2ND_TRY

public static final TestHostType RECONNECT_2ND_TRY

ABORTED_CONNECTION

public static final TestHostType ABORTED_CONNECTION

FAIL_AFTER_10_SLOW_CLOSE

public static final TestHostType FAIL_AFTER_10_SLOW_CLOSE

SWAP_EVERY_200

public static final TestHostType SWAP_EVERY_200

RANDOM_ALL

public static final TestHostType RANDOM_ALL
Method Detail

values

public static TestHostType[] 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 (TestHostType c : TestHostType.values())
    System.out.println(c);

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

valueOf

public static TestHostType valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

get

public static TestHostType get(int ordinal)

execute

public abstract <R> OperationResult<R> execute(HostConnectionPool<TestClient> pool,
                                               Operation<TestClient,R> op)
                                    throws ConnectionException
Throws:
ConnectionException

open

public abstract void open(long timeout)
                   throws ConnectionException
Throws:
ConnectionException

close

public void close()