org.apache.ignite.transactions.spring

## Class AbstractSpringTransactionManager

- java.lang.Object
- - org.springframework.transaction.support.AbstractPlatformTransactionManager
  - - org.apache.ignite.transactions.spring.AbstractSpringTransactionManager

- All Implemented Interfaces:
    Serializable, EventListener, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>, org.springframework.transaction.PlatformTransactionManager, org.springframework.transaction.support.ResourceTransactionManager
  Direct Known Subclasses:
    IgniteClientSpringTransactionManager, SpringTransactionManager

      public abstract class AbstractSpringTransactionManager
      extends org.springframework.transaction.support.AbstractPlatformTransactionManager
      implements org.springframework.transaction.support.ResourceTransactionManager, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>

  Abstract implementation of Spring Transaction manager with omitted Ignite cluster access logic.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `AbstractSpringTransactionManager.IgniteTransactionObject` An object representing a managed Ignite transaction.

    - ### Nested classes/interfaces inherited from class org.springframework.transaction.support.AbstractPlatformTransactionManager

      `org.springframework.transaction.support.AbstractPlatformTransactionManager.SuspendedResourcesHolder`

  - ### Field Summary

    - ### Fields inherited from class org.springframework.transaction.support.AbstractPlatformTransactionManager

      `logger, SYNCHRONIZATION_ALWAYS, SYNCHRONIZATION_NEVER, SYNCHRONIZATION_ON_ACTUAL_TRANSACTION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractSpringTransactionManager()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract org.apache.ignite.internal.transactions.proxy.TransactionProxyFactory` | `createTransactionFactory()` Creates instance of `TransactionProxyFactory` that will be used to start new Ignite transactions.
    `protected abstract TransactionConcurrency` | `defaultTransactionConcurrency()`
    `protected abstract TransactionIsolation` | `defaultTransactionIsolation()`
    `protected abstract long` | `defaultTransactionTimeout()`
    `protected void` | `doBegin(Object transaction, org.springframework.transaction.TransactionDefinition definition)`
    `protected void` | `doCleanupAfterCompletion(Object transaction)`
    `protected void` | `doCommit(org.springframework.transaction.support.DefaultTransactionStatus status)`
    `protected Object` | `doGetTransaction()`
    `protected void` | `doRollback(org.springframework.transaction.support.DefaultTransactionStatus status)`
    `protected void` | `doSetRollbackOnly(org.springframework.transaction.support.DefaultTransactionStatus status)`
    `Object` | `getResourceFactory()`
    `TransactionConcurrency` | `getTransactionConcurrency()` Gets transaction concurrency level.
    `protected boolean` | `isExistingTransaction(Object transaction)`
    `protected abstract IgniteLogger` | `log()`
    `void` | `onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent evt)`
    `void` | `setTransactionConcurrency(TransactionConcurrency txConcurrency)` Sets transaction concurrency level.

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

      `commit, determineTimeout, doResume, doSuspend, getDefaultTimeout, getTransaction, getTransactionSynchronization, invokeAfterCompletion, isFailEarlyOnGlobalRollbackOnly, isGlobalRollbackOnParticipationFailure, isNestedTransactionAllowed, isRollbackOnCommitFailure, isValidateExistingTransaction, newTransactionStatus, prepareForCommit, prepareSynchronization, prepareTransactionStatus, registerAfterCompletionWithExistingTransaction, resume, rollback, setDefaultTimeout, setFailEarlyOnGlobalRollbackOnly, setGlobalRollbackOnParticipationFailure, setNestedTransactionAllowed, setRollbackOnCommitFailure, setTransactionSynchronization, setTransactionSynchronizationName, setValidateExistingTransaction, shouldCommitOnGlobalRollbackOnly, suspend, triggerBeforeCommit, triggerBeforeCompletion, useSavepointForNestedTransaction`

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

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

    - ### Methods inherited from interface org.springframework.transaction.PlatformTransactionManager

      `commit, getTransaction, rollback`

