作者:fangsi155_7827d9 | 来源:互联网 | 2023-09-15 16:18
本文整理了Java中com.amazonaws.regions.RegionUtils.initSDKRegions
方法的一些代码示例,展示了RegionUtils.initSDKRegions
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RegionUtils.initSDKRegions
方法的具体详情如下:
包路径:com.amazonaws.regions.RegionUtils
类名称:RegionUtils
方法名:initSDKRegions
RegionUtils.initSDKRegions介绍
[英]Failsafe method to initialize the regions list from the list bundled with the SDK, in case it cannot be fetched from the remote source.
[中]故障保护方法,用于从SDK绑定的列表中初始化区域列表,以防无法从远程源获取。
代码示例
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* There is no need to call this method, it is public only for
* Compatibility. Every regions method makes sure this method has already
* been called. This method will load the regions (specified by the
* developer if the system property
* SDKGlobalConfiguraiton.REGIONS_FILE_OVERRIDE_SYSTEM_PROPERTY is set, or
* the defaults shipped with the SDK) into memory.
*/
public static synchronized void init() {
if (System.getProperty(REGIONS_FILE_OVERRIDE_SYSTEM_PROPERTY) != null) {
try {
loadRegionsFromOverrideFile();
} catch (FileNotFoundException e) {
throw new RuntimeException("Couldn't find regions override file specified", e);
}
}
// Fall back onto the version we ship with the SDK
if (regiOns== null) {
initSDKRegions();
}
// Throw out RuntimeException explicitly
if (regiOns== null) {
throw new RuntimeException("Failed to initialize the regions.");
}
}
代码示例来源:origin: com.gluonhq/aws-java-sdk-core
/**
* There is no need to call this method, it is public only for
* Compatibility. Every regions method makes sure this method has already
* been called. This method will load the regions (specified by the
* developer if the system property
* SDKGlobalConfiguraiton.REGIONS_FILE_OVERRIDE_SYSTEM_PROPERTY is set, or
* the defaults shipped with the SDK) into memory.
*/
public static synchronized void init() {
if (System.getProperty(REGIONS_FILE_OVERRIDE_SYSTEM_PROPERTY) != null) {
try {
loadRegionsFromOverrideFile();
} catch (FileNotFoundException e) {
throw new RuntimeException("Couldn't find regions override file specified", e);
}
}
// Fall back onto the version we ship with the SDK
if (regiOns== null) {
initSDKRegions();
}
// Throw out RuntimeException explicitly
if (regiOns== null) {
throw new RuntimeException("Failed to initialize the regions.");
}
}
代码示例来源:origin: com.amazonaws/aws-android-sdk-core
/**
* There is no need to call this method, it is public only for
* Compatibility. Every regions method makes sure this method has already
* been called. This method will load the regions (specified by the
* developer if the system property
* SDKGlobalConfiguraiton.REGIONS_FILE_OVERRIDE_SYSTEM_PROPERTY is set, or
* the defaults shipped with the SDK) into memory.
*/
public static synchronized void init() {
if (System.getProperty(REGIONS_FILE_OVERRIDE_SYSTEM_PROPERTY) != null) {
try {
loadRegionsFromOverrideFile();
} catch (FileNotFoundException e) {
throw new RuntimeException("Couldn't find regions override file specified", e);
}
}
// Fall back onto the version we ship with the SDK
if (regiOns== null) {
initSDKRegions();
}
// Throw out RuntimeException explicitly
if (regiOns== null) {
throw new RuntimeException("Failed to initialize the regions.");
}
}