类 UploadFileRequest


public class UploadFileRequest extends PutObjectBasicRequest
Parameters in a file upload request
  • 字段详细资料

    • partSize

      private long partSize
    • taskNum

      private int taskNum
    • uploadFile

      private String uploadFile
    • enableCheckpoint

      private boolean enableCheckpoint
    • checkpointFile

      private String checkpointFile
    • objectMetadata

      private ObjectMetadata objectMetadata
    • enableCheckSum

      private boolean enableCheckSum
    • progressListener

      private ProgressListener progressListener
    • encodingType

      private String encodingType
    • callback

      private Callback callback
    • progressInterval

      private long progressInterval
  • 构造器详细资料

    • UploadFileRequest

      public UploadFileRequest(String bucketName, String objectKey)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
    • UploadFileRequest

      public UploadFileRequest(String bucketName, String objectKey, String uploadFile)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      uploadFile - To-be-uploaded local file
    • UploadFileRequest

      public UploadFileRequest(String bucketName, String objectKey, String uploadFile, String encodingType)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      uploadFile - To-be-uploaded local file
      encodingType - Encoding type used for encoding objectKey
    • UploadFileRequest

      public UploadFileRequest(String bucketName, String objectKey, String uploadFile, long partSize)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      uploadFile - To-be-uploaded local file
      partSize - Part size
    • UploadFileRequest

      public UploadFileRequest(String bucketName, String objectKey, String uploadFile, long partSize, int taskNum)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      uploadFile - To-be-uploaded local file
      partSize - Part size
      taskNum - Maximum number of threads used for processing upload tasks concurrently
    • UploadFileRequest

      public UploadFileRequest(String bucketName, String objectKey, String uploadFile, long partSize, int taskNum, boolean enableCheckpoint)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      uploadFile - To-be-uploaded local file
      partSize - Part size
      taskNum - Maximum number of threads used for processing upload tasks concurrently
      enableCheckpoint - Whether to enable the resumable mode
    • UploadFileRequest

      public UploadFileRequest(String bucketName, String objectKey, String uploadFile, long partSize, int taskNum, boolean enableCheckpoint, String checkpointFile)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      uploadFile - To-be-uploaded local file
      partSize - Part size
      taskNum - Maximum number of threads used for processing upload tasks concurrently
      enableCheckpoint - Whether to enable the resumable mode
      checkpointFile - File used to record resumable upload progresses
    • UploadFileRequest

      public UploadFileRequest(String bucketName, String objectKey, String uploadFile, long partSize, int taskNum, boolean enableCheckpoint, String checkpointFile, boolean enableCheckSum)
      Constructor
      参数:
      bucketName - Bucket name
      objectKey - Object name
      uploadFile - To-be-uploaded local file
      partSize - Part size
      taskNum - Maximum number of threads used for processing upload tasks concurrently
      enableCheckpoint - Whether to enable the resumable mode
      checkpointFile - File used to record resumable upload progresses
      enableCheckSum - Whether to verify the to-be-uploaded file upon non-initial uploads in resumable upload mode
  • 方法详细资料

    • getPartSize

      public long getPartSize()
      Obtain the part size set for uploading the object.
      返回:
      Part size
    • setPartSize

      public void setPartSize(long partSize)
      Set the part size for uploading the object.
      参数:
      partSize - Part size
    • getTaskNum

      public int getTaskNum()
      Obtain the maximum number of threads used for processing upload tasks concurrently.
      返回:
      Maximum number of threads used for processing upload tasks concurrently
    • setTaskNum

      public void setTaskNum(int taskNum)
      Set the maximum number of threads used for executing upload tasks concurrently.
      参数:
      taskNum - Maximum number of threads used for processing upload tasks concurrently
    • getUploadFile

      public String getUploadFile()
      Obtain the to-be-uploaded local file.
      返回:
      To-be-uploaded local file
    • setUploadFile

      public void setUploadFile(String uploadFile)
      Specify the local file to be uploaded.
      参数:
      uploadFile - To-be-uploaded local file
    • isEnableCheckpoint

      public boolean isEnableCheckpoint()
      Identify whether the resumable mode is enabled.
      返回:
      Identifier specifying whether the resumable mode is enabled
    • setEnableCheckpoint

      public void setEnableCheckpoint(boolean enableCheckpoint)
      Specify whether to enable the resumable mode.
      参数:
      enableCheckpoint - Identifier specifying whether the resumable mode is enabled
    • getCheckpointFile

      public String getCheckpointFile()
      Obtain the file used to record resumable upload progresses.
      返回:
      File used to record upload progresses
    • setCheckpointFile

      public void setCheckpointFile(String checkpointFile)
      Specify a file used to record resumable upload progresses.
      参数:
      checkpointFile - File used to record upload progresses
    • getObjectMetadata

      public ObjectMetadata getObjectMetadata()
      Obtain object properties.
      返回:
      Object properties
    • setObjectMetadata

      public void setObjectMetadata(ObjectMetadata objectMetadata)
      Set object properties.
      参数:
      objectMetadata - Object properties
    • isEnableCheckSum

      public boolean isEnableCheckSum()
      Identify whether the file to be uploaded in resumable mode will be verified.
      返回:
      Identifier specifying whether to verify the to-be-uploaded file
    • setEnableCheckSum

      public void setEnableCheckSum(boolean enableCheckSum)
      Specify whether to verify the file to be uploaded in resumable mode.
      参数:
      enableCheckSum - Identifier specifying whether to verify the to-be-uploaded file
    • getProgressListener

      public ProgressListener getProgressListener()
      Obtain the data transfer listener.
      返回:
      Data transfer listener
    • setProgressListener

      public void setProgressListener(ProgressListener progressListener)
      Set the data transfer listener.
      参数:
      progressListener - Data transfer listener
    • getProgressInterval

      public long getProgressInterval()
      Obtain the callback threshold of the data transfer listener. The default value is 100 KB.
      返回:
      Callback threshold of the data transfer listener
    • setProgressInterval

      public void setProgressInterval(long progressInterval)
      Set the callback threshold of the data transfer listener. The default value is 100 KB.
      参数:
      progressInterval - Callback threshold of the data transfer listener
    • setEncodingType

      public void setEncodingType(String encodingType)
      Set encoding type for encoding objectKey, could choose "url"
      参数:
      encodingType - encoding type for encoding objectKey
    • getEncodingType

      public String getEncodingType()
      Get encoding type for encoding objectKey
      返回:
      encodingType
    • getCallback

      public Callback getCallback()
    • setCallback

      public void setCallback(Callback callback)
    • toString

      public String toString()
      覆盖:
      toString 在类中 BaseObjectRequest