Esempio n. 1
0
 @Override
 public void deleteObject(String container, String object, Config config) {
   super.deleteObject(container, object, config);
   try {
     client.deleteObject(container, object);
   } catch (AmazonS3Exception awse) {
     if (awse.getStatusCode() != HttpStatus.SC_NOT_FOUND) {
       throw new StorageException(awse);
     }
   } catch (Exception e) {
     throw new StorageException(e);
   }
 }
Esempio n. 2
0
 @Override
 public void deleteContainer(String container, Config config) {
   super.deleteContainer(container, config);
   try {
     if (client.doesBucketExist(container)) {
       client.deleteBucket(container);
     }
   } catch (AmazonS3Exception awse) {
     if (awse.getStatusCode() != HttpStatus.SC_NOT_FOUND) {
       throw new StorageException(awse);
     }
   } catch (Exception e) {
     throw new StorageException(e);
   }
 }