Class AbstractAzToRegionMapper

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getRegionForAvailabilityZone​(java.lang.String availabilityZone)
      Returns the region for the passed availability zone.
      protected abstract java.util.Set<java.lang.String> getZonesForARegion​(java.lang.String region)
      Returns all the zones in the provided region.
      protected java.lang.String parseAzToGetRegion​(java.lang.String availabilityZone)
      Tries to determine what region we're in, based on the provided availability zone.
      void refreshMapping()
      Updates the mappings it has if they depend on an external source.
      void setRegionsToFetch​(java.lang.String[] regionsToFetch)
      Update the regions that this mapper knows about.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractAzToRegionMapper

        protected AbstractAzToRegionMapper​(EurekaClientConfig clientConfig)
    • Method Detail

      • setRegionsToFetch

        public void setRegionsToFetch​(java.lang.String[] regionsToFetch)
        Description copied from interface: AzToRegionMapper
        Update the regions that this mapper knows about.
        Specified by:
        setRegionsToFetch in interface AzToRegionMapper
        Parameters:
        regionsToFetch - Regions to fetch. This should be the super set of all regions that this mapper should know.
      • getZonesForARegion

        protected abstract java.util.Set<java.lang.String> getZonesForARegion​(java.lang.String region)
        Returns all the zones in the provided region.
        Parameters:
        region - the region whose zones you want
        Returns:
        a set of zones
      • getRegionForAvailabilityZone

        public java.lang.String getRegionForAvailabilityZone​(java.lang.String availabilityZone)
        Description copied from interface: AzToRegionMapper
        Returns the region for the passed availability zone.
        Specified by:
        getRegionForAvailabilityZone in interface AzToRegionMapper
        Parameters:
        availabilityZone - Availability zone for which the region is to be retrieved.
        Returns:
        The region for the passed zone.
      • parseAzToGetRegion

        protected java.lang.String parseAzToGetRegion​(java.lang.String availabilityZone)
        Tries to determine what region we're in, based on the provided availability zone.
        Parameters:
        availabilityZone - the availability zone to inspect
        Returns:
        the region, if available; null otherwise