public interface AsyncTransaction extends AsyncPrimitive
DEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
abort()
Aborts any changes made in this transaction context and discarding all locally cached updates.
|
CompletableFuture<Void> |
begin()
Starts a new transaction.
|
CompletableFuture<CommitStatus> |
commit()
Commits a transaction that was previously started thereby making its changes permanent
and externally visible.
|
Isolation |
isolation()
Returns the transaction isolation level.
|
boolean |
isOpen()
Returns if this transaction context is open.
|
<K,V> TransactionalMapBuilder<K,V> |
mapBuilder(String name)
Returns a new transactional map builder.
|
default <K,V> TransactionalMapBuilder<K,V> |
mapBuilder(String name,
ProxyProtocol protocol)
Returns a new transactional map builder.
|
<E> TransactionalSetBuilder<E> |
setBuilder(String name)
Returns a new transactional set builder.
|
default <E> TransactionalSetBuilder<E> |
setBuilder(String name,
ProxyProtocol protocol)
Returns a new transactional set builder.
|
default Transaction |
sync()
Returns a synchronous wrapper around the asynchronous primitive.
|
Transaction |
sync(Duration operationTimeout)
Returns a synchronous wrapper around the asynchronous primitive.
|
TransactionId |
transactionId()
Returns the transaction identifier.
|
close, deleteaddStateChangeListener, name, protocol, removeStateChangeListener, typeTransactionId transactionId()
Isolation isolation()
boolean isOpen()
CompletableFuture<Void> begin()
CompletableFuture<CommitStatus> commit()
CompletableFuture<Void> abort()
<K,V> TransactionalMapBuilder<K,V> mapBuilder(String name)
K - the key typeV - the value typename - the map namedefault <K,V> TransactionalMapBuilder<K,V> mapBuilder(String name, ProxyProtocol protocol)
K - the key typeV - the value typename - the map nameprotocol - the map protocol<E> TransactionalSetBuilder<E> setBuilder(String name)
E - the set element typename - the set namedefault <E> TransactionalSetBuilder<E> setBuilder(String name, ProxyProtocol protocol)
E - the set element typename - the set nameprotocol - the map protocoldefault Transaction sync()
AsyncPrimitivesync in interface AsyncPrimitiveTransaction sync(Duration operationTimeout)
AsyncPrimitivesync in interface AsyncPrimitiveoperationTimeout - the synchronous operation timeoutCopyright © 2013–2018. All rights reserved.