Search in sources :

Example 6 with RemoteObjectReference

use of com.instaclustr.esop.impl.RemoteObjectReference in project esop by instaclustr.

the class AzureRestorer method delete.

@Override
public void delete(Path objectKey, boolean nodeAware) throws Exception {
    RemoteObjectReference remoteObjectReference;
    if (nodeAware) {
        remoteObjectReference = objectKeyToNodeAwareRemoteReference(objectKey);
    } else {
        remoteObjectReference = objectKeyToRemoteReference(objectKey);
    }
    logger.info("Non dry: " + Paths.get(request.storageLocation.bucket, remoteObjectReference.canonicalPath));
    ((AzureRemoteObjectReference) remoteObjectReference).blob.delete();
}
Also used : RemoteObjectReference(com.instaclustr.esop.impl.RemoteObjectReference)

Aggregations

RemoteObjectReference (com.instaclustr.esop.impl.RemoteObjectReference)6 Path (java.nio.file.Path)3 DeleteObjectRequest (com.amazonaws.services.s3.model.DeleteObjectRequest)2 AmazonClientException (com.amazonaws.AmazonClientException)1 AmazonServiceException (com.amazonaws.AmazonServiceException)1 ProgressEvent (com.amazonaws.event.ProgressEvent)1 ProgressEventType (com.amazonaws.event.ProgressEventType)1 AmazonS3 (com.amazonaws.services.s3.AmazonS3)1 DeleteObjectsRequest (com.amazonaws.services.s3.model.DeleteObjectsRequest)1 GetObjectRequest (com.amazonaws.services.s3.model.GetObjectRequest)1 ObjectListing (com.amazonaws.services.s3.model.ObjectListing)1 S3Object (com.amazonaws.services.s3.model.S3Object)1 S3ObjectSummary (com.amazonaws.services.s3.model.S3ObjectSummary)1 PersistableTransfer (com.amazonaws.services.s3.transfer.PersistableTransfer)1 TransferManager (com.amazonaws.services.s3.transfer.TransferManager)1 S3ProgressListener (com.amazonaws.services.s3.transfer.internal.S3ProgressListener)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 CharStreams (com.google.common.io.CharStreams)1 Manifest (com.instaclustr.esop.impl.Manifest)1 ManifestEntry (com.instaclustr.esop.impl.ManifestEntry)1