类 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.
-
-
字段概要
-
从类继承的字段 com.baidubce.services.bos.model.GenericObjectRequest
trafficLimitBitPS
-
-
构造器概要
构造器 构造器 说明 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()ObjectMetadatagetObjectMetadata()Returns the additional information about the new object being created, such as content type, content encoding, user metadata, etc.BosProgressCallbackgetProgressCallback()Gets the BosProgressCallback which used for Get upload progress.longgetTrafficLimitBitPS()Gets the limit of put object speed.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)voidsetObjectMetadata(ObjectMetadata objectMetadata)Sets the additional information about the new object being created, such as content type, content encoding, user metadata, etc.voidsetProgressCallback(BosProgressCallback progressCallback)Sets the BosProgressCallback which used for Get upload progress.voidsetTrafficLimitBitPS(long trafficLimitBitPS)Sets Gets the limit of put object speed.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)PutSuperObjectRequestwithProgressCallback(BosProgressCallback progressCallback)PutSuperObjectRequestwithRequestCredentials(BceCredentials credentials)PutSuperObjectRequestwithTrafficLimitBitPS(long trafficLimitBitPS)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)
-
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
-
-