作者:黄于諭春琪 | 来源:互联网 | 2023-09-18 18:30
本文整理了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));
}