public interface Transactions
Transaction
s.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Modifier and Type | Method and Description |
---|---|
Transaction |
create()
Creates a new transaction in the main data store.
|
Transaction |
create(java.lang.String storeName)
Creates a new transaction.
If there is an active transaction, it will be suspended. |
Transaction |
create(java.lang.String storeName,
TransactionParams params)
Creates a new transaction.
If there is an active transaction, it will be suspended. |
Transaction |
create(TransactionParams params)
Creates a new transaction in the main data store.
|
Transaction |
get()
Creates a new transaction in the main data store if there is no one at the moment.
|
Transaction |
get(java.lang.String storeName)
Creates a new transaction if there is no one at the moment.
|
static final java.lang.String NAME
Transaction create(TransactionParams params)
create(String, TransactionParams)
Transaction create(java.lang.String storeName, TransactionParams params)
storeName
- data store nameparams
- new transaction parametersTransaction create()
create(String)
Transaction create(java.lang.String storeName)
storeName
- data store nameTransaction get()
get(String)
Transaction get(java.lang.String storeName)
If a transaction exists, joins the current transaction. In this case:
Transaction.commit()
does not affect current transaction.Transaction.end()
is called without previous Transaction.commit()
, current
transaction is marked as rollback-only, so any attempt to commit the surrounding Transaction
will
throw an exception.storeName
- data store name