Interface BatchHandler
-
- All Known Implementing Classes:
AbstractBatchHandler,DefaultBatchHandler,S3DirectBatchHandler
public interface BatchHandlerBatch Handler encapsulates functionality to handle Batch Upload behaviours.- Since:
- 10.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleancompleteUpload(String batchId, String fileIdx, BatchFileInfo fileInfo)Callback for the batch handler to execute post-upload actions.BatchgetBatch(String batchId)Attempts to fetch a batch with the given id.StringgetName()Gets the batch handler's name.TransientStoregetTransientStore()Gets the transient store used by this batch handler.voidinitialize(String name, Map<String,String> properties)Initializes this batch handler with the given name and configuration properties.BatchnewBatch(String batchId)Initiates a new batch with an optional externally provided id.Map<String,Object>refreshToken(String batchId)Attempts to renew the credentials associated to this batch handler.
-
-
-
Method Detail
-
initialize
void initialize(String name, Map<String,String> properties)
Initializes this batch handler with the given name and configuration properties.- Parameters:
name- the batch handler's nameproperties- the configuration properties
-
getName
String getName()
Gets the batch handler's name.- Returns:
- the batch handler's name
-
newBatch
Batch newBatch(String batchId)
Initiates a new batch with an optional externally provided id.- Parameters:
batchId- the id to use for the batch, ornullto generate it- Returns:
- a newly created batch
-
getBatch
Batch getBatch(String batchId)
Attempts to fetch a batch with the given id.- Parameters:
batchId- the batch id to fetch- Returns:
- the batch with the given id, or
nullif not found
-
refreshToken
Map<String,Object> refreshToken(String batchId)
Attempts to renew the credentials associated to this batch handler. This is only typically used in third-party batch handlers.- Parameters:
batchId- the batch id- Returns:
- the new credentials
- Since:
- 11.1
-
completeUpload
default boolean completeUpload(String batchId, String fileIdx, BatchFileInfo fileInfo)
Callback for the batch handler to execute post-upload actions. This is only typically used in third-party batch handlers.- Parameters:
batchId- the batch idfileIdx- the file index within the batchfileInfo- file information regarting the uploaded file- Returns:
trueif the action was success
-
getTransientStore
TransientStore getTransientStore()
Gets the transient store used by this batch handler.- Since:
- 10.10
-
-