热门标签 | 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));
}

推荐阅读
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社区 版权所有