@Override public void createContainer(String container, Config config) { super.createContainer(container, config); try { if (!client.doesBucketExist(container)) { client.createBucket(container); } } catch (Exception e) { throw new StorageException(e); } }
@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); } }