Enum Class PGXAConnection.State
- All Implemented Interfaces:
Serializable, Comparable<PGXAConnection.State>, Constable
- Enclosing class:
PGXAConnection
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPGXAConnection.start(Xid, int)has been called, and we're associated with an XA transaction.PGXAConnection.end(Xid, int)has been called, but the transaction has not yet been prepared.PGXAConnectionnot associated with a XA-transaction. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PGXAConnection.StateReturns the enum constant of this class with the specified name.static PGXAConnection.State[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IDLE
PGXAConnectionnot associated with a XA-transaction. You can still callPGXAConnection.getConnection()and use the connection outside XA.currentXidisnull. autoCommit istrueon a connection by getConnection, per normal JDBC rules, though the caller can change it tofalseand manage transactions itself using Connection.commit and rollback. -
ACTIVE
PGXAConnection.start(Xid, int)has been called, and we're associated with an XA transaction.currentXidis valid. autoCommit is false on a connection returned by getConnection, and should not be messed with by the caller or the XA transaction will be broken. -
ENDED
PGXAConnection.end(Xid, int)has been called, but the transaction has not yet been prepared.currentXidis still valid. You shouldn't use the connection for anything else than issuing aXAResource.commit(Xid, boolean)or rollback.
-
-
Constructor Details
-
State
private State()
-
-
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
-