- java.lang.Object
-
- java.lang.Enum<Session.Lifecycle>
-
- jdk.incubator.sql2.Session.Lifecycle
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Session.Lifecycle>
- Enclosing interface:
- Session
public static enum Session.Lifecycle extends java.lang.Enum<Session.Lifecycle>
Identifies the operational state of aSession
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABORTING
Work is neither queued nor performed.ATTACHED
fully operational.CLOSED
Work is neither queued nor performed.CLOSING
Work in progress is completed but no additional work can be submitted.NEW
A newly created Session is in this state.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Session.Lifecycle
abort()
Session.Lifecycle
attach()
Session.Lifecycle
close()
Session.Lifecycle
closed()
boolean
isClosed()
boolean
isWorking()
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.
-
-
-
Enum Constant Detail
-
NEW
public static final Session.Lifecycle NEW
A newly created Session is in this state. When a attachOperation
is completed successfully ->ATTACHED
. IfSession.abort()
is called ->ABORTING
. NoOperation
s other than attach and close will be performed. ASession
in this state is 'open'.
-
ATTACHED
public static final Session.Lifecycle ATTACHED
fully operational. Work is queued and performed. If a closeOperation
is submitted ->CLOSING
. IfSession.abort()
is called ->ABORTING
. ASession
in this state is 'open' and 'working'.
-
CLOSING
public static final Session.Lifecycle CLOSING
-
ABORTING
public static final Session.Lifecycle ABORTING
-
CLOSED
public static final Session.Lifecycle CLOSED
Work is neither queued nor performed. Attempting to queue work throwsIllegalStateException
. A Session in this state is 'closed'.
-
-
Method Detail
-
values
public static Session.Lifecycle[] 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 (Session.Lifecycle c : Session.Lifecycle.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Session.Lifecycle valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isClosed
public boolean isClosed()
-
isWorking
public boolean isWorking()
-
attach
public Session.Lifecycle attach()
-
close
public Session.Lifecycle close()
-
abort
public Session.Lifecycle abort()
-
closed
public Session.Lifecycle closed()
-
-