public class PutSuperObjectRequest extends GenericObjectRequest
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
ObjectMetadata |
getObjectMetadata()
Returns the additional information about the new object being created,
such as content type, content encoding, user metadata, etc.
|
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 |
setObjectMetadata(ObjectMetadata objectMetadata)
Sets the additional information about the new object being created, such
as content type, content encoding, user metadata, etc.
|
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) |
getKey, setKeygetBucketName, setBucketNamegetRequestCredentials, setRequestCredentialspublic PutSuperObjectRequest(String bucketName, String key, File file, long chunkSize)
public PutSuperObjectRequest(String bucketName, String key, File file, int nThreads)
public PutSuperObjectRequest(String bucketName, String key, File file, long chunkSize, int nThreads)
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 poolpublic void cancel()
public long getChunkSize()
public void setChunkSize(long chunkSize)
public PutSuperObjectRequest withKey(String key)
withKey in class GenericObjectRequestpublic PutSuperObjectRequest withBucketName(String bucketName)
withBucketName in class GenericBucketRequestpublic PutSuperObjectRequest withRequestCredentials(BceCredentials credentials)
withRequestCredentials in class AbstractBceRequestpublic File getFile()
public void setFile(File file)
file - The path and name of the file containing the data to be uploaded to Baidu Bos.public PutSuperObjectRequest withFile(File file)
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.public int getnThreads()
public void setnThreads(int nThreads)
public PutSuperObjectRequest withnThreads(int nThreads)
public AtomicBoolean getIsSuperObjectUploadCanced()
public void setIsSuperObjectUploadCanced(AtomicBoolean isSuperObjectUploadCanced)
public PutSuperObjectRequest withIsSuperObjectUploadCanced(AtomicBoolean isSuperObjectUploadCanced)
public String getUploadId()
public void setUploadId(String uploadId)
public PutSuperObjectRequest withUploadId(String uploadId)
public ObjectMetadata getObjectMetadata()
public void setObjectMetadata(ObjectMetadata objectMetadata)
objectMetadata - Additional information about the new object being created,
such as content type, content encoding, user metadata, etc.Copyright © 2022. All rights reserved.