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 Detail

      • getTransientStore

        @Deprecated
        TransientStore getTransientStore()
        Deprecated.
        since 10.10, each batch handler has its own transient store
        Returns the TransientStore backing the batches of the default handler.
        Since:
        7.4
      • hasBatch

        boolean hasBatch​(String batchId)
        Returns true if there is a batch for the given batchId, false otherwise.
        Since:
        5.7.2
      • getBlobs

        List<Blob> getBlobs​(String batchId)
        Gets Blobs associated to a given batch. Returns null if batch does not exist.
      • getBlobs

        List<Blob> getBlobs​(String batchId,
                            int timeoutS)
        Gets Blobs associated to a given batch. Returns null if batch does not exist. Waits for upload in progress if needed.
        Since:
        5.7
      • clean

        void clean​(String batchId)
        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

        @Deprecated
        String initBatch​(String batchId,
                         String contextName)
        Deprecated.
        since 7.10, use initBatch() instead.
        Initializes a batch with a given batchId and Context Name. If batchId is not provided, it will be automatically generated.
        Returns:
        the batchId
      • initBatch

        Batch initBatch​(String handlerName)
        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
      • execute

        Object execute​(String batchId,
                       String chainOrOperationId,
                       CoreSession session,
                       Map<String,​Object> contextParams,
                       Map<String,​Object> operationParams)
        Executes the chain or operation on the Blobs from the given batchId.

        This method does not clean the temporary storage associated to the batchId.

        Since:
        5.7
      • execute

        Object execute​(String batchId,
                       String fileIndex,
                       String chainOrOperationId,
                       CoreSession session,
                       Map<String,​Object> contextParams,
                       Map<String,​Object> operationParams)
        Executes the chain or operation on the Blob from the given batchId and fileIndex.

        This method does not clean the temporary storage associated to the batchId.

        Since:
        5.7.2
      • executeAndClean

        Object executeAndClean​(String batchId,
                               String chainOrOperationId,
                               CoreSession session,
                               Map<String,​Object> contextParams,
                               Map<String,​Object> operationParams)
        Executes the chain or operation on the Blobs from the given batchId.

        This method cleans the temporary storage associated to the batchId after the execution.

        Since:
        5.7
      • removeFileEntry

        boolean removeFileEntry​(String batchId,
                                String filedIdx)
        Removes a file from a batch.
        Since:
        8.4
      • getBatch

        Batch getBatch​(String batchId)
        Fetches information about a batch.
        Parameters:
        batchId - the batch id
        Returns:
        the batch, or null if it doesn't exist
        Since:
        10.1
      • getSupportedHandlers

        Set<String> getSupportedHandlers()
        Returns the supported batch handler names.
        Returns:
        the supported batch handler names
        Since:
        10.1
      • getHandler

        BatchHandler getHandler​(String handlerName)
        Gets a batch handler.
        Parameters:
        handlerName - the batch handler name
        Returns:
        the batch handler, or null if it doesn't exist
        Since:
        10.1