Class MultipartDownloadResumeContext

java.lang.Object
software.amazon.awssdk.services.s3.internal.multipart.MultipartDownloadResumeContext

public class MultipartDownloadResumeContext extends Object
This class keep tracks of the state of a multipart download across multipart GET requests.
  • Constructor Details

    • MultipartDownloadResumeContext

      public MultipartDownloadResumeContext()
    • MultipartDownloadResumeContext

      public MultipartDownloadResumeContext(Collection<Integer> completedParts, Long bytesToLastCompletedParts)
  • Method Details

    • completedParts

      public List<Integer> completedParts()
    • bytesToLastCompletedParts

      public Long bytesToLastCompletedParts()
    • addCompletedPart

      public void addCompletedPart(int partNumber)
    • addToBytesToLastCompletedParts

      public void addToBytesToLastCompletedParts(long bytes)
    • totalParts

      public void totalParts(int totalParts)
    • totalParts

      public Integer totalParts()
    • response

      public GetObjectResponse response()
    • response

      public void response(GetObjectResponse response)
    • highestSequentialCompletedPart

      public int highestSequentialCompletedPart()
      Returns:
      the highest sequentially completed part, 0 means no parts completed. Used for non-sequential operation when parts may have been completed in a non-sequential order. For example, if parts [1, 2, 3, 6, 7, 10] were completed, this method will return 3.
    • isComplete

      public boolean isComplete()
      Check if the multipart download is complete or not by checking if the total amount of downloaded parts is equal to the total amount of parts.
      Returns:
      true if all parts were downloaded, false if not.
    • toString

      public String toString()
      Overrides:
      toString in class Object