com.baidubce.services.bos.model
Class PutSuperObjectRequest

java.lang.Object
  extended by com.baidubce.model.AbstractBceRequest
      extended by com.baidubce.services.bos.model.GenericBucketRequest
          extended by com.baidubce.services.bos.model.GenericObjectRequest
              extended by com.baidubce.services.bos.model.PutSuperObjectRequest

public class PutSuperObjectRequest
extends GenericObjectRequest

Request object containing all the options for put Super Object to bucket.


Constructor Summary
PutSuperObjectRequest(String bucketName, String key, File file)
           
PutSuperObjectRequest(String bucketName, String key, File file, int nThreads)
           
PutSuperObjectRequest(String bucketName, String key, File file, long chunkSize)
           
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.
 
Method Summary
 void cancel()
           
 long getChunkSize()
           
 File getFile()
          Gets the path and name of the file containing the data to be uploaded to Baidu Bos.
 AtomicBoolean getIsSuperObjectUploadCanced()
           
 int getnThreads()
           
 String getUploadId()
           
 void setChunkSize(long chunkSize)
           
 void setFile(File file)
          Sets the path and name of the file containing the data to be uploaded to Baidu Bos.
 void setIsSuperObjectUploadCanced(AtomicBoolean isSuperObjectUploadCanced)
           
 void setnThreads(int nThreads)
           
 void setUploadId(String uploadId)
           
 PutSuperObjectRequest withBucketName(String bucketName)
           
 PutSuperObjectRequest withFile(File file)
          Sets the file containing the data to be uploaded to Baidu Bos.
 PutSuperObjectRequest withIsSuperObjectUploadCanced(AtomicBoolean isSuperObjectUploadCanced)
           
 PutSuperObjectRequest withKey(String key)
           
 PutSuperObjectRequest withnThreads(int nThreads)
           
 PutSuperObjectRequest withRequestCredentials(BceCredentials credentials)
           
 PutSuperObjectRequest withUploadId(String uploadId)
           
 
Methods inherited from class com.baidubce.services.bos.model.GenericObjectRequest
getKey, setKey
 
Methods inherited from class com.baidubce.services.bos.model.GenericBucketRequest
getBucketName, setBucketName
 
Methods inherited from class com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.

Parameters:
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
Method Detail

cancel

public void cancel()

getChunkSize

public long getChunkSize()

setChunkSize

public void setChunkSize(long chunkSize)

withKey

public PutSuperObjectRequest withKey(String key)
Specified by:
withKey in class GenericObjectRequest

withBucketName

public PutSuperObjectRequest withBucketName(String bucketName)
Specified by:
withBucketName in class GenericBucketRequest

withRequestCredentials

public PutSuperObjectRequest withRequestCredentials(BceCredentials credentials)
Specified by:
withRequestCredentials in class AbstractBceRequest

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.

Returns:
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.

Parameters:
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.

Parameters:
file - The file containing the data to be uploaded to Baidu Bos.
Returns:
This PutObjectRequest, enabling additional method calls to be chained together.

getnThreads

public int getnThreads()

setnThreads

public void setnThreads(int nThreads)

withnThreads

public PutSuperObjectRequest withnThreads(int nThreads)

getIsSuperObjectUploadCanced

public AtomicBoolean getIsSuperObjectUploadCanced()

setIsSuperObjectUploadCanced

public void setIsSuperObjectUploadCanced(AtomicBoolean isSuperObjectUploadCanced)

withIsSuperObjectUploadCanced

public PutSuperObjectRequest withIsSuperObjectUploadCanced(AtomicBoolean isSuperObjectUploadCanced)

getUploadId

public String getUploadId()

setUploadId

public void setUploadId(String uploadId)

withUploadId

public PutSuperObjectRequest withUploadId(String uploadId)


Copyright © 2020. All rights reserved.