## org.h2.store
Class InDoubtTransaction

    java.lang.Object
      org.h2.store.InDoubtTransaction

    public class InDoubtTransaction

extends java.lang.Object

Represents an in-doubt transaction (a transaction in the prepare phase).

Field Summary
`static int` `COMMIT` The transaction state meaning this transaction is committed.
`static int` `IN_DOUBT` The transaction state meaning this transaction is not committed yet, but also not rolled back (in-doubt).
`static int` `ROLLBACK` The transaction state meaning this transaction is rolled back.

Constructor Summary
`InDoubtTransaction(PageStore store, int sessionId, int pos, java.lang.String transaction)` Create a new in-doubt transaction info object.

Method Summary
`java.lang.String` `getState()` Get the state of this transaction as a text.
`java.lang.String` `getTransaction()` Get the name of the transaction.
`void` `setState(int state)` Change the state of this transaction.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### IN_DOUBT

    public static final int IN_DOUBT

  The transaction state meaning this transaction is not committed yet, but also not rolled back (in-doubt).

  See Also:
    Constant Field Values

### COMMIT

    public static final int COMMIT

  The transaction state meaning this transaction is committed.

  See Also:
    Constant Field Values

### ROLLBACK

    public static final int ROLLBACK

  The transaction state meaning this transaction is rolled back.

  See Also:
    Constant Field Values

Constructor Detail

### InDoubtTransaction

    public InDoubtTransaction(PageStore store,
                              int sessionId,
                              int pos,
                              java.lang.String transaction)

  Create a new in-doubt transaction info object.

  Parameters:
    `store` - the page store
    `sessionId` - the session id
    `pos` - the position
    `transaction` - the transaction name

Method Detail

### setState

    public void setState(int state)

  Change the state of this transaction. This will also update the transaction log.

  Parameters:
    `state` - the new state

### getState

    public java.lang.String getState()

  Get the state of this transaction as a text.

  Returns:
    the transaction state text

### getTransaction

    public java.lang.String getTransaction()

  Get the name of the transaction.

  Returns:
    the transaction name