Interface UploadConcatenationService

All Known Implementing Classes:
VirtualConcatenationService

public interface UploadConcatenationService
Interface for a service that is able to concatenate partial uploads into a concatenated upload
  • Method Details

    • merge

      void merge(UploadInfo uploadInfo) throws IOException, UploadNotFoundException
      Merge the given concatenated upload if all the underlying partial uploads are completed. If the underlying partial uploads are still in-progress, this method does nothing. Otherwise the upload information of the concatenated upload is updated.
      Parameters:
      uploadInfo - The concatenated upload
      Throws:
      IOException - If merging the upload fails
      UploadNotFoundException - When one of the partial uploads cannot be found
    • getConcatenatedBytes

      InputStream getConcatenatedBytes(UploadInfo uploadInfo) throws IOException, UploadNotFoundException
      Get the concatenated bytes of this concatenated upload
      Parameters:
      uploadInfo - The concatenated upload
      Returns:
      The concatenated bytes, or null if this upload is still in progress
      Throws:
      IOException - When return the concatenated bytes fails
      UploadNotFoundException - When the or one of the partial uploads cannot be found
    • getPartialUploads

      List<UploadInfo> getPartialUploads(UploadInfo info) throws IOException, UploadNotFoundException
      Get all underlying partial uploads associated with the given concatenated upload
      Parameters:
      info - The concatenated upload
      Returns:
      The underlying partial uploads
      Throws:
      IOException - When retrieving the underlying partial uploads fails
      UploadNotFoundException - When one of the partial uploads cannot be found