public class TransactionalBatcher<E extends RuntimeException> extends Object implements Batcher<TransactionBatch>
Batcher implementation based on Infinispan's org.infinispan.batch.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).| Constructor and Description |
|---|
TransactionalBatcher(TransactionManager tm,
Function<Throwable,E> exceptionTransformer) |
| Modifier and Type | Method and Description |
|---|---|
TransactionBatch |
createBatch() |
BatchContext |
resumeBatch(TransactionBatch batch) |
TransactionBatch |
suspendBatch() |
public TransactionalBatcher(TransactionManager tm, Function<Throwable,E> exceptionTransformer)
public TransactionBatch createBatch()
createBatch in interface Batcher<TransactionBatch>public BatchContext resumeBatch(TransactionBatch batch)
resumeBatch in interface Batcher<TransactionBatch>public TransactionBatch suspendBatch()
suspendBatch in interface Batcher<TransactionBatch>Copyright © 2019 JBoss by Red Hat. All rights reserved.