java.io.Serializable
, java.lang.Comparable<Session.Lifecycle>
public static enum Session.Lifecycle extends java.lang.Enum<Session.Lifecycle>
Session
.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 |
unattached.
|
NEW_INACTIVE |
Unattached and inactive.
|
OPEN |
fully operational.
|
Modifier and Type | Method | Description |
---|---|---|
Session.Lifecycle |
abort() |
|
Session.Lifecycle |
activate() |
|
Session.Lifecycle |
attach() |
|
Session.Lifecycle |
close() |
|
Session.Lifecycle |
closed() |
|
Session.Lifecycle |
deactivate() |
|
boolean |
isActive() |
|
boolean |
isOpen() |
|
static Session.Lifecycle |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static Session.Lifecycle[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Session.Lifecycle NEW
Operation
is completed successfully
-> OPEN
. If deactivate()
is called ->
NEW_INACTIVE
. If abort()
is called -> ABORTING
.
No Operation
s other than attach and close will be performed. A
Session in this state is both 'open' and 'active'.public static final Session.Lifecycle NEW_INACTIVE
Operation
is performed. No work can be submitted. If the activate()
method is
called -> NEW
. If a attach Operation
completes ->
INACTIVE
. If a close Operation
is executed ->
CLOSING
. If abort()
is called -> ABORTING
. A
Session in this state is 'open'.public static final Session.Lifecycle OPEN
public static final Session.Lifecycle INACTIVE
public static final Session.Lifecycle CLOSING
IllegalStateException
.
When the currently executing Operation
s are completed ->
CLOSED
. All other queued Operations are completed exceptionally
with SqlSkippedException. A Session in this state is 'closed'.public static final Session.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 Session in this state is 'closed'.public static final Session.Lifecycle CLOSED
IllegalStateException
. A Session in this state is 'closed'.public static Session.Lifecycle[] values()
for (Session.Lifecycle c : Session.Lifecycle.values()) System.out.println(c);
public static Session.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 nullpublic boolean isOpen()
public boolean isActive()
public Session.Lifecycle activate()
public Session.Lifecycle deactivate()
public Session.Lifecycle attach()
public Session.Lifecycle abort()
public Session.Lifecycle close()
public Session.Lifecycle closed()
Report 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 EA5