Interface TransactionBatch
- All Superinterfaces:
AutoCloseable,Batch,SuspendedBatch
- All Known Implementing Classes:
ThreadLocalTransactionBatch
TransactionBatch that associates and exposes the underlying transaction.- Author:
- Paul Ferraro
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends RuntimeException>
TransactionBatch.Factoryfactory(String name, jakarta.transaction.TransactionManager tm, Function<Throwable, E> exceptionTransformer) Returns a transaction-basedBatchfactory.jakarta.transaction.TransactionReturns the transaction associated with this batchReturns an interposed batch.Methods inherited from interface org.wildfly.clustering.cache.batch.Batch
close, discard, isActive, isClosed, isDiscarding, suspend, suspendWithContextMethods inherited from interface org.wildfly.clustering.cache.batch.SuspendedBatch
resume, resumeWithContext
-
Method Details
-
getTransaction
jakarta.transaction.Transaction getTransaction()Returns the transaction associated with this batch- Returns:
- a transaction
-
interpose
-
factory
static <E extends RuntimeException> TransactionBatch.Factory factory(String name, jakarta.transaction.TransactionManager tm, Function<Throwable, E> exceptionTransformer) Returns a transaction-basedBatchfactory.- Type Parameters:
E- the target exception type- Parameters:
name- a logical name of this batchertm- a transaction managerexceptionTransformer- an exception wrapper- Returns:
- a new transaction batcher
-