Enum Class PGXAConnection.State

java.lang.Object
java.lang.Enum<PGXAConnection.State>
org.postgresql.xa.PGXAConnection.State
All Implemented Interfaces:
Serializable, Comparable<PGXAConnection.State>, Constable
Enclosing class:
PGXAConnection

private static enum PGXAConnection.State extends Enum<PGXAConnection.State>
  • Enum Constant Details

    • IDLE

      public static final PGXAConnection.State IDLE
      PGXAConnection not associated with a XA-transaction. You can still call PGXAConnection.getConnection() and use the connection outside XA. currentXid is null. autoCommit is true on a connection by getConnection, per normal JDBC rules, though the caller can change it to false and manage transactions itself using Connection.commit and rollback.
    • ACTIVE

      public static final PGXAConnection.State ACTIVE
      PGXAConnection.start(Xid, int) has been called, and we're associated with an XA transaction. currentXid is 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

      public static final PGXAConnection.State ENDED
      PGXAConnection.end(Xid, int) has been called, but the transaction has not yet been prepared. currentXid is still valid. You shouldn't use the connection for anything else than issuing a XAResource.commit(Xid, boolean) or rollback.
  • Constructor Details

    • State

      private State()
  • Method Details

    • values

      public static PGXAConnection.State[] 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

      public static PGXAConnection.State valueOf(String name)
      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 name
      NullPointerException - if the argument is null