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

com.amazonaws.services.dynamodbv2.model.UpdateItemRequest.withRequestMetricCollector()方法的使用及代码示例

本文整理了Java中com.amazonaws.services.dynamodbv2.model.UpdateItemRequest.withRequestMetricCollec

本文整理了Java中com.amazonaws.services.dynamodbv2.model.UpdateItemRequest.withRequestMetricCollector()方法的一些代码示例,展示了UpdateItemRequest.withRequestMetricCollector()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UpdateItemRequest.withRequestMetricCollector()方法的具体详情如下:
包路径:com.amazonaws.services.dynamodbv2.model.UpdateItemRequest
类名称:UpdateItemRequest
方法名:withRequestMetricCollector

UpdateItemRequest.withRequestMetricCollector介绍

暂无

代码示例

代码示例来源:origin: aws/aws-sdk-java

/**
* Save the item using a UpdateItem request. The handler will call this
* method if
*


    *
  • CLOBBER configuration is not being used;
    *
  • AND the item does not contain auto-generated key value;
    *

*


* The ReturnedValues parameter for the UpdateItem request is set as
* ALL_NEW, which means the service should return all of the attributes
* of the new version of the item after the update. The handler will use
* the returned attributes to detect silent failure on the server-side.
*/
protected UpdateItemResult doUpdateItem() {
UpdateItemRequest req = new UpdateItemRequest()
.withTableName(getTableName())
.withKey(getPrimaryKeyAttributeValues())
.withAttributeUpdates(
transformAttributeUpdates(
this.clazz,
getTableName(),
getPrimaryKeyAttributeValues(),
getAttributeValueUpdates(),
saveConfig))
.withExpected(mergeExpectedAttributeValueConditions())
.withConditionalOperator(userProvidedConditionOperator)
.withReturnValues(ReturnValue.ALL_NEW)
.withRequestMetricCollector(saveConfig.getRequestMetricCollector());
return db.updateItem(applyUserAgent(req));
}

代码示例来源:origin: aws-amplify/aws-sdk-android

/**
* Save the item using a UpdateItem request. The handler will call this
* method if
*


    *
  • CLOBBER configuration is not being used;
    *
  • AND the item does not contain auto-generated key value;
    *

*


* The ReturnedValues parameter for the UpdateItem request is set as
* ALL_NEW, which means the service should return all of the attributes
* of the new version of the item after the update. The handler will use
* the returned attributes to detect silent failure on the server-side.
*/
protected UpdateItemResult doUpdateItem() {
final UpdateItemRequest req = new UpdateItemRequest()
.withTableName(getTableName())
.withKey(getKeyAttributeValues())
.withAttributeUpdates(
transformAttributeUpdates(
this.clazz,
getTableName(),
getKeyAttributeValues(),
getAttributeValueUpdates(),
saveConfig))
.withExpected(mergeExpectedAttributeValueConditions())
.withConditionalOperator(userProvidedConditionOperator)
.withReturnValues(ReturnValue.ALL_NEW)
.withRequestMetricCollector(saveConfig.getRequestMetricCollector());
return db.updateItem(applyUserAgent(req));
}

代码示例来源:origin: com.amazonaws/aws-java-sdk-dynamodb

/**
* Save the item using a UpdateItem request. The handler will call this
* method if
*


    *
  • CLOBBER configuration is not being used;
    *
  • AND the item does not contain auto-generated key value;
    *

*


* The ReturnedValues parameter for the UpdateItem request is set as
* ALL_NEW, which means the service should return all of the attributes
* of the new version of the item after the update. The handler will use
* the returned attributes to detect silent failure on the server-side.
*/
protected UpdateItemResult doUpdateItem() {
UpdateItemRequest req = new UpdateItemRequest()
.withTableName(getTableName())
.withKey(getPrimaryKeyAttributeValues())
.withAttributeUpdates(
transformAttributeUpdates(
this.clazz,
getTableName(),
getPrimaryKeyAttributeValues(),
getAttributeValueUpdates(),
saveConfig))
.withExpected(mergeExpectedAttributeValueConditions())
.withConditionalOperator(userProvidedConditionOperator)
.withReturnValues(ReturnValue.ALL_NEW)
.withRequestMetricCollector(saveConfig.getRequestMetricCollector());
return db.updateItem(applyUserAgent(req));
}

