Interface Upload

    • Method Detail

      • waitForUploadResult

        UploadResult waitForUploadResult()
                                  throws AmazonClientException,
                                         AmazonServiceException,
                                         InterruptedException
        Waits for this upload to complete and returns the result of this upload. This is a blocking call. Be prepared to handle errors when calling this method. Any errors that occurred during the asynchronous transfer will be re-thrown through this method.
        Returns:
        The result of this transfer.
        Throws:
        AmazonClientException - If any errors were encountered in the client while making the request or handling the response.
        AmazonServiceException - If any errors occurred in Amazon S3 while processing the request.
        InterruptedException - If this thread is interrupted while waiting for the upload to complete.
      • pause

        PersistableUpload pause()
                         throws PauseException
        Pause the current upload operation and returns the information that can be used to resume the upload. Upload cannot be paused in the following cases. In such cases, aborts the uploads and a PauseFailure exception is thrown
        Returns:
        An opaque token that holds some private state and can be used to resume a paused download operation.
        Throws:
        PauseException - If failed to pause the operation.
      • tryPause

        PauseResult<PersistableUpload> tryPause​(boolean forceCancelTransfers)
        Tries to pause the current upload operation and returns the information that can be used to resume the upload. Upload cannot be paused in the following cases. In such cases, aborts the uploads if forceCancelTransfers is set else No action is taken.
        Parameters:
        forceCancelTransfers - a boolean to forcefully abort the existing uploads if pause cannot be done.
        Returns:
        a result of pause operation.
      • abort

        void abort()
        Abort the current upload operation.