Interface BatchHandler

    • 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 name
        properties - 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, or null to 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 null if 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 id
        fileIdx - the file index within the batch
        fileInfo - file information regarting the uploaded file
        Returns:
        true if the action was success
      • getTransientStore

        TransientStore getTransientStore()
        Gets the transient store used by this batch handler.
        Since:
        10.10