Interface ClientTransactionManager
-
- All Superinterfaces:
java.lang.AutoCloseable
,TransactionManager
- All Known Implementing Classes:
TransactionResourceManager
public interface ClientTransactionManager extends java.lang.AutoCloseable, TransactionManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cz.o2.proxima.direct.core.transaction.TransactionManager
TransactionManager.TransactionConfig
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<Response>
begin(java.lang.String transactionId, java.util.List<KeyAttribute> attributes)
Initialize (possibly) new transaction.void
close()
java.util.concurrent.CompletableFuture<Response>
commit(java.lang.String transactionId, java.util.Collection<StreamElement> outputs)
Commit the transaction with given output KeyAttributes being written.void
release(java.lang.String transactionId)
Release resources associated with given transaction.java.util.concurrent.CompletableFuture<Response>
rollback(java.lang.String transactionId)
Rollback transaction with given ID.java.util.concurrent.CompletableFuture<Response>
updateTransaction(java.lang.String transactionId, java.util.List<KeyAttribute> newAttributes)
Update the transaction with additional attributes related to the transaction.-
Methods inherited from interface cz.o2.proxima.direct.core.transaction.TransactionManager
getCfg, getCommitDesc, getRequestDesc, getResponseDesc, getStateDesc, getTransaction
-
-
-
-
Method Detail
-
begin
java.util.concurrent.CompletableFuture<Response> begin(java.lang.String transactionId, java.util.List<KeyAttribute> attributes)
Initialize (possibly) new transaction. If the transaction already existed prior to this call, its current state is returned, otherwise the transaction is opened.- Parameters:
transactionId
- ID of the transactionattributes
- attributes affected by this transaction (both input and output)- Returns:
- asynchronous response
-
updateTransaction
java.util.concurrent.CompletableFuture<Response> updateTransaction(java.lang.String transactionId, java.util.List<KeyAttribute> newAttributes)
Update the transaction with additional attributes related to the transaction.- Parameters:
transactionId
- ID of the transactionnewAttributes
- attributes to be added to the transaction- Returns:
- asynchronous response
-
commit
java.util.concurrent.CompletableFuture<Response> commit(java.lang.String transactionId, java.util.Collection<StreamElement> outputs)
Commit the transaction with given output KeyAttributes being written.- Parameters:
transactionId
- ID of the transactionoutputs
- elements to be written to the output- Returns:
- asynchronous response
-
rollback
java.util.concurrent.CompletableFuture<Response> rollback(java.lang.String transactionId)
Rollback transaction with given ID.- Parameters:
transactionId
- ID of the transaction to rollback.- Returns:
- asynchronous response
-
close
void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
release
void release(java.lang.String transactionId)
Release resources associated with given transaction.- Parameters:
transactionId
- ID of the transaction
-
-