Interface Transaction (2.0.0)

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.

Methods

commit()

public abstract void commit()

Commits the transaction. Whether this call succeeds or fails, all subsequent method invocations on this object will throw IllegalStateException.

commitAsync()

public abstract Future<Void> commitAsync()

An asynchronous implementation of #commit(). See Also: #commit()

Returns
Type Description
Future<Void>

A Future associated with the call.

getApp()

public abstract String getApp()
Returns
Type Description
String

The application id for the Transaction.

getId()

public abstract String getId()
Returns
Type Description
String

The globally unique identifier for the Transaction.

isActive()

public abstract boolean isActive()
Returns
Type Description
boolean

true if the transaction is active, false otherwise.

rollback()

public abstract void rollback()

Rolls back the transaction. Whether this call succeeds or fails, all subsequent method invocations on this object will throw IllegalStateException.

rollbackAsync()

public abstract Future<Void> rollbackAsync()

An asynchronous implementation of #rollback(). See Also: #rollback()

Returns
Type Description
Future<Void>

A Future associated with the call.