public static enum Connection.Lifecycle extends java.lang.Enum<Connection.Lifecycle>
Connection
.Enum Constant | Description |
---|---|
ABORTING |
Work is neither queued nor performed.
|
CLOSED |
Work is neither queued nor performed.
|
CLOSING |
Work in progress is completed but no additional work is started or
queued.
|
INACTIVE |
Not available for new work.
|
NEW |
unconnected.
|
NEW_INACTIVE |
Unconnected and inactive.
|
OPEN |
fully operational.
|
Modifier and Type | Method | Description |
---|---|---|
static Connection.Lifecycle |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static Connection.Lifecycle[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Connection.Lifecycle NEW
Operation
is completed successfully
-> OPEN
. If Connection.deactivate()
is called ->
NEW_INACTIVE
. If Connection.abort()
is called -> ABORTING
.
No Operation
s other than connect and close will be performed. A
Connection in this state is both 'open' and 'active'.public static final Connection.Lifecycle NEW_INACTIVE
Operation
is performed. No work can be submitted. If the Connection.activate()
method is
called -> NEW
. If a connect Operation
completes ->
INACTIVE
. If a close Operation
is executed ->
CLOSING
. If Connection.abort()
is called -> ABORTING
. A
Connection in this state is 'open'.public static final Connection.Lifecycle OPEN
Connection.deactivate()
is
called -> INACTIVE
. If a close Operation
is executed
-> CLOSING
. If Connection.abort()
is called -> ABORTING
.
A Connection in this state is both 'open' and 'active'.public static final Connection.Lifecycle INACTIVE
Connection.activate()
method is called -> OPEN
.
If a close Operation
is executed -> CLOSING
. If
Connection.abort()
is called -> ABORTING
. A Connection
in
this state is 'open'.public static final Connection.Lifecycle CLOSING
IllegalStateException
.
When the currently executing Operation
s are completed ->
CLOSED
. All other queued Operations are completed exceptionally
with SqlSkippedException. A Connection in this state is 'closed'.public static final Connection.Lifecycle ABORTING
Operation
s, if any, are terminated, exceptionally if necessary.
Any queued Operation
s are terminated exceptionally with
SqlSkippedException
. Attempting to queue work throws
IllegalStateException
. When the queue is empty -<
CLOSED
. A Connection in this state is 'closed'.public static final Connection.Lifecycle CLOSED
IllegalStateException
. A Connection in this state is 'closed'.public static Connection.Lifecycle[] values()
for (Connection.Lifecycle c : Connection.Lifecycle.values()) System.out.println(c);
public static Connection.Lifecycle 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 nullReport a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2017, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.
DRAFT JDBC 4.4 EA