com.netflix.discovery
Interface AzToRegionMapper

All Known Implementing Classes:
AbstractAzToRegionMapper, DNSBasedAzToRegionMapper, PropertyBasedAzToRegionMapper

public interface AzToRegionMapper

An interface that contains a contract of mapping availability zone to region mapping. An implementation will always know before hand which zone to region mapping will be queried from the mapper, this will aid caching of this information before hand.


Method Summary
 java.lang.String getRegionForAvailabilityZone(java.lang.String availabilityZone)
          Returns the region for the passed 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.
 

Method Detail

getRegionForAvailabilityZone

java.lang.String getRegionForAvailabilityZone(java.lang.String availabilityZone)
Returns the region for the passed availability zone.

Parameters:
availabilityZone - Availability zone for which the region is to be retrieved.
Returns:
The region for the passed zone.

setRegionsToFetch

void setRegionsToFetch(java.lang.String[] regionsToFetch)
Update the regions that this mapper knows about.

Parameters:
regionsToFetch - Regions to fetch. This should be the super set of all regions that this mapper should know.

refreshMapping

void refreshMapping()
Updates the mappings it has if they depend on an external source.