Stay organized with collections
Save and categorize content based on your preferences.
publicinterfaceTransaction
Describes a logical unit of work to be performed against the datastore. Operations performed as
part of a single Transaction succeed or fail as a unit. Transactions can be committed and
rolled back synchronously and asynchronously.
Methods
commit()
publicabstractvoidcommit()
Commits the transaction. Whether this call succeeds or fails, all subsequent method invocations
on this object will throw IllegalStateException.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eTransactions define a unit of work against a datastore, where all operations either succeed or fail together.\u003c/p\u003e\n"],["\u003cp\u003eTransactions can be committed using \u003ccode\u003ecommit()\u003c/code\u003e or \u003ccode\u003ecommitAsync()\u003c/code\u003e, which provides asynchronous execution.\u003c/p\u003e\n"],["\u003cp\u003eTransactions can be rolled back using \u003ccode\u003erollback()\u003c/code\u003e or \u003ccode\u003erollbackAsync()\u003c/code\u003e, with the latter also providing asynchronous capabilities.\u003c/p\u003e\n"],["\u003cp\u003eEach transaction has a unique ID accessible via \u003ccode\u003egetId()\u003c/code\u003e and is associated with a specific application ID obtainable through \u003ccode\u003egetApp()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eisActive()\u003c/code\u003e method indicates whether a transaction is currently active.\u003c/p\u003e\n"]]],[],null,[]]