Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atomikos.icatch.admin
Interface AdminTransaction

All Superinterfaces:
  Serializable

    public interface AdminTransaction

extends Serializable

An administration interface for a transaction. Allows inspection of heuristic info, as well as forced two-phase commit methods.

Field Summary
`static int` | `STATE_ABORTING`
`static int` | `STATE_ACTIVE`
`static int` | `STATE_COMMITTING`
`static int` | `STATE_HEUR_ABORTED`
`static int` | `STATE_HEUR_COMMITTED`
`static int` | `STATE_HEUR_HAZARD`
`static int` | `STATE_HEUR_MIXED`
`static int` | `STATE_PREPARED`
`static int` | `STATE_PREPARING`
`static int` | `STATE_TERMINATED`
`static int` | `STATE_UNKNOWN`

Method Summary
`void` | `forceCommit()` Forces commit of the transaction.
`void` | `forceForget()` Forces the system to forget about the transaction.
`void` | `forceRollback()` Forces rollback of the transaction.
`HeuristicMessage[]` | `getHeuristicMessages()` Gets the HeuristicMessage detailed info for this transaction.
`HeuristicMessage[]` | `getHeuristicMessages(int state)` Gets the heuristic messages for work in the given state.
`int` | `getState()` Gets the transaction's state.
`HeuristicMessage[]` | `getTags()` Gets the high-level heuristic comments.
`String` | `getTid()` Gets the transaction identifier.
`boolean` | `wasCommitted()` Tests if the transaction's 2PC outcome was commit.

Field Detail

### STATE_ACTIVE

    static final int STATE_ACTIVE

See Also:
  Constant Field Values

### STATE_PREPARING

    static final int STATE_PREPARING

See Also:
  Constant Field Values

### STATE_UNKNOWN

    static final int STATE_UNKNOWN

See Also:
  Constant Field Values

### STATE_PREPARED

    static final int STATE_PREPARED

See Also:
  Constant Field Values

### STATE_HEUR_COMMITTED

    static final int STATE_HEUR_COMMITTED

See Also:
  Constant Field Values

### STATE_HEUR_ABORTED

    static final int STATE_HEUR_ABORTED

See Also:
  Constant Field Values

### STATE_HEUR_HAZARD

    static final int STATE_HEUR_HAZARD

See Also:
  Constant Field Values

### STATE_HEUR_MIXED

    static final int STATE_HEUR_MIXED

See Also:
  Constant Field Values

### STATE_ABORTING

    static final int STATE_ABORTING

See Also:
  Constant Field Values

### STATE_COMMITTING

    static final int STATE_COMMITTING

See Also:
  Constant Field Values

### STATE_TERMINATED

    static final int STATE_TERMINATED

See Also:
  Constant Field Values

Method Detail

### getTid

    String getTid()

  Gets the transaction identifier.

  Returns:
    String The unique id.

### getState

    int getState()

  Gets the transaction's state.

  Returns:
    int The state, one of the predefined states. NOTE: the state is an int rather than the generic Object, because instances need to be Serializable.

### getTags

    HeuristicMessage[] getTags()

  Gets the high-level heuristic comments. This is what remote clients will see as well.

  Returns:
    HeuristicMessage The comments giving a summary of the tasks done in this transaction.

### getHeuristicMessages

    HeuristicMessage[] getHeuristicMessages()

  Gets the HeuristicMessage detailed info for this transaction.

  Returns:
    HeuristicMessage[] The detailed heuristic messages. These show the comments for EACH individual resource that was part of the transaction.

### getHeuristicMessages

    HeuristicMessage[] getHeuristicMessages(int state)

  Gets the heuristic messages for work in the given state. This method is useful in particular for STATE_HEUR_MIXED and STATE_HEUR_HAZARD.

  Returns:
    HeuristicMessage[] The description of all work in the given state, or null if no such work exists.

### wasCommitted

    boolean wasCommitted()

  Tests if the transaction's 2PC outcome was commit. Needed especially for the heuristic states, if the desired outcome (instead of the actual state) needs to be retrieved. For instance, if the state is STATE_HEUR_HAZARD then extra information is needed for determining if the desired outcome was commit or rollback. This method helps here.

  Returns:
    True if commit was decided (either heuristically or by the super coordinator).

### forceCommit

    void forceCommit()
                     throws HeurRollbackException,
                            HeurHazardException,
                            HeurMixedException,
                            SysException

  Forces commit of the transaction.

  Throws:
    `HeurRollbackException` - If rolled back in the meantime.
    `HeurMixedException` - If part of it was rolled back.
    `HeurHazardException` - On possible conflicts.
    `SysException`

### forceRollback

    void forceRollback()
                       throws HeurCommitException,
                              HeurMixedException,
                              HeurHazardException,
                              SysException

  Forces rollback of the transaction.

  Throws:
    `HeurCommitException` - If heuristically committed in the meantime.
    `HeurHazardException` - If the state is not certain.
    `HeurMixedException` - If partially rolled back.
    `SysException`

### forceForget

    void forceForget()

  Forces the system to forget about the transaction.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.