Package com.emc.object.s3.request
Class DeleteBucketRequest
- java.lang.Object
-
- com.emc.object.ObjectRequest
-
- com.emc.object.s3.request.AbstractBucketRequest
-
- com.emc.object.s3.request.GenericBucketRequest
-
- com.emc.object.s3.request.DeleteBucketRequest
-
public class DeleteBucketRequest extends GenericBucketRequest
-
-
Constructor Summary
Constructors Constructor Description DeleteBucketRequest(java.lang.String bucketName)
DeleteBucketRequest(java.lang.String bucketName, boolean recursivelyDeleteAllData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.util.List<java.lang.Object>>
getHeaders()
Override to return request-specific headers based on properties of the request.boolean
isRecursivelyDeleteAllData()
It is the trigger to use the new bucket deletion feature.void
setRecursivelyDeleteAllData(boolean recursivelyDeleteAllData)
DeleteBucketRequest
withRecursivelyDeleteAllData(boolean recursivelyDeleteAllData)
-
Methods inherited from class com.emc.object.s3.request.AbstractBucketRequest
getBucketName, setBucketName
-
Methods inherited from class com.emc.object.ObjectRequest
addCustomHeader, getCustomHeaders, getMethod, getNamespace, getPath, getProperties, getQueryParams, getQueryString, getRawQueryString, getSubresource, property, setNamespace, setPath
-
-
-
-
Method Detail
-
getHeaders
public java.util.Map<java.lang.String,java.util.List<java.lang.Object>> getHeaders()
Description copied from class:ObjectRequest
Override to return request-specific headers based on properties of the request. Always call super() first and modify the result.- Overrides:
getHeaders
in classObjectRequest
-
isRecursivelyDeleteAllData
public boolean isRecursivelyDeleteAllData()
It is the trigger to use the new bucket deletion feature. The current delete operation is a synchronous operation, when recursivelyDeleteAllData is default set to false.. When recursivelyDeleteAllData comes to true, the request becomes asynchronous and will return immediately. The bucket will be marked as "delete in progress". The bucket will be read-only through S3 and will not allow reads/writes through NFS (for FS bucket). Background tasks will be initiated across all of the associated zones and tables to remove objects/versions associated with the buckets. Once all tasks have completed the bucket will be deleted from the system. It must be noted that the issue of object lock and governance must not be overlooked for such an operation. It must be noted that the operation will delete all objects and data in the bucket and it cannot be undone. It is only supported on ECS version 3.8 or above.
-
setRecursivelyDeleteAllData
public void setRecursivelyDeleteAllData(boolean recursivelyDeleteAllData)
-
withRecursivelyDeleteAllData
public DeleteBucketRequest withRecursivelyDeleteAllData(boolean recursivelyDeleteAllData)
-
-