热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

com.amazonaws.regions.RegionUtils.initSDKRegions()方法的使用及代码示例

本文整理了Java中com.amazonaws.regions.RegionUtils.initSDKRegions方法的一些代码示例,展示了RegionU

本文整理了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.");
}
}

推荐阅读
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • 本文介绍了Android 7的学习笔记总结,包括最新的移动架构视频、大厂安卓面试真题和项目实战源码讲义。同时还分享了开源的完整内容,并提醒读者在使用FileProvider适配时要注意不同模块的AndroidManfiest.xml中配置的xml文件名必须不同,否则会出现问题。 ... [详细]
  • 微软头条实习生分享深度学习自学指南
    本文介绍了一位微软头条实习生自学深度学习的经验分享,包括学习资源推荐、重要基础知识的学习要点等。作者强调了学好Python和数学基础的重要性,并提供了一些建议。 ... [详细]
  • baresip android编译、运行教程1语音通话
    本文介绍了如何在安卓平台上编译和运行baresip android,包括下载相关的sdk和ndk,修改ndk路径和输出目录,以及创建一个c++的安卓工程并将目录考到cpp下。详细步骤可参考给出的链接和文档。 ... [详细]
  • intellij idea的安装与使用(保姆级教程)
    intellijidea的安装与使用(保姆级教程)IntelliJ在业界被公认为最好的java开发工具,尤其在智能代码助手、代码自动提示、重构、JavaEE支持、各类版本工具(gi ... [详细]
  • 先看官方文档TheJavaTutorialshavebeenwrittenforJDK8.Examplesandpracticesdescribedinthispagedontta ... [详细]
  • Android自定义控件绘图篇之Paint函数大汇总
    本文介绍了Android自定义控件绘图篇中的Paint函数大汇总,包括重置画笔、设置颜色、设置透明度、设置样式、设置宽度、设置抗锯齿等功能。通过学习这些函数,可以更好地掌握Paint的用法。 ... [详细]
  • Iamtryingtomakeaclassthatwillreadatextfileofnamesintoanarray,thenreturnthatarra ... [详细]
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • 本文讨论了一个关于cuowu类的问题,作者在使用cuowu类时遇到了错误提示和使用AdjustmentListener的问题。文章提供了16个解决方案,并给出了两个可能导致错误的原因。 ... [详细]
  • 推荐系统遇上深度学习(十七)详解推荐系统中的常用评测指标
    原创:石晓文小小挖掘机2018-06-18笔者是一个痴迷于挖掘数据中的价值的学习人,希望在平日的工作学习中,挖掘数据的价值, ... [详细]
  • sklearn数据集库中的常用数据集类型介绍
    本文介绍了sklearn数据集库中常用的数据集类型,包括玩具数据集和样本生成器。其中详细介绍了波士顿房价数据集,包含了波士顿506处房屋的13种不同特征以及房屋价格,适用于回归任务。 ... [详细]
  • Google Play推出全新的应用内评价API,帮助开发者获取更多优质用户反馈。用户每天在Google Play上发表数百万条评论,这有助于开发者了解用户喜好和改进需求。开发者可以选择在适当的时间请求用户撰写评论,以获得全面而有用的反馈。全新应用内评价功能让用户无需返回应用详情页面即可发表评论,提升用户体验。 ... [详细]
  • 本文讨论了在openwrt-17.01版本中,mt7628设备上初始化启动时eth0的mac地址总是随机生成的问题。每次随机生成的eth0的mac地址都会写到/sys/class/net/eth0/address目录下,而openwrt-17.01原版的SDK会根据随机生成的eth0的mac地址再生成eth0.1、eth0.2等,生成后的mac地址会保存在/etc/config/network下。 ... [详细]
  • 本文介绍了如何在Azure应用服务实例上获取.NetCore 3.0+的支持。作者分享了自己在将代码升级为使用.NET Core 3.0时遇到的问题,并提供了解决方法。文章还介绍了在部署过程中使用Kudu构建的方法,并指出了可能出现的错误。此外,还介绍了开发者应用服务计划和免费产品应用服务计划在不同地区的运行情况。最后,文章指出了当前的.NET SDK不支持目标为.NET Core 3.0的问题,并提供了解决方案。 ... [详细]
author-avatar
fangsi155_7827d9
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有