Example usage for com.amazonaws.services.dynamodbv2.model AttributeValueUpdate getValue

List of usage examples for com.amazonaws.services.dynamodbv2.model AttributeValueUpdate getValue

Introduction

In this page you can find the example usage for com.amazonaws.services.dynamodbv2.model AttributeValueUpdate getValue.

Prototype


public AttributeValue getValue() 

Source Link

Document

Represents the data for an attribute.

Usage

From source file:com.amazon.janusgraph.diskstorage.dynamodb.DynamoDbDelegate.java

License:Open Source License

public static int calculateItemUpdateSizeInBytes(final Map<String, AttributeValueUpdate> item) {
    int size = 0;

    if (item == null) {
        return size;
    }//from  w ww . j  a v a2s  .co m

    for (Map.Entry<String, AttributeValueUpdate> entry : item.entrySet()) {
        final String name = entry.getKey();
        final AttributeValueUpdate update = entry.getValue();
        size += name.getBytes(UTF8).length;
        size += calculateAttributeSizeInBytes(update.getValue());
    }
    return size;
}

From source file:com.rapid7.diskstorage.dynamodb.DynamoDBDelegate.java

License:Open Source License

public static int calculateItemUpdateSizeInBytes(Map<String, AttributeValueUpdate> item) {
    int size = 0;

    if (item == null) {
        return size;
    }//from w  w  w  .jav a  2  s. c o m

    for (Map.Entry<String, AttributeValueUpdate> entry : item.entrySet()) {
        String name = entry.getKey();
        AttributeValueUpdate update = entry.getValue();
        size += name.getBytes(UTF8).length;
        size += calculateAttributeSizeInBytes(update.getValue());
    }
    return size;
}