Interface BatchManager
- All Known Implementing Classes:
BatchManagerComponent
public interface BatchManager
Service interface to collect inputs (Blobs) for an operation or operation chain.
- Since:
- 5.4.2
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddBlob(String batchId, String index, Blob blob, int chunkCount, int chunkIndex, String name, String mime, long fileSize) Adds a blob as a chunk to a batch.voidAdds a blob to a batch.voidCleans up the temporary storage associated to the batch.Fetches information about a batch.Gets Blobs associated to a given batch.Gets Blobs associated to a given batch.getFileEntries(String batchId) getFileEntry(String batchId, String fileIndex) getHandler(String handlerName) Gets a batch handler.Returns the supported batch handler names.booleanReturns true if there is a batch for the givenbatchId, false otherwise.Initializes a batch by with an automatically generated id.Initiates a new batch with the given handler.booleanremoveFileEntry(String batchId, String filedIdx) Removes a file from a batch.
-
Method Details
-
addBlob
Adds a blob to a batch. Will create a newBatchif needed.- Throws:
IOException- Since:
- 10.1
-
addBlob
void addBlob(String batchId, String index, Blob blob, int chunkCount, int chunkIndex, String name, String mime, long fileSize) throws IOException Adds a blob as a chunk to a batch. Will create a newBatchif needed.- Throws:
IOException- Since:
- 10.1
-
hasBatch
Returns true if there is a batch for the givenbatchId, false otherwise.- Since:
- 5.7.2
-
getBlobs
Gets Blobs associated to a given batch. Returns null if batch does not exist. -
getBlobs
Gets Blobs associated to a given batch. Returns null if batch does not exist. Waits for upload in progress if needed.- Since:
- 5.7
-
getBlob
-
getBlob
-
getFileEntries
- Since:
- 7.4
-
getFileEntry
- Since:
- 7.4
-
clean
Cleans up the temporary storage associated to the batch. -
initBatch
String initBatch()Initializes a batch by with an automatically generated id.- Returns:
- the batch id
- Since:
- 7.4
-
initBatch
Initiates a new batch with the given handler.- Parameters:
handlerName- the batch handler name- Returns:
- the newly created batch
- Throws:
IllegalArgumentException- it the batch handler does not exist- Since:
- 10.1
-
removeFileEntry
Removes a file from a batch.- Since:
- 8.4
-
getBatch
Fetches information about a batch.- Parameters:
batchId- the batch id- Returns:
- the batch, or
nullif it doesn't exist - Since:
- 10.1
-
getSupportedHandlers
Returns the supported batch handler names.- Returns:
- the supported batch handler names
- Since:
- 10.1
-
getHandler
Gets a batch handler.- Parameters:
handlerName- the batch handler name- Returns:
- the batch handler, or
nullif it doesn't exist - Since:
- 10.1
-