Class TransactionalBatcher<E extends RuntimeException>
java.lang.Object
org.wildfly.clustering.cache.infinispan.batch.TransactionalBatcher<E>
- All Implemented Interfaces:
Batcher<TransactionBatch>
public class TransactionalBatcher<E extends RuntimeException>
extends Object
implements Batcher<TransactionBatch>
A
Batcher implementation based on Infinispan's BatchContainer, except that its transaction reference is stored within the returned Batch object instead of a ThreadLocal.
This also allows the user to call Batch.close() from a different thread than the one that created the Batch.
In this case, however, the user must first resume the batch via resumeBatch(TransactionBatch).- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionTransactionalBatcher(String name, jakarta.transaction.TransactionManager tm, Function<Throwable, E> exceptionTransformer) -
Method Summary
-
Constructor Details
-
TransactionalBatcher
-
-
Method Details
-
createBatch
- Specified by:
createBatchin interfaceBatcher<E extends RuntimeException>
-
resumeBatch
- Specified by:
resumeBatchin interfaceBatcher<E extends RuntimeException>
-
suspendBatch
- Specified by:
suspendBatchin interfaceBatcher<E extends RuntimeException>
-