class MultipartUploadCryptoContext extends MultipartUploadContext
Modifier and Type | Field and Description |
---|---|
private ContentCryptoMaterial |
cekMaterial |
private int |
partNumber
Can be used to enforce serial uploads.
|
private boolean |
partUploadInProgress
True if a multi-part upload is currently in progress; false otherwise.
|
Constructor and Description |
---|
MultipartUploadCryptoContext(java.lang.String bucketName,
java.lang.String key,
ContentCryptoMaterial cekMaterial) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
beginPartUpload(int nextPartNumber)
Can be used to check the next part number must either be the same (if it
was an retry) or increment by exactly 1 during a serial part uploads.
|
(package private) void |
endPartUpload()
Used to mark the completion of a part upload before the next.
|
(package private) CipherLite |
getCipherLite()
Convenient method to return the content encrypting cipher lite (which is
stateful) for the multi-part uploads.
|
(package private) ContentCryptoMaterial |
getContentCryptoMaterial()
Returns the content encrypting cryptographic material for the multi-part
uploads.
|
getBucketName, getKey, getMaterialsDescription, hasFinalPartBeenSeen, setHasFinalPartBeenSeen, setMaterialsDescription
private final ContentCryptoMaterial cekMaterial
private int partNumber
private volatile boolean partUploadInProgress
MultipartUploadCryptoContext(java.lang.String bucketName, java.lang.String key, ContentCryptoMaterial cekMaterial)
CipherLite getCipherLite()
ContentCryptoMaterial getContentCryptoMaterial()
void beginPartUpload(int nextPartNumber) throws AmazonClientException
As a side effect, the partUploadInProgress
will be set to true
upon successful completion of this method. Caller of this method is
responsible to call endPartUpload()
in a finally block once
the respective part-upload is completed (either normally or abruptly).
AmazonClientException
- if parallel part upload is detectedendPartUpload()
void endPartUpload()
beginPartUpload(int)
.beginPartUpload(int)