public class SimpleHibernateBatchOperationManager extends java.lang.Object implements BatchOperationManager
Warning: using this batcher will clear the current session!
Constructor and Description |
---|
SimpleHibernateBatchOperationManager(HibernateSessionManager sessionManager) |
Modifier and Type | Method and Description |
---|---|
<I,O> java.lang.Iterable<O> |
performAsBatch(java.lang.Iterable<I> input,
int expectedTotal,
com.google.common.base.Function<I,O> task) |
<I,O> java.lang.Iterable<O> |
performInChunks(java.lang.Iterable<I> input,
int chunkSize,
int sizeToCollect,
com.google.common.base.Function<java.util.List<I>,java.util.List<O>> task)
Processes a collection of items in chunks until a given number of processed items is reached, the processed items are then returned.
|
public SimpleHibernateBatchOperationManager(HibernateSessionManager sessionManager)
public <I,O> java.lang.Iterable<O> performAsBatch(java.lang.Iterable<I> input, int expectedTotal, com.google.common.base.Function<I,O> task)
performAsBatch
in interface BatchOperationManager
public <I,O> java.lang.Iterable<O> performInChunks(java.lang.Iterable<I> input, int chunkSize, int sizeToCollect, com.google.common.base.Function<java.util.List<I>,java.util.List<O>> task)
BatchOperationManager
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-2014 Atlassian. All Rights Reserved.