org.springframework.transaction.compensating.support

## Class CompensatingTransactionHolderSupport

- java.lang.Object
- - org.springframework.transaction.support.ResourceHolderSupport
  - - org.springframework.transaction.compensating.support.CompensatingTransactionHolderSupport

- All Implemented Interfaces:
    ResourceHolder
  Direct Known Subclasses:
    DirContextHolder

      public abstract class CompensatingTransactionHolderSupport
      extends ResourceHolderSupport

  Base class for compensating transaction resource holders.
  Since:
    1.2
  Author:
    Mattias Hellborg Arthursson

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompensatingTransactionHolderSupport(CompensatingTransactionOperationManager manager)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `protected abstract Object` | `getTransactedResource()` Get the actual transacted resource.
    `CompensatingTransactionOperationManager` | `getTransactionOperationManager()` Get the CompensatingTransactionOperationManager to handle the data for the current transaction.
    `void` | `setTransactionOperationManager(CompensatingTransactionOperationManager transactionOperationManager)` Set the CompensatingTransactionOperationManager.

    - ### Methods inherited from class org.springframework.transaction.support.ResourceHolderSupport

      `getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, isVoid, released, requested, reset, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds, unbound`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CompensatingTransactionHolderSupport

          public CompensatingTransactionHolderSupport(CompensatingTransactionOperationManager manager)

      Constructor.
      Parameters:
        `manager` - The `CompensatingTransactionOperationManager` to use for creating Compensating operations.

  - ### Method Detail

    - #### getTransactedResource

          protected abstract Object getTransactedResource()

      Get the actual transacted resource.
      Returns:
        the transaction's target resource

    - #### clear

          public void clear()

      Overrides:
        `clear` in class `ResourceHolderSupport`

    - #### getTransactionOperationManager

          public CompensatingTransactionOperationManager getTransactionOperationManager()

      Get the CompensatingTransactionOperationManager to handle the data for the current transaction.
      Returns:
        the CompensatingTransactionOperationManager.

    - #### setTransactionOperationManager

          public void setTransactionOperationManager(CompensatingTransactionOperationManager transactionOperationManager)

      Set the CompensatingTransactionOperationManager. For testing purposes only.
      Parameters:
        `transactionOperationManager` - the CompensatingTransactionOperationManager to use.