Interface GroupSelector

All Superinterfaces:
TransactionConstants, TransactionParticipant
All Known Implementing Classes:
BSHGroupSelector, HasEntry, Switch

public interface GroupSelector extends TransactionParticipant
GroupSelector can be implemented by a TransactionParticipant in order to switch the transaction to a new group of participants.
Since:
1.4.7
See Also:
  • Field Summary

    Fields inherited from interface TransactionConstants

    ABORTED, FAIL, NO_JOIN, PAUSE, PREPARED, READONLY, RETRY
    Modifier and Type
    Field
    Description
    static final int
    Transaction has been aborted.
    static final int
    Shortcut for a read-only, non-joining abort (READONLY | NO_JOIN).
    static final int
    This participant does not join the transaction
    static final int
    Transaction is paused.
    static final int
    Transaction has been prepared successfully.
    static final int
    Context has not been modified (no need to persist a snapshot)
    static final int
    Transaction should be retried.
  • Method Summary

    Modifier and Type
    Method
    Description
    select(long id, Serializable context)
    Selects the transaction group to execute.

    Methods inherited from interface TransactionParticipant

    abort, commit, prepare
    Modifier and Type
    Method
    Description
    default void
    abort(long id, Serializable context)
    Called by TransactionManager upon transaction commit.
    default void
    commit(long id, Serializable context)
    Called by TransactionManager upon transaction commit.
    int
    prepare(long id, Serializable context)
    Called by TransactionManager in preparation for a transaction
  • Method Details

    • select

      String select(long id, Serializable context)
      Selects the transaction group to execute.
      Parameters:
      id - transaction id
      context - transaction context
      Returns:
      group name or null for no-action