|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Transaction
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.
Method Summary | |
---|---|
void |
commit()
Commits the transaction. |
java.util.concurrent.Future<java.lang.Void> |
commitAsync()
An asynchronous implementation of commit() . |
java.lang.String |
getApp()
|
java.lang.String |
getId()
|
boolean |
isActive()
|
void |
rollback()
Rolls back the transaction. |
java.util.concurrent.Future<java.lang.Void> |
rollbackAsync()
An asynchronous implementation of rollback() . |
Method Detail |
---|
void commit()
IllegalStateException
.
java.lang.IllegalStateException
- If the transaction has already been
committed, rolled back, a commit or a rollback is in progress (via an
async call), or an attempt to commit or roll back has already failed. If
there are any outstanding async datastore calls when this method is
invoked, this method will block on the completion of those calls before
proceeding.
DatastoreFailureException
- If a datastore error occurs.
ConcurrentModificationException
- If some other transaction modified
the same entity groups concurrently.java.util.concurrent.Future<java.lang.Void> commitAsync()
commit()
.
commit()
void rollback()
IllegalStateException
.
java.lang.IllegalStateException
- If the transaction has already been
committed, rolled back, a commit or a rollback is in progress (via an
async call), or an attempt to commit or roll back has already failed. If
there are any outstanding async datastore calls when this method is
invoked, this method will block on the completion of those calls before
proceeding.
DatastoreFailureException
- If a datastore error occurs.java.util.concurrent.Future<java.lang.Void> rollbackAsync()
rollback()
.
rollback()
java.lang.String getId()
Transaction
.java.lang.String getApp()
Transaction
.boolean isActive()
true
if the transaction is active, false
otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |