Package com.atlassian.confluence.core
Interface BatchOperationManager
-
- All Known Implementing Classes:
SimpleHibernateBatchOperationManager5
public interface BatchOperationManager
Perform batch operations without any explicit dependency on a particular version of Hibernate or Spring.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default <I,O>
Iterable<O>applyInBatches(Iterable<I> input, int batchSize, int expectedTotal, Function<I,O> task)
Executes a task for each item in a collection in batches with configurable batch sizedefault <I,O>
Iterable<O>applyInBatches(Iterable<I> input, int expectedTotal, Function<I,O> task)
Executes a task for each item in a collection in batchesdefault <I,O>
Iterable<O>applyInChunks(Iterable<I> input, int chunkSize, int sizeToCollect, Function<List<I>,@NonNull 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.<I,O>
Iterable<O>performAsBatch(Iterable<I> input, int batchSize, int expectedTotal, com.google.common.base.Function<I,O> task)
Deprecated.since 7.0.1.<I,O>
Iterable<O>performAsBatch(Iterable<I> input, int expectedTotal, com.google.common.base.Function<I,O> task)
Deprecated.since 7.0.1.<I,O>
Iterable<O>performInChunks(Iterable<I> input, int chunkSize, int sizeToCollect, com.google.common.base.Function<List<I>,@NonNull List<O>> task)
Deprecated.since 7.0.1.
-
-
-
Method Detail
-
performAsBatch
@Deprecated <I,O> Iterable<O> performAsBatch(Iterable<I> input, int batchSize, int expectedTotal, com.google.common.base.Function<I,O> task)
Deprecated.since 7.0.1. UseapplyInBatches(Iterable, int, int, Function)
Executes a task for each item in a collection in batches with configurable batch size- Type Parameters:
I
- input typeO
- output type- Parameters:
input
- the items to processbatchSize
- the size of the batchexpectedTotal
- the expected number of items to processtask
- a function to process the items- Returns:
- list of task outputs of specified type
- Since:
- 6.14.0
-
applyInBatches
default <I,O> Iterable<O> applyInBatches(Iterable<I> input, int batchSize, int expectedTotal, Function<I,O> task)
Executes a task for each item in a collection in batches with configurable batch size- Type Parameters:
I
- input typeO
- output type- Parameters:
input
- the items to processbatchSize
- the size of the batchexpectedTotal
- the expected number of items to processtask
- a function to process the items- Returns:
- list of task outputs of specified type
- Since:
- 7.0.1
-
performAsBatch
@Deprecated <I,O> Iterable<O> performAsBatch(Iterable<I> input, int expectedTotal, com.google.common.base.Function<I,O> task)
Deprecated.since 7.0.1. UseapplyInBatches(Iterable, int, Function)
Executes a task for each item in a collection in batches- Type Parameters:
I
- input typeO
- output type- Parameters:
input
- the items to processexpectedTotal
- the expected number of items to processtask
- a function to process the items- Returns:
- list of task outputs of specified type
-
applyInBatches
default <I,O> Iterable<O> applyInBatches(Iterable<I> input, int expectedTotal, Function<I,O> task)
Executes a task for each item in a collection in batches- Type Parameters:
I
- input typeO
- output type- Parameters:
input
- the items to processexpectedTotal
- the expected number of items to processtask
- a function to process the items- Returns:
- list of task outputs of specified type
- Since:
- 7.0.1
-
performInChunks
@Deprecated <I,O> Iterable<O> performInChunks(Iterable<I> input, int chunkSize, int sizeToCollect, com.google.common.base.Function<List<I>,@NonNull List<O>> task)
Deprecated.since 7.0.1. UseapplyInChunks(Iterable, int, int, Function)
Processes a collection of items in chunks until a given number of processed items is reached, the processed items are then returned.- Parameters:
input
- the items to processchunkSize
- the size of the batchsizeToCollect
- the number of processed items to returntask
- a function to process the items- Returns:
- A list of processed items
-
applyInChunks
default <I,O> Iterable<O> applyInChunks(Iterable<I> input, int chunkSize, int sizeToCollect, Function<List<I>,@NonNull 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.- Parameters:
input
- the items to processchunkSize
- the size of the batchsizeToCollect
- the number of processed items to returntask
- a function to process the items- Returns:
- A list of processed items
- Since:
- 7.0.1
-
-