public class InfinispanBatcher extends Object implements Batcher<TransactionBatch>
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)
.Constructor and Description |
---|
InfinispanBatcher(org.infinispan.Cache<?,?> cache) |
InfinispanBatcher(TransactionManager tm) |
Modifier and Type | Method and Description |
---|---|
TransactionBatch |
createBatch()
Creates a batch.
|
BatchContext |
resumeBatch(TransactionBatch batch)
Resumes a batch.
|
TransactionBatch |
suspendBatch()
Suspends a batch.
|
public InfinispanBatcher(org.infinispan.Cache<?,?> cache)
public InfinispanBatcher(TransactionManager tm)
public TransactionBatch createBatch()
Batcher
createBatch
in interface Batcher<TransactionBatch>
public BatchContext resumeBatch(TransactionBatch batch)
Batcher
resumeBatch
in interface Batcher<TransactionBatch>
batch
- an existing batchpublic TransactionBatch suspendBatch()
Batcher
suspendBatch
in interface Batcher<TransactionBatch>
Copyright © 2018 JBoss by Red Hat. All rights reserved.