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 newBatch
storage representation- Returns:
- new
Batch
storage representation
-
completeBatch
Complete aBatch
to its completion state- Parameters:
batch
- TheBatch
storage representation to complete- Returns:
- The completed
Batch
representation - Throws:
AtomicMoveException
- If atomically moving the batch to completion state fails
-
review
Preview all completed batches as a stream ofBatch
instances. 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
-