@Override public void putItems(String tableName, ArrayList<Item> aggregation) throws Exception { try { TableWriteItems tableWriteItems = new TableWriteItems(tableName); tableWriteItems.withItemsToPut(aggregation); BatchWriteItemOutcome outcome = dynamoDB.batchWriteItem(tableWriteItems); } catch (Exception e) { LOGGER.error("Error while putting a batch of items in the table " + tableName + ". Details=" + e.getMessage()); } // try catch } // putItems
.withItemsToPut(new Item() .withPrimaryKey("Name", "Amazon RDS") .withNumber("Threads", 0)); .withItemsToPut(new Item() .withPrimaryKey("ForumName","Amazon RDS","Subject","Amazon RDS Thread 1") .withString("Message", "ElasticCache Thread 1 message")
totalToDelete + totalToPut - count); final int index = count - totalToDelete; writeItems.withItemsToPut( Arrays.copyOfRange(itemsToPut, index, index + numToPut)); count += numToPut;