Interface StorageProvider
- All Known Implementing Classes:
FileSystemStorageProvider
public interface StorageProvider
Provider responsible for moving
Batch representations through storage lifecycle,
eventually completing the batch into it's final completion state that is ready for ingestion into
AuditServices.-
Method Summary
-
Method Details
-
newBatch
Batch newBatch()Create a newBatchstorage representation- Returns:
- new
Batchstorage representation
-
completeBatch
Complete aBatchto its completion state- Parameters:
batch- TheBatchstorage representation to complete- Returns:
- The completed
Batchrepresentation - Throws:
AtomicMoveException- If atomically moving the batch to completion state fails
-
review
Preview all completed batches as a stream ofBatchinstances. The stream is automatically closed once the consumer exits.- Parameters:
consumer- A consumer receiving a stream of paths for review
-
nextIngestionBatch
Grab the next available completed batch from storage for ingestion.- Returns:
- The next available completed batch from storage. Null if none available.
- Throws:
AtomicMoveException- If atomically moving the batch to ingestion processing state fails
-