- - ### Constructor Detail

    - #### AbstractSpringTransactionManager

          public AbstractSpringTransactionManager()

  - ### Method Detail

    - #### getTransactionConcurrency

          public TransactionConcurrency getTransactionConcurrency()

      Gets transaction concurrency level.
      Returns:
        Transaction concurrency level.

    - #### setTransactionConcurrency

          public void setTransactionConcurrency(TransactionConcurrency txConcurrency)

      Sets transaction concurrency level.
      Parameters:
        `txConcurrency` - transaction concurrency level.

    - #### onApplicationEvent

          public void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent evt)

      Specified by:
        `onApplicationEvent` in interface `org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>`

    - #### doGetTransaction

          protected Object doGetTransaction()
                                     throws org.springframework.transaction.TransactionException

      Specified by:
        `doGetTransaction` in class `org.springframework.transaction.support.AbstractPlatformTransactionManager`
      Throws:
        `org.springframework.transaction.TransactionException`

    - #### doBegin

          protected void doBegin(Object transaction,
                                 org.springframework.transaction.TransactionDefinition definition)
                          throws org.springframework.transaction.TransactionException

      Specified by:
        `doBegin` in class `org.springframework.transaction.support.AbstractPlatformTransactionManager`
      Throws:
        `org.springframework.transaction.TransactionException`

    - #### doCommit

          protected void doCommit(org.springframework.transaction.support.DefaultTransactionStatus status)
                           throws org.springframework.transaction.TransactionException

      Specified by:
        `doCommit` in class `org.springframework.transaction.support.AbstractPlatformTransactionManager`
      Throws:
        `org.springframework.transaction.TransactionException`

    - #### doRollback

          protected void doRollback(org.springframework.transaction.support.DefaultTransactionStatus status)
                             throws org.springframework.transaction.TransactionException

      Specified by:
        `doRollback` in class `org.springframework.transaction.support.AbstractPlatformTransactionManager`
      Throws:
        `org.springframework.transaction.TransactionException`

    - #### doSetRollbackOnly

          protected void doSetRollbackOnly(org.springframework.transaction.support.DefaultTransactionStatus status)
                                    throws org.springframework.transaction.TransactionException

      Overrides:
        `doSetRollbackOnly` in class `org.springframework.transaction.support.AbstractPlatformTransactionManager`
      Throws:
        `org.springframework.transaction.TransactionException`

    - #### doCleanupAfterCompletion

          protected void doCleanupAfterCompletion(Object transaction)

      Overrides:
        `doCleanupAfterCompletion` in class `org.springframework.transaction.support.AbstractPlatformTransactionManager`

    - #### isExistingTransaction

          protected boolean isExistingTransaction(Object transaction)
                                           throws org.springframework.transaction.TransactionException

      Overrides:
        `isExistingTransaction` in class `org.springframework.transaction.support.AbstractPlatformTransactionManager`
      Throws:
        `org.springframework.transaction.TransactionException`

    - #### getResourceFactory

          public Object getResourceFactory()

      Specified by:
        `getResourceFactory` in interface `org.springframework.transaction.support.ResourceTransactionManager`

    - #### defaultTransactionIsolation

          protected abstract TransactionIsolation defaultTransactionIsolation()

      Returns:
        Default transaction isolation.

    - #### defaultTransactionTimeout

          protected abstract long defaultTransactionTimeout()

      Returns:
        Default transaction timeout.

    - #### defaultTransactionConcurrency

          protected abstract TransactionConcurrency defaultTransactionConcurrency()

      Returns:
        Default transaction concurrency.

    - #### createTransactionFactory

          protected abstract org.apache.ignite.internal.transactions.proxy.TransactionProxyFactory createTransactionFactory()

      Creates instance of `TransactionProxyFactory` that will be used to start new Ignite transactions.

    - #### log

          protected abstract IgniteLogger log()

      Returns:
        Ignite logger.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021