public class PartitionRegionImpl extends java.lang.Object implements RegionImpl
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
DNS_SUFFIX |
private java.util.Map<java.lang.String,Endpoint> |
endpointCache
endpoint cache for a service.
|
private Partition |
partition
partition where the region is present.
|
private java.lang.String |
region
the name of the region.
|
private static java.lang.String |
REGION |
private static java.lang.String |
SERVICE |
Constructor and Description |
---|
PartitionRegionImpl(java.lang.String region,
Partition p) |
Modifier and Type | Method and Description |
---|---|
private Endpoint |
computeEndpoint(java.lang.String serviceName) |
java.util.Collection<java.lang.String> |
getAvailableEndpoints()
Returns an immutable collection of all the endpoints available in the
region
metadata.
|
java.lang.String |
getDomain()
Returns the domain for this region; ex: "amazonaws.com".
|
private Endpoint |
getEndpoint(java.lang.String serviceName)
Returns the endpoint configuration for a given service.
|
private java.lang.String |
getEndpointString(java.lang.String serviceName,
Endpoint endpoint) |
java.lang.String |
getName()
The unique system ID for this region; ex: "us-east-1".
|
java.lang.String |
getPartition()
Returns the partition this region is in.
|
java.lang.String |
getServiceEndpoint(java.lang.String serviceName)
Returns the endpoint for the given service.
|
boolean |
hasHttpEndpoint(java.lang.String serviceName)
Returns true if the service is explicitly enabled for http in this
region or a service is partition wide enabled.
|
boolean |
hasHttpsEndpoint(java.lang.String serviceName)
Returns true if the service is explicitly enabled for https in this
region or a service is partition wide enabled.
|
private boolean |
isServicePartitionWide(java.lang.String serviceName) |
boolean |
isServiceSupported(java.lang.String serviceName)
Returns true if the service is explicitly enabled for a region or a
service is partition wide enabled.
|
private boolean |
isServiceSupportedInRegion(java.lang.String serviceName)
This method returns true only if the metadata for the service contains the given
region in the list of supported regions.
|
private static final java.lang.String SERVICE
private static final java.lang.String REGION
private static final java.lang.String DNS_SUFFIX
private final Partition partition
private final java.lang.String region
private final java.util.Map<java.lang.String,Endpoint> endpointCache
public PartitionRegionImpl(java.lang.String region, Partition p)
public java.lang.String getName()
RegionImpl
getName
in interface RegionImpl
public java.lang.String getDomain()
RegionImpl
getDomain
in interface RegionImpl
public java.lang.String getPartition()
RegionImpl
getPartition
in interface RegionImpl
public java.lang.String getServiceEndpoint(java.lang.String serviceName)
getServiceEndpoint
in interface RegionImpl
ServiceAbbreviations
private Endpoint getEndpoint(java.lang.String serviceName)
private Endpoint computeEndpoint(java.lang.String serviceName)
private java.lang.String getEndpointString(java.lang.String serviceName, Endpoint endpoint)
public boolean isServiceSupported(java.lang.String serviceName)
isServiceSupported
in interface RegionImpl
ServiceAbbreviations
private boolean isServiceSupportedInRegion(java.lang.String serviceName)
private boolean isServicePartitionWide(java.lang.String serviceName)
public boolean hasHttpsEndpoint(java.lang.String serviceName)
hasHttpsEndpoint
in interface RegionImpl
ServiceAbbreviations
public boolean hasHttpEndpoint(java.lang.String serviceName)
hasHttpEndpoint
in interface RegionImpl
ServiceAbbreviations
public java.util.Collection<java.lang.String> getAvailableEndpoints()
RegionImpl
getAvailableEndpoints
in interface RegionImpl