public class BatchManager
extends java.lang.Object
ImportBatches.| Constructor and Description |
|---|
BatchManager(ImportEnv env)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected ImportBatch |
createBatchFor(java.util.stream.Stream<ImportInput> requests)
Creates a new batch containing the specified import requests.
|
protected void |
deleteBatch(ImportBatchId batchId)
Removes the specified batch from permanent storage.
|
protected ImportBatchStatus |
getBatchStatusOf(ProcessedImport task)
Retrieves the current state of the batch containing the specified task.
|
protected void |
updateBatchOf(ProcessedImport task)
Updates the batch containing the specified import task to mark the
import as completed within the batch.
|
public BatchManager(ImportEnv env)
env - the import environment.java.lang.NullPointerException - if the argument is null.protected ImportBatch createBatchFor(java.util.stream.Stream<ImportInput> requests)
requests - the import requests to queue.java.lang.NullPointerException - if the stream or any of its elements is
null.java.lang.IllegalArgumentException - if the stream is empty.protected ImportBatchStatus getBatchStatusOf(ProcessedImport task)
task - the import task.java.lang.NullPointerException - if the argument is null.protected void deleteBatch(ImportBatchId batchId)
batchId - identifies the batch.java.lang.NullPointerException - if the argument is null.protected void updateBatchOf(ProcessedImport task)
task - the import task.java.lang.NullPointerException - if the argument is null.