Esempio n. 1
0
  private List<Map<String, AttributeValue>> unproccessedItems(
      BatchWriteItemResult result, Map<WriteRequest, Map<String, AttributeValue>> requestMap) {
    Collection<List<WriteRequest>> items = result.getUnprocessedItems().values();
    List<Map<String, AttributeValue>> unprocessed = new ArrayList<Map<String, AttributeValue>>();
    // retrieve the unprocessed items
    for (List<WriteRequest> list : items) {
      for (WriteRequest request : list) {
        unprocessed.add(requestMap.get(request));
      }
    }

    return unprocessed;
  }
 /**
  * Convenient method to return the low-level unprocessed items.
  *
  * @see BatchWriteItemApi#batchWriteItemUnprocessed(Map)
  * @see BatchWriteItemSpec#withUnprocessedItems(Map)
  */
 public Map<String, List<WriteRequest>> getUnprocessedItems() {
   return result.getUnprocessedItems();
 }