Package oracle.jdbc
Enum Class OracleConnection.ConnectionValidation
java.lang.Object
java.lang.Enum<OracleConnection.ConnectionValidation>
oracle.jdbc.OracleConnection.ConnectionValidation
- All Implemented Interfaces:
Serializable,Comparable<OracleConnection.ConnectionValidation>,Constable
- Enclosing interface:
- OracleConnection
public static enum OracleConnection.ConnectionValidation
extends Enum<OracleConnection.ConnectionValidation>
Specifiers for how much effort to put into validating a
List of possible values in increasing order of effort :
Connection.
The amount of effort put into validating the Connection ranges from NONE
(least effort) to COMPLETE (most effort). List of possible values in increasing order of effort :
The more effort is put into validation the more accurate the result is.
Only COMPLETE ensures that connection is completely healthy.
Note : The amount of effort brings a cost. It is up to the user to find the right tradeoff.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptioneverything that can be checked is working.The JDBC driver validates the connection by reading the inband down event in non-blocking mode.NONEplus check local resources.SOCKETplus the network is intact (network PING).OracleConnection.isValid(oracle.jdbc.OracleConnection.ConnectionValidation, int)fails only if theConnectionis closed.NETWORKplus significant server processes are running.LOCALplus the server isn't obviously unreachable (dead socket). -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
OracleConnection.isValid(oracle.jdbc.OracleConnection.ConnectionValidation, int)fails only if theConnectionis closed. -
LOCAL
NONEplus check local resources. Oracle Database same as isUsable. -
INBAND_DOWN
The JDBC driver validates the connection by reading the inband down event in non-blocking mode. If the event is received, it means the server has marked the connection for close i.e. connection is not valid. -
SOCKET
LOCALplus the server isn't obviously unreachable (dead socket). Oracle Database JDBC does a lightweight socket check. (ZLD) -
NETWORK
SOCKETplus the network is intact (network PING). Oracle Database JDBC does a minimum round trip. (OPING) -
SERVER
NETWORKplus significant server processes are running. Oracle Database JDBC doesSELECT 'x' FROM DUAL. -
COMPLETE
everything that can be checked is working. At leastSERVER. Oracle Database JDBC same as SERVER.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-