类 PutSuperObjectRequest


  • public class PutSuperObjectRequest
    extends GenericObjectRequest
    Request object containing all the options for put Super Object to bucket.
    • 构造器详细资料

      • PutSuperObjectRequest

        public PutSuperObjectRequest​(String bucketName,
                                     String key,
                                     File file)
      • PutSuperObjectRequest

        public PutSuperObjectRequest​(String bucketName,
                                     String key,
                                     File file,
                                     long chunkSize)
      • PutSuperObjectRequest

        public PutSuperObjectRequest​(String bucketName,
                                     String key,
                                     File file,
                                     int nThreads)
      • PutSuperObjectRequest

        public PutSuperObjectRequest​(String bucketName,
                                     String key,
                                     File file,
                                     long chunkSize,
                                     int nThreads)
        Constructs a new PutSuperObjectRequest object to upload a super object file and a stream of data to the specified bucket and key. After constructing the request, users may optionally specify object metadata or a canned ACL as well.
        参数:
        bucketName - The name of an existing bucket to which the new object will be uploaded.
        key - The key under which to store the new object.
        file - The path of the super object file to upload to Baidu Bos.
        chunkSize - the part size when upload super object file
        nThreads - the number of thread in thread pool
    • 方法详细资料

      • cancel

        public void cancel()
      • getChunkSize

        public long getChunkSize()
      • setChunkSize

        public void setChunkSize​(long chunkSize)
      • getFile

        public File getFile()
        Gets the path and name of the file containing the data to be uploaded to Baidu Bos. Either specify a file or an input stream containing the data to be uploaded to Baidu Bos; both cannot be specified.
        返回:
        The path and name of the file containing the data to be uploaded to Baidu Bos.
      • setFile

        public void setFile​(File file)
        Sets the path and name of the file containing the data to be uploaded to Baidu Bos. Either specify a file or an input stream containing the data to be uploaded to Baidu Bos; both cannot be specified.
        参数:
        file - The path and name of the file containing the data to be uploaded to Baidu Bos.
      • withFile

        public PutSuperObjectRequest withFile​(File file)
        Sets the file containing the data to be uploaded to Baidu Bos. Returns this PutObjectRequest, enabling additional method calls to be chained together.

        Either specify a file or an input stream containing the data to be uploaded to Baidu Bos; both cannot be specified.

        参数:
        file - The file containing the data to be uploaded to Baidu Bos.
        返回:
        This PutObjectRequest, enabling additional method calls to be chained together.
      • getnThreads

        public int getnThreads()
      • setnThreads

        public void setnThreads​(int nThreads)
      • getIsSuperObjectUploadCanced

        public AtomicBoolean getIsSuperObjectUploadCanced()
      • setIsSuperObjectUploadCanced

        public void setIsSuperObjectUploadCanced​(AtomicBoolean isSuperObjectUploadCanced)
      • getUploadId

        public String getUploadId()
      • setUploadId

        public void setUploadId​(String uploadId)
      • getObjectMetadata

        public ObjectMetadata getObjectMetadata()
        Returns the additional information about the new object being created, such as content type, content encoding, user metadata, etc.
        返回:
        The additional information about the new object being created, such as content type, content encoding, user metadata, etc.
      • setObjectMetadata

        public void setObjectMetadata​(ObjectMetadata objectMetadata)
        Sets the additional information about the new object being created, such as content type, content encoding, user metadata, etc.
        参数:
        objectMetadata - Additional information about the new object being created, such as content type, content encoding, user metadata, etc.
      • getProgressCallback

        public BosProgressCallback getProgressCallback()
        Gets the BosProgressCallback which used for Get upload progress.
        返回:
        The BosProgressCallback which used for get progress information.
      • setProgressCallback

        public void setProgressCallback​(BosProgressCallback progressCallback)
        Sets the BosProgressCallback which used for Get upload progress.
        参数:
        progressCallback - The BosProgressCallback, which used for get progress information.
      • withProgressCallback

        public PutSuperObjectRequest withProgressCallback​(BosProgressCallback progressCallback)
        参数:
        progressCallback - The BosProgressCallback, which used for get progress information.
        返回:
        This PutSuperObjectRequest, so that additional method calls can be chained together
      • getTrafficLimitBitPS

        public long getTrafficLimitBitPS()
        Gets the limit of put object speed.
        返回:
        the limit of put object speed. unit: bit/s
      • setTrafficLimitBitPS

        public void setTrafficLimitBitPS​(long trafficLimitBitPS)
        Sets Gets the limit of put object speed. range: 819200 bit/s ~ 838860800 bit/s
        参数:
        trafficLimitBitPS - the limit of put object speed. unit: bit/s
      • withTrafficLimitBitPS

        public PutSuperObjectRequest withTrafficLimitBitPS​(long trafficLimitBitPS)
        参数:
        trafficLimitBitPS - the limit of put object speed. unit: bit/s, range: 819200 bit/s ~ 838860800 bit/s
        返回:
        This PutObjectRequest, so that additional method calls can be chained together