com.jolbox.bonecp.hooks
Enum ConnectionState

java.lang.Object
  extended by java.lang.Enum<ConnectionState>
      extended by com.jolbox.bonecp.hooks.ConnectionState
All Implemented Interfaces:
Serializable, Comparable<ConnectionState>

public enum ConnectionState
extends Enum<ConnectionState>

An enum to indicate the state of a connection to be used as a signal via the onMarkPossiblyBroken hook.

Author:
wallacew

Enum Constant Summary
CONNECTION_POSSIBLY_BROKEN
          Test this connection next time it goes back to the pool because it might be broken.
NOP
          Not sure/don't override default action.
TERMINATE_ALL_CONNECTIONS
          Not only is this connection broken but all connections in this pool should be considered broken too.
 
Method Summary
static ConnectionState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ConnectionState[] 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

NOP

public static final ConnectionState NOP
Not sure/don't override default action.


CONNECTION_POSSIBLY_BROKEN

public static final ConnectionState CONNECTION_POSSIBLY_BROKEN
Test this connection next time it goes back to the pool because it might be broken.


TERMINATE_ALL_CONNECTIONS

public static final ConnectionState TERMINATE_ALL_CONNECTIONS
Not only is this connection broken but all connections in this pool should be considered broken too.

Method Detail

values

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

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

valueOf

public static ConnectionState 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 © 2009-2011 JolBox. All Rights Reserved.