Class MetadataUtil

java.lang.Object
com.hazelcast.aws.utility.MetadataUtil

public final class MetadataUtil
extends Object
  • Field Details

  • Method Details

    • retrieveMetadataFromURI

      public static String retrieveMetadataFromURI​(String uri, int timeoutInSeconds)
      Performs the HTTP request to retrieve AWS Instance Metadata from the given URI.
      Parameters:
      uri - the full URI where a `GET` request will retrieve the metadata information, represented as JSON.
      timeoutInSeconds - timeout for the AWS service call
      Returns:
      The content of the HTTP response, as a String. NOTE: This is NEVER null.
    • retrieveMetadataFromURI

      public static String retrieveMetadataFromURI​(String uri, int timeoutInSeconds, int retries)
      Performs the HTTP request to retrieve AWS Instance Metadata from the given URI.
      Parameters:
      uri - the full URI where a `GET` request will retrieve the metadata information, represented as JSON.
      timeoutInSeconds - timeout for the AWS service call
      retries - number of retries in case the AWS request fails
      Returns:
      The content of the HTTP response, as a String. NOTE: This is NEVER null.
    • getAvailabilityZone

      public static String getAvailabilityZone​(int connectionTimeoutSeconds, int connectionRetries)