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 Details

    • addBlob

      void addBlob(String batchId, String index, Blob blob, String name, String mime) throws IOException
      Adds a blob to a batch. Will create a new Batch 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 new Batch if needed.
      Throws:
      IOException
      Since:
      10.1
    • 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
    • getBlob

      Blob getBlob(String batchId, String fileIndex)
    • getBlob

      Blob getBlob(String batchId, String fileIndex, int timeoutS)
    • getFileEntries

      List<BatchFileEntry> getFileEntries(String batchId)
      Since:
      7.4
    • getFileEntry

      BatchFileEntry getFileEntry(String batchId, String fileIndex)
      Since:
      7.4
    • 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

      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
    • 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