Examples of UpdateItemRequest


Examples of com.amazonaws.services.dynamodbv2.model.UpdateItemRequest

                            }
                        }
                    }
                    if ( doUpdateItem ) {
                        /* Send an updateItem request. */
                        db.updateItem(applyUserAgent(new UpdateItemRequest()
                                .withTableName(getTableName())
                                .withKey(getKeyAttributeValues())
                                .withAttributeUpdates(
                                        transformAttributeUpdates(this.clazz,
                                                getKeyAttributeValues(), getAttributeValueUpdates()))
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.UpdateItemRequest

                            }
                        }
                    }
                    if ( doUpdateItem ) {
                        /* Send an updateItem request. */
                        db.updateItem(applyUserAgent(new UpdateItemRequest()
                                .withTableName(getTableName())
                                .withKey(getKeyAttributeValues())
                                .withAttributeUpdates(
                                        transformAttributeUpdates(this.clazz,
                                                getKeyAttributeValues(), getAttributeValueUpdates()))
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.UpdateItemRequest

                            }
                        }
                    }
                    if ( doUpdateItem ) {
                        /* Send an updateItem request. */
                        UpdateItemRequest req = new UpdateItemRequest()
                            .withTableName(getTableName())
                            .withKey(getKeyAttributeValues())
                            .withAttributeUpdates(
                                transformAttributeUpdates(this.clazz,
                                    getKeyAttributeValues(),
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.UpdateItemRequest

         * 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(getKeyAttributeValues())
                    .withAttributeUpdates(
                            transformAttributeUpdates(
                                    this.clazz,
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.UpdateItemRequest

    private String conditionExpression;
    private Map<String, String> nameMap;
    private Map<String, Object> valueMap;

    public UpdateItemSpec() {
        super(new UpdateItemRequest());
    }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.UpdateItemRequest

                            }
                        }
                    }
                    if ( doUpdateItem ) {
                        /* Send an updateItem request. */
                        db.updateItem(applyUserAgent(new UpdateItemRequest()
                                .withTableName(getTableName())
                                .withKey(getKeyAttributeValues())
                                .withAttributeUpdates(
                                        transformAttributeUpdates(
                                                this.clazz,
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.UpdateItemRequest

        if ( config.getSaveBehavior() == SaveBehavior.CLOBBER || forcePut ) {
            db.putItem(applyUserAgent(new PutItemRequest().withTableName(tableName)
                    .withItem(transformAttributes(clazz, convertToItem(updateValues)))
                    .withExpected(expectedValues)));
        } else {
            db.updateItem(applyUserAgent(new UpdateItemRequest().withTableName(tableName).withKey(key)
                    .withAttributeUpdates(transformAttributeUpdates(clazz, updateValues)).withExpected(expectedValues)));
        }

        /*
         * Finally, after the service call has succeeded, update the in-memory
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.UpdateItemRequest

        if (LOG.isDebugEnabled()) {
            LOG.debug("Renewing lease with key " + lease.getLeaseKey());
        }

        UpdateItemRequest request = new UpdateItemRequest();
        request.setTableName(table);
        request.setKey(serializer.getDynamoHashKey(lease));
        request.setExpected(serializer.getDynamoLeaseCounterExpectation(lease));
        request.setAttributeUpdates(serializer.getDynamoLeaseCounterUpdate(lease));

        try {
            dynamoDBClient.updateItem(request);
        } catch (ConditionalCheckFailedException e) {
            if (LOG.isDebugEnabled()) {
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.UpdateItemRequest

                    lease.getLeaseKey(),
                    lease.getLeaseOwner() == null ? "nobody" : lease.getLeaseOwner(),
                    owner));
        }

        UpdateItemRequest request = new UpdateItemRequest();
        request.setTableName(table);
        request.setKey(serializer.getDynamoHashKey(lease));
        request.setExpected(serializer.getDynamoLeaseCounterExpectation(lease));

        Map<String, AttributeValueUpdate> updates = serializer.getDynamoLeaseCounterUpdate(lease);
        updates.putAll(serializer.getDynamoTakeLeaseUpdate(lease, owner));
        request.setAttributeUpdates(updates);

        try {
            dynamoDBClient.updateItem(request);
        } catch (ConditionalCheckFailedException e) {
            if (LOG.isDebugEnabled()) {
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.model.UpdateItemRequest

            LOG.debug(String.format("Voiding lease with shardId %s owned by %s",
                    lease.getLeaseKey(),
                    lease.getLeaseOwner()));
        }

        UpdateItemRequest request = new UpdateItemRequest();
        request.setTableName(table);
        request.setKey(serializer.getDynamoHashKey(lease));
        request.setExpected(serializer.getDynamoLeaseOwnerExpectation(lease));

        Map<String, AttributeValueUpdate> updates = serializer.getDynamoLeaseCounterUpdate(lease);
        updates.putAll(serializer.getDynamoEvictLeaseUpdate(lease));
        request.setAttributeUpdates(updates);

        try {
            dynamoDBClient.updateItem(request);
        } catch (ConditionalCheckFailedException e) {
            if (LOG.isDebugEnabled()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.