类 PutSuperObjectRequest
- java.lang.Object
-
- com.baidubce.model.AbstractBceRequest
-
- com.baidubce.services.bos.model.GenericBucketRequest
-
- com.baidubce.services.bos.model.GenericObjectRequest
-
- com.baidubce.services.bos.model.PutSuperObjectRequest
-
public class PutSuperObjectRequest extends GenericObjectRequest
Request object containing all the options for put Super Object to bucket.
-
-
构造器概要
构造器 构造器 说明 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.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcancel()longgetChunkSize()FilegetFile()Gets the path and name of the file containing the data to be uploaded to Baidu Bos.AtomicBooleangetIsSuperObjectUploadCanced()intgetnThreads()StringgetUploadId()voidsetChunkSize(long chunkSize)voidsetFile(File file)Sets the path and name of the file containing the data to be uploaded to Baidu Bos.voidsetIsSuperObjectUploadCanced(AtomicBoolean isSuperObjectUploadCanced)voidsetnThreads(int nThreads)voidsetUploadId(String uploadId)PutSuperObjectRequestwithBucketName(String bucketName)PutSuperObjectRequestwithFile(File file)Sets the file containing the data to be uploaded to Baidu Bos.PutSuperObjectRequestwithIsSuperObjectUploadCanced(AtomicBoolean isSuperObjectUploadCanced)PutSuperObjectRequestwithKey(String key)PutSuperObjectRequestwithnThreads(int nThreads)PutSuperObjectRequestwithRequestCredentials(BceCredentials credentials)PutSuperObjectRequestwithUploadId(String uploadId)-
从类继承的方法 com.baidubce.services.bos.model.GenericObjectRequest
getKey, setKey
-
从类继承的方法 com.baidubce.services.bos.model.GenericBucketRequest
getBucketName, setBucketName
-
从类继承的方法 com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
-
-
-
-
构造器详细资料
-
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 filenThreads- the number of thread in thread pool
-
-
方法详细资料
-
cancel
public void cancel()
-
getChunkSize
public long getChunkSize()
-
setChunkSize
public void setChunkSize(long chunkSize)
-
withKey
public PutSuperObjectRequest withKey(String key)
- 指定者:
withKey在类中GenericObjectRequest
-
withBucketName
public PutSuperObjectRequest withBucketName(String bucketName)
- 指定者:
withBucketName在类中GenericBucketRequest
-
withRequestCredentials
public PutSuperObjectRequest withRequestCredentials(BceCredentials credentials)
- 指定者:
withRequestCredentials在类中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.- 返回:
- 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)
-
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)
-
-