public class SimpleHibernateBatchOperationManager extends Object implements BatchOperationManager
WARNING: Methods in this batching manager may clear the current session!
Constructor and Description |
---|
SimpleHibernateBatchOperationManager(HibernateSessionManager sessionManager) |
Modifier and Type | Method and Description |
---|---|
<I,O> Iterable<O> |
performAsBatch(Iterable<I> input,
int expectedTotal,
com.google.common.base.Function<I,O> task)
Deprecated.
|
<I,O> Iterable<O> |
performAsBatch(Iterable<I> input,
int batchSize,
int expectedTotal,
com.google.common.base.Function<I,O> task)
Deprecated.
|
<I,O> Iterable<O> |
performInChunks(Iterable<I> input,
int chunkSize,
int sizeToCollect,
com.google.common.base.Function<List<I>,List<O>> task)
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyInBatches, applyInBatches, applyInChunks
public SimpleHibernateBatchOperationManager(HibernateSessionManager sessionManager)
@Deprecated public <I,O> Iterable<O> performAsBatch(Iterable<I> input, int batchSize, int expectedTotal, com.google.common.base.Function<I,O> task)
BatchOperationManager.applyInBatches(Iterable, int, int, java.util.function.Function)
WARNING: This method will clear the current session! The session clearing will discard any unflushed or uncommitted changes made higher in the stack. Calls to this method should generally be done in a separate thread or otherwise outside the scope of a request.
performAsBatch
in interface BatchOperationManager
I
- input typeO
- output typeinput
- the items to processbatchSize
- the size of the batchexpectedTotal
- the expected number of items to processtask
- a function to process the items@Deprecated public <I,O> Iterable<O> performAsBatch(Iterable<I> input, int expectedTotal, com.google.common.base.Function<I,O> task)
BatchOperationManager.applyInBatches(Iterable, int, java.util.function.Function)
WARNING: This method will clear the current session! The session clearing will discard any unflushed or uncommitted changes made higher in the stack. Calls to this method should generally be done in a separate thread or otherwise outside the scope of a request.
performAsBatch
in interface BatchOperationManager
I
- input typeO
- output typeinput
- the items to processexpectedTotal
- the expected number of items to processtask
- a function to process the items@Deprecated public <I,O> Iterable<O> performInChunks(Iterable<I> input, int chunkSize, int sizeToCollect, com.google.common.base.Function<List<I>,List<O>> task)
BatchOperationManager.applyInChunks(Iterable, int, int, java.util.function.Function)
This method does NOT perform batch operations in independent transactions. To do so, transactions will need to be
handled by the provided processing function. Alternatively, consider using BatchOperationManager.applyInBatches(Iterable, int, java.util.function.Function)
performInChunks
in interface BatchOperationManager
input
- the items to processchunkSize
- the size of the batchsizeToCollect
- the number of processed items to returntask
- a function to process the itemsCopyright © 2003–2020 Atlassian. All rights reserved.