Class BulkIndexResult.AsyncAccumulator
java.lang.Object
com.atlassian.jira.search.index.bulk.BulkIndexResult.AsyncAccumulator
- Enclosing class:
BulkIndexResult
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(CompletableFuture<BulkIndexResult> future) Add a CompletableFutureto the accumulator await()Wait for all futures to complete and return an Accumulator with all results.
-
Constructor Details
-
AsyncAccumulator
public AsyncAccumulator()
-
-
Method Details
-
add
Add a CompletableFutureto the accumulator - Parameters:
future- the CompletableFutureto add - Returns:
- this accumulator for method chaining
-
await
Wait for all futures to complete and return an Accumulator with all results. If an exception occurs in one of the threads, they will be tracked in theBulkIndexResult.Accumulator- Returns:
- an Accumulator containing all the results from the completed futures
-