com.emc.object.s3.jersey.S3JerseyClient Java Examples
The following examples show how to use
com.emc.object.s3.jersey.S3JerseyClient.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ServiceInstanceBindingRepository.java From ecs-cf-service-broker with Apache License 2.0 | 6 votes |
@PostConstruct public void initialize() throws EcsManagementClientException, EcsManagementResourceNotFoundException, URISyntaxException { S3Config s3Config = new S3Config( new URI(broker.getRepositoryEndpoint())); s3Config.withIdentity(broker.getPrefixedUserName()) .withSecretKey(broker.getRepositorySecret()); this.s3 = new S3JerseyClient(s3Config); this.bucket = broker.getPrefixedBucketName(); // NOTE -- ideally we would not need this code, but for now, the VolumeMount class has // custom serialization that is not matched with corresponding deserialization, so // deserializing serialized volume mounts doesn't work OOTB. SimpleModule module = new SimpleModule(); module.addDeserializer(VolumeMount.DeviceType.class, new DeviceTypeDeserializer()); module.addDeserializer(VolumeMount.Mode.class, new ModeDeserializer()); module.addDeserializer(VolumeDevice.class, new VolumeDeviceDeserializer()); objectMapper.registerModule(module); }
Example #2
Source File: ExtendedS3IntegrationTest.java From pravega with Apache License 2.0 | 5 votes |
@Override public Storage createStorageAdapter() { URI uri = URI.create(s3ConfigUri); S3Config s3Config = new S3Config(uri); s3Config = s3Config .withRetryEnabled(false) .withInitialRetryDelay(1) .withProperty("com.sun.jersey.client.property.connectTimeout", 100); S3JerseyClient client = new S3ClientWrapper(s3Config, filesystemS3); return new AsyncStorageWrapper(new RollingStorage(new ExtendedS3Storage(client, config)), this.storageExecutor); }
Example #3
Source File: BucketWipeFactory.java From ecs-cf-service-broker with Apache License 2.0 | 5 votes |
public BucketWipeOperations getBucketWipe(BrokerConfig broker) throws URISyntaxException { S3Config s3Config = new S3Config(new URI(broker.getRepositoryEndpoint())); s3Config.withIdentity(broker.getPrefixedUserName()) .withSecretKey(broker.getRepositorySecret()); return new BucketWipeOperations(new S3JerseyClient(s3Config)); }
Example #4
Source File: ExtendedS3StorageFactory.java From pravega with Apache License 2.0 | 4 votes |
private ExtendedS3Storage createS3Storage() { S3JerseyClient client = new S3JerseyClient(config.getS3Config()); return new ExtendedS3Storage(client, this.config); }
Example #5
Source File: ServiceInstanceRepository.java From ecs-cf-service-broker with Apache License 2.0 | 4 votes |
@PostConstruct public void initialize() throws URISyntaxException { logger.info(format("Creating S3 config with repository endpoint %s", broker.getRepositoryEndpoint())); S3Config s3Config = new S3Config(new URI(broker.getRepositoryEndpoint())); logger.debug(format("Created S3 config %s", s3Config)); s3Config.withIdentity(broker.getPrefixedUserName()).withSecretKey(broker.getRepositorySecret()); this.s3 = new S3JerseyClient(s3Config, new URLConnectionClientHandler()); logger.debug(format("JerseyClient S3 config %s", this.s3.getS3Config())); this.bucket = broker.getPrefixedBucketName(); logger.info("Service repository bucket name: {}", this.bucket); }