public static interface TransactionController.ReadWriteExecutionBuilder extends TransactionController.ExecutionBuilder
DatasetReader
s and DatasetWriter
s participating in a transaction and
then execute a given read write transaction on these participants.Modifier and Type | Method and Description |
---|---|
TransactionController.ReadWriteTransaction |
begin()
Deprecated.
in favor of
execute(TransactionalBiAction) |
<T> T |
execute(TransactionalBiAction<java.util.Map<java.lang.String,com.terracottatech.store.DatasetWriterReader<?>>,java.util.Map<java.lang.String,com.terracottatech.store.DatasetReader<?>>,T> action)
Executes the given transaction using the added participants
|
TransactionController.ReadWriteExecutionBuilder |
timeout(long timeOut,
java.util.concurrent.TimeUnit timeUnit)
Set the timeout for the transaction to be executed
|
TransactionController.ReadWriteExecutionBuilder |
using(java.lang.String name,
com.terracottatech.store.DatasetReader<?> reader)
Adds a
DatasetReader as a participant in the transaction |
TransactionController.ReadWriteExecutionBuilder |
using(java.lang.String name,
com.terracottatech.store.DatasetWriterReader<?> writerReader)
Adds a
DatasetWriterReader as a participant in the transaction |
TransactionController.ReadWriteExecutionBuilder timeout(long timeOut, java.util.concurrent.TimeUnit timeUnit)
TransactionController.ExecutionBuilder
timeout
in interface TransactionController.ExecutionBuilder
timeOut
- timeout if the transactiontimeUnit
- the time unit of the time argumentExecutionBuilder
with the given transaction timeoutTransactionController.ReadWriteExecutionBuilder using(java.lang.String name, com.terracottatech.store.DatasetReader<?> reader)
TransactionController.ExecutionBuilder
DatasetReader
as a participant in the transactionusing
in interface TransactionController.ExecutionBuilder
name
- name that maps to the given DatasetReader
reader
- participating DatasetReader
ExecutionBuilder
with the given DatasetReader
added as participantTransactionController.ReadWriteExecutionBuilder using(java.lang.String name, com.terracottatech.store.DatasetWriterReader<?> writerReader)
TransactionController.ExecutionBuilder
DatasetWriterReader
as a participant in the transactionusing
in interface TransactionController.ExecutionBuilder
name
- name that maps to the given DatasetWriterReader
writerReader
- participating DatasetWriterReader
ExecutionBuilder
with the given DatasetWriterReader
added as participant<T> T execute(TransactionalBiAction<java.util.Map<java.lang.String,com.terracottatech.store.DatasetWriterReader<?>>,java.util.Map<java.lang.String,com.terracottatech.store.DatasetReader<?>>,T> action) throws java.lang.Exception
T
- return type of the transaction argumentaction
- transactional action to be performedjava.lang.Exception
- if the transaction could not be completed, internal rollback would be triggered to cleanup
unfinished transactional work.StoreTransactionTimeoutException
- if the transaction timed out before completion, internal rollback would
be triggered to cleanup unfinished transactional work.
Note that if the internal rollback also fails with some exception, that exception would be added as suppressed to
the thrown exception.@Deprecated TransactionController.ReadWriteTransaction begin()
execute(TransactionalBiAction)