Examples of BatchWriteItemOutcome


Examples of com.amazonaws.services.dynamodbv2.document.BatchWriteItemOutcome

            .addItemToPut(new Item()
                .withPrimaryKey(HASH_KEY_NAME, "TestingPutItemInBatch", RANGE_KEY_NAME, 555)
                .withString("someStringAttr", "someStrVal5")
                .withInt("someIntAttr", 555))
            ;
        BatchWriteItemOutcome outcome = dynamo.batchWriteItem(tableWriteItems);
        System.out.println(outcome);
        verify_BatchWrite_ToOneTable();
    }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.document.BatchWriteItemOutcome

    }


    @Test
    public void howToBatchWrite_ToMultiTables() {
        BatchWriteItemOutcome outcome = dynamo.batchWriteItem(
            // 1st table
            new TableWriteItems(TABLE_NAME)
                .withHashAndRangeKeysToDelete(HASH_KEY_NAME, RANGE_KEY_NAME,
                    "foo", 1,
                    "foo", 2)
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.document.BatchWriteItemOutcome

            if (attempts > 0) {
                // exponential backoff per DynamoDB recommendation
                Thread.sleep((1 << attempts) * 1000);
            }
            attempts++;
            BatchWriteItemOutcome outcome;
            if (unprocessed == null || unprocessed.size() > 0) {
                // handle initial request
                outcome = dynamo.batchWriteItem(tableWriteItems);
            } else {
                // handle unprocessed items
                outcome = dynamo.batchWriteItemUnprocessed(unprocessed);
            }
            System.out.println("outcome: " + outcome);
            unprocessed = outcome.getUnprocessedItems();
            System.out.println("unprocessed: " + unprocessed);
        } while (unprocessed.size() > 0);
    }
View Full Code Here

Examples of com.amazonaws.services.dynamodbv2.document.BatchWriteItemOutcome

        }
        BatchWriteItemRequest req = spec.getRequest()
            .withRequestItems(requestItems)
            .withReturnConsumedCapacity(spec.getReturnConsumedCapacity());
        BatchWriteItemResult result = client.batchWriteItem(req);
        return new BatchWriteItemOutcome(result);
    }
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.