Codota Logo
RegionEndpointCache
Code IndexAdd Codota to your IDE (free)

How to use
RegionEndpointCache
in
org.jets3t.service.impl.rest.httpclient

Best Java code snippets using org.jets3t.service.impl.rest.httpclient.RegionEndpointCache (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: iterate-ch/cyberduck

  @Override
  public HttpUriRequest getRedirect(final HttpRequest request, final HttpResponse response, final HttpContext context) throws ProtocolException {
    if(response.containsHeader("x-amz-bucket-region")) {
      final String host = ((HttpUriRequest) request).getURI().getHost();
      if(!StringUtils.equals(session.getHost().getHostname(), host)) {
        regionEndpointCache.putRegionForBucketName(
          StringUtils.split(StringUtils.removeEnd(((HttpUriRequest) request).getURI().getHost(), session.getHost().getHostname()), ".")[0],
          response.getFirstHeader("x-amz-bucket-region").getValue());
      }
    }
    return super.getRedirect(request, response, context);
  }
});
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * Constructs the service and initialises the properties.
 *
 * @param credentials                    the S3 user credentials to use when communicating with S3, may be null in which case the
 *                                       communication is done as an anonymous user.
 * @param invokingApplicationDescription a short description of the application using the service, suitable for inclusion in a
 *                                       user agent string for REST/HTTP requests. Ideally this would include the application's
 *                                       version number, for example: <code>Cockpit/0.7.3</code> or <code>My App Name/1.0</code>
 * @param credentialsProvider            an implementation of the HttpClient CredentialsProvider interface, to provide a means for
 *                                       prompting for credentials when necessary.
 * @param jets3tProperties               JetS3t properties that will be applied within this service.
 */
public RestStorageService(ProviderCredentials credentials, String invokingApplicationDescription,
             CredentialsProvider credentialsProvider, Jets3tProperties jets3tProperties) {
  super(credentials, invokingApplicationDescription, jets3tProperties);
  this.credentialsProvider = credentialsProvider;
  this.defaultStorageClass = getJetS3tProperties().getStringProperty(
      "s3service.default-storage-class", null);
  this.defaultServerSideEncryptionAlgorithm = getJetS3tProperties().getStringProperty(
      "s3service.server-side-encryption", null);
  this.regionEndpointCache = new RegionEndpointCache();
}
origin: net.java.dev.jets3t/jets3t

&& this.regionEndpointCache.containsRegionForBucketName(
  requestBucketName)))
this.regionEndpointCache.putRegionForBucketName(
  requestBucketName, region);
region = this.regionEndpointCache.getRegionForBucketName(
  requestBucketName);
origin: iterate-ch/cyberduck

if(session.getClient().getRegionEndpointCache().containsRegionForBucketName(containerService.getContainer(file).getName())) {
  region = session.getClient().getRegionEndpointCache()
    .getRegionForBucketName(containerService.getContainer(file).getName());
origin: iterate-ch/cyberduck

final String bucket = containerService.getContainer(file).getName();
session.getClient().deleteBucket(bucket);
session.getClient().getRegionEndpointCache().removeRegionForBucketName(bucket);
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

&& this.regionEndpointCache.containsRegionForBucketName(
  requestBucketName)))
this.regionEndpointCache.putRegionForBucketName(
  requestBucketName, region);
region = this.regionEndpointCache.getRegionForBucketName(
  requestBucketName);
origin: iterate-ch/cyberduck

final String bucket = containerService.getContainer(file).getName();
session.getClient().deleteBucket(bucket);
session.getClient().getRegionEndpointCache().removeRegionForBucketName(bucket);
origin: iterate-ch/cyberduck

  return unknown;
if(cache.containsRegionForBucketName(container.getName())) {
  return new S3Region(cache.getRegionForBucketName(container.getName()));
  cache.putRegionForBucketName(container.getName(), region.getIdentifier());
  return region;
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

String bucketName = ServiceUtils.findBucketNameInHostOrPath(
  originalURI, this.getEndpoint());
this.regionEndpointCache.putRegionForBucketName(
  bucketName, expectedRegion);
origin: net.java.dev.jets3t/jets3t

/**
 * Constructs the service and initialises the properties.
 *
 * @param credentials                    the S3 user credentials to use when communicating with S3, may be null in which case the
 *                                       communication is done as an anonymous user.
 * @param invokingApplicationDescription a short description of the application using the service, suitable for inclusion in a
 *                                       user agent string for REST/HTTP requests. Ideally this would include the application's
 *                                       version number, for example: <code>Cockpit/0.7.3</code> or <code>My App Name/1.0</code>
 * @param credentialsProvider            an implementation of the HttpClient CredentialsProvider interface, to provide a means for
 *                                       prompting for credentials when necessary.
 * @param jets3tProperties               JetS3t properties that will be applied within this service.
 */
public RestStorageService(ProviderCredentials credentials, String invokingApplicationDescription,
             CredentialsProvider credentialsProvider, Jets3tProperties jets3tProperties) {
  super(credentials, invokingApplicationDescription, jets3tProperties);
  this.credentialsProvider = credentialsProvider;
  this.defaultStorageClass = getJetS3tProperties().getStringProperty(
      "s3service.default-storage-class", null);
  this.defaultServerSideEncryptionAlgorithm = getJetS3tProperties().getStringProperty(
      "s3service.server-side-encryption", null);
  this.regionEndpointCache = new RegionEndpointCache();
}
origin: net.java.dev.jets3t/jets3t

String bucketName = ServiceUtils.findBucketNameInHostOrPath(
  originalURI, this.getEndpoint());
this.regionEndpointCache.putRegionForBucketName(
  bucketName, expectedRegion);
org.jets3t.service.impl.rest.httpclientRegionEndpointCache

Javadoc

Cache to store mappings from a bucket name to a region, used to help with request signing for AWS version 4 requests where you need to know a bucket's region before you can correctly sign requests that operate on that bucket.

Most used methods

  • containsRegionForBucketName
  • getRegionForBucketName
  • putRegionForBucketName
  • <init>
  • removeRegionForBucketName

Popular in Java

  • Running tasks concurrently on multiple threads
  • startActivity (Activity)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • onRequestPermissionsResult (Fragment)
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Notification (javax.management)
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JOptionPane (javax.swing)
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now