@Override public void configure(final boolean enable, final Path file) throws BackgroundException { delegate.configure(enable, vault.encrypt(session, file)); }
@Override public void configure(final boolean enable, final Path file) throws BackgroundException { registry.find(session, file).getFeature(session, TransferAcceleration.class, proxy).configure(enable, file); }
private void configure(final Map<TransferItem, TransferStatus> files, final ConnectionCallback callback, final boolean enabled) throws BackgroundException { final Set<Path> buckets = new HashSet<>(); for(TransferItem file : files.keySet()) { buckets.add(new S3PathContainerService().getContainer(file.remote)); } for(Path bucket : buckets) { if(enabled) { try { if(this.accelerate(bucket, callback)) { if(log.isInfoEnabled()) { log.info(String.format("Tunnel upload for file %s through accelerated endpoint %s", bucket, accelerationService)); } accelerationService.configure(true, bucket); break; } else { log.warn(String.format("Transfer acceleration disabled for %s", bucket)); } } catch(AccessDeniedException e) { log.warn(String.format("Ignore failure reading S3 accelerate configuration. %s", e.getMessage())); } } else { accelerationService.configure(false, bucket); } } }