Class DatastoreTransactionManager

java.lang.Object
org.springframework.transaction.support.AbstractPlatformTransactionManager
com.google.cloud.spring.data.datastore.core.DatastoreTransactionManager
All Implemented Interfaces:
Serializable, org.springframework.transaction.ConfigurableTransactionManager, org.springframework.transaction.PlatformTransactionManager, org.springframework.transaction.TransactionManager

public class DatastoreTransactionManager extends org.springframework.transaction.support.AbstractPlatformTransactionManager
Cloud Datastore transaction manager.
Since:
1.1
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A class to contain the transaction context.

    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
    Description
    DatastoreTransactionManager(Supplier<com.google.cloud.datastore.Datastore> datastore)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doBegin(Object transactionObject, org.springframework.transaction.TransactionDefinition transactionDefinition)
     
    protected void
     
    protected void
    doCommit(org.springframework.transaction.support.DefaultTransactionStatus defaultTransactionStatus)
     
    protected Object
     
    protected void
    doRollback(org.springframework.transaction.support.DefaultTransactionStatus defaultTransactionStatus)
     
    protected boolean
     

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

    commit, determineTimeout, doResume, doSetRollbackOnly, doSuspend, getDefaultTimeout, getTransaction, getTransactionExecutionListeners, getTransactionSynchronization, invokeAfterCompletion, isFailEarlyOnGlobalRollbackOnly, isGlobalRollbackOnParticipationFailure, isNestedTransactionAllowed, isRollbackOnCommitFailure, isValidateExistingTransaction, prepareForCommit, prepareSynchronization, registerAfterCompletionWithExistingTransaction, resume, rollback, setDefaultTimeout, setFailEarlyOnGlobalRollbackOnly, setGlobalRollbackOnParticipationFailure, setNestedTransactionAllowed, setRollbackOnCommitFailure, setTransactionExecutionListeners, 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.ConfigurableTransactionManager

    addListener
  • Constructor Details

    • DatastoreTransactionManager

      public DatastoreTransactionManager(Supplier<com.google.cloud.datastore.Datastore> datastore)
  • Method Details

    • 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 transactionObject, org.springframework.transaction.TransactionDefinition transactionDefinition) 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 defaultTransactionStatus) 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 defaultTransactionStatus) throws org.springframework.transaction.TransactionException
      Specified by:
      doRollback in class org.springframework.transaction.support.AbstractPlatformTransactionManager
      Throws:
      org.springframework.transaction.TransactionException
    • isExistingTransaction

      protected boolean isExistingTransaction(Object transaction)
      Overrides:
      isExistingTransaction in class org.springframework.transaction.support.AbstractPlatformTransactionManager
    • doCleanupAfterCompletion

      protected void doCleanupAfterCompletion(Object transaction)
      Overrides:
      doCleanupAfterCompletion in class org.springframework.transaction.support.AbstractPlatformTransactionManager