Examples of PutItemRequest


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

        attributes.put(SessionTableAttributes.SESSION_DATA_ATTRIBUTE, new AttributeValue().withB(b));
        attributes.put(SessionTableAttributes.CREATED_AT_ATTRIBUTE, new AttributeValue().withN(Long.toString(session.getCreationTime())));
        attributes.put(SessionTableAttributes.LAST_UPDATED_AT_ATTRIBUTE, new AttributeValue().withN(Long.toString(System.currentTimeMillis())));

        try {
            PutItemRequest request = new PutItemRequest(tableName, attributes);
            addClientMarker(request);
            dynamo.putItem(request);
        } catch (Exception e) {
            DynamoDBSessionManager.error("Unable to save session " + session.getId(), e);
        }
View Full Code Here

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

                }

                @Override
                protected void executeLowLevelRequest(boolean onlyKeyAttributeSpecified) {
                    /* Send a putItem request */
                    db.putItem(applyUserAgent(new PutItemRequest().withTableName(getTableName())
                            .withItem(transformAttributes(this.clazz, convertToItem(getAttributeValueUpdates())))
                            .withExpected(getExpectedAttributeValues())));
                }
            };
        } else {
View Full Code Here

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

        //overlay any user provided expected values.
        if(userProvidedExpectedValues != null){
            expectedValues.putAll(userProvidedExpectedValues);
        }

        db.putItem(applyUserAgent(new PutItemRequest().withTableName(tableName).withItem(attributes)
                .withExpected(expectedValues)));
    }
View Full Code Here

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

  private PutRequest putRequest;
  private GeoPoint geoPoint;
  private AttributeValue rangeKeyValue;

  public PutPointRequest(GeoPoint geoPoint, AttributeValue rangeKeyValue) {
    putItemRequest = new PutItemRequest();
    putItemRequest.setItem(new HashMap<String, AttributeValue>());
    putRequest = new PutRequest();
    putRequest.setItem(new HashMap<String, AttributeValue>());
   
    this.geoPoint = geoPoint;
View Full Code Here

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

        /*
         * Do a put or an update, according to the configuration. For a put (not
         * the default), we need to munge the data type.
         */
        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)));
View Full Code Here

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

                    Map<String, AttributeValue> attributeValues =
                            convertToItem(getAttributeValueUpdates());

                    attributeValues = transformAttributes(
                        toParameters(attributeValues, this.clazz, finalConfig));
                    PutItemRequest req = new PutItemRequest()
                        .withTableName(getTableName())
                        .withItem(attributeValues)
                        .withExpected(getExpectedAttributeValues())
                        .withRequestMetricCollector(
                            finalConfig.getRequestMetricCollector());
View Full Code Here

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

        //overlay any user provided expected values.
        if(userProvidedExpectedValues != null){
            expectedValues.putAll(userProvidedExpectedValues);
        }
        PutItemRequest req = new PutItemRequest().withTableName(tableName)
            .withItem(attributes).withExpected(expectedValues)
            .withRequestMetricCollector(config.getRequestMetricCollector());
        db.putItem(applyUserAgent(req));
   }
View Full Code Here

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

                    Map<String, AttributeValue> attributeValues =
                            convertToItem(getAttributeValueUpdates());

                    attributeValues = transformAttributes(
                        toParameters(attributeValues, this.clazz, finalConfig));
                    PutItemRequest req = new PutItemRequest()
                        .withTableName(getTableName())
                        .withItem(attributeValues)
                        .withExpected(getExpectedAttributeValues())
                        .withRequestMetricCollector(
                            finalConfig.getRequestMetricCollector());
View Full Code Here

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

        //overlay any user provided expected values.
        if(userProvidedExpectedValues != null){
            expectedValues.putAll(userProvidedExpectedValues);
        }
        PutItemRequest req = new PutItemRequest().withTableName(tableName)
            .withItem(attributes).withExpected(expectedValues)
            .withRequestMetricCollector(config.getRequestMetricCollector());
        db.putItem(applyUserAgent(req));
   }
View Full Code Here

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

        /*
         * Do a put or an update, according to the configuration. For a put (not
         * the default), we need to munge the data type.
         */
        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, key, updateValues)).withExpected(expectedValues)));
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.