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 TypeMethodDescriptionvoid
addBlob
(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.void
Adds a blob to a batch.void
Cleans 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.boolean
Returns 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.boolean
removeFileEntry
(String batchId, String filedIdx) Removes a file from a batch.
-
Method Details
-
addBlob
Adds a blob to a batch. Will create a newBatch
if 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 newBatch
if 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
null
if 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
null
if it doesn't exist - Since:
- 10.1
-