推荐阅读
  • 在Android开发中,使用Picasso库可以实现对网络图片的等比例缩放。本文介绍了使用Picasso库进行图片缩放的方法,并提供了具体的代码实现。通过获取图片的宽高,计算目标宽度和高度,并创建新图实现等比例缩放。 ... [详细]
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • FeatureRequestIsyourfeaturerequestrelatedtoaproblem?Please ... [详细]
  • Imtryingtofigureoutawaytogeneratetorrentfilesfromabucket,usingtheAWSSDKforGo.我正 ... [详细]
  • iOS超签签名服务器搭建及其优劣势
    本文介绍了搭建iOS超签签名服务器的原因和优势,包括不掉签、用户可以直接安装不需要信任、体验好等。同时也提到了超签的劣势,即一个证书只能安装100个,成本较高。文章还详细介绍了超签的实现原理,包括用户请求服务器安装mobileconfig文件、服务器调用苹果接口添加udid等步骤。最后,还提到了生成mobileconfig文件和导出AppleWorldwideDeveloperRelationsCertificationAuthority证书的方法。 ... [详细]
  • WPF之Binding初探
      初学wpf,经常被Binding搞晕,以下记录写Binding的基础。首先,盗用张图。这图形象的说明了Binding的机理。对于Binding,意思是数据绑定,基本用法是:1、 ... [详细]
  • 本文整理了Java中org.apache.pig.backend.executionengine.ExecException.<init>()方法的一些代码 ... [详细]
  • KVC:Key-valuecodingisamechanismforindirectlyaccessinganobject’sattributesandrelations ... [详细]
  • Linux服务器密码过期策略、登录次数限制、私钥登录等配置方法
    本文介绍了在Linux服务器上进行密码过期策略、登录次数限制、私钥登录等配置的方法。通过修改配置文件中的参数,可以设置密码的有效期、最小间隔时间、最小长度,并在密码过期前进行提示。同时还介绍了如何进行公钥登录和修改默认账户用户名的操作。详细步骤和注意事项可参考本文内容。 ... [详细]
  • 深入理解Kafka服务端请求队列中请求的处理
    本文深入分析了Kafka服务端请求队列中请求的处理过程,详细介绍了请求的封装和放入请求队列的过程,以及处理请求的线程池的创建和容量设置。通过场景分析、图示说明和源码分析,帮助读者更好地理解Kafka服务端的工作原理。 ... [详细]
  • 解决nginx启动报错epoll_wait() reported that client prematurely closed connection的方法
    本文介绍了解决nginx启动报错epoll_wait() reported that client prematurely closed connection的方法,包括检查location配置是否正确、pass_proxy是否需要加“/”等。同时,还介绍了修改nginx的error.log日志级别为debug,以便查看详细日志信息。 ... [详细]
  • JDK源码学习之HashTable(附带面试题)的学习笔记
    本文介绍了JDK源码学习之HashTable(附带面试题)的学习笔记,包括HashTable的定义、数据类型、与HashMap的关系和区别。文章提供了干货,并附带了其他相关主题的学习笔记。 ... [详细]
  • 本文讨论了如何在codeigniter中识别来自angularjs的请求,并提供了两种方法的代码示例。作者尝试了$this->input->is_ajax_request()和自定义函数is_ajax(),但都没有成功。最后,作者展示了一个ajax请求的示例代码。 ... [详细]
  • Whatsthedifferencebetweento_aandto_ary?to_a和to_ary有什么区别? ... [详细]
  • Vagrant虚拟化工具的安装和使用教程
    本文介绍了Vagrant虚拟化工具的安装和使用教程。首先介绍了安装virtualBox和Vagrant的步骤。然后详细说明了Vagrant的安装和使用方法,包括如何检查安装是否成功。最后介绍了下载虚拟机镜像的步骤,以及Vagrant镜像网站的相关信息。 ... [详细]
author-avatar
黄于諭春琪
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有