public static enum OracleConnection.ConnectionValidation extends java.lang.Enum<OracleConnection.ConnectionValidation>
Connection
.
The amount of effort put into validating the Connection
ranges from NONE
(least effort) to COMPLETE
(most 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.
Enum Constant and Description |
---|
COMPLETE
everything that can be checked is working.
|
INBAND_DOWN
The JDBC driver validates the connection by reading the inband down event in
non-blocking mode.
|
LOCAL
NONE plus check local resources. |
NETWORK
SOCKET plus the network is intact (network PING). |
NONE
OracleConnection.isValid(oracle.jdbc.OracleConnection.ConnectionValidation, int) fails only if the Connection is closed. |
SERVER
NETWORK plus significant server processes are running. |
SOCKET
LOCAL plus the server isn't obviously unreachable (dead socket). |
Modifier and Type | Method and Description |
---|---|
static OracleConnection.ConnectionValidation |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static OracleConnection.ConnectionValidation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OracleConnection.ConnectionValidation NONE
OracleConnection.isValid(oracle.jdbc.OracleConnection.ConnectionValidation, int)
fails only if the Connection
is closed.public static final OracleConnection.ConnectionValidation LOCAL
NONE
plus check local resources. Oracle Database same as
isUsable.public static final OracleConnection.ConnectionValidation INBAND_DOWN
public static final OracleConnection.ConnectionValidation SOCKET
LOCAL
plus the server isn't obviously unreachable (dead socket).
Oracle Database JDBC does a lightweight socket check. (ZLD)public static final OracleConnection.ConnectionValidation NETWORK
SOCKET
plus the network is intact (network PING). Oracle Database
JDBC does a minimum round trip. (OPING)public static final OracleConnection.ConnectionValidation SERVER
NETWORK
plus significant server processes are running.
Oracle Database JDBC does SELECT 'x' FROM DUAL
.public static final OracleConnection.ConnectionValidation COMPLETE
SERVER
.
Oracle Database JDBC same as SERVER.public static OracleConnection.ConnectionValidation[] values()
for (OracleConnection.ConnectionValidation c : OracleConnection.ConnectionValidation.values()) System.out.println(c);
public static OracleConnection.ConnectionValidation valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null