Class BatchWriteResult

java.lang.Object
dev.hogwai.dynamodb.simplified.result.BatchWriteResult
All Implemented Interfaces:
Consumed

public final class BatchWriteResult extends Object implements Consumed
Holds the result of a BatchWriteBuilder execution. Contains any unprocessed items that were not written.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BatchWriteResult(@NonNull Map<String, List<software.amazon.awssdk.services.dynamodb.model.WriteRequest>> unprocessedItems)
    Constructs a new BatchWriteResult with no consumed capacity information.
    BatchWriteResult(@NonNull Map<String, List<software.amazon.awssdk.services.dynamodb.model.WriteRequest>> unprocessedItems, @Nullable software.amazon.awssdk.services.dynamodb.model.ConsumedCapacity consumedCapacity)
    Constructs a new BatchWriteResult.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable software.amazon.awssdk.services.dynamodb.model.ConsumedCapacity
    Returns the consumed capacity, or null if capacity was not requested or the operation does not support capacity tracking.
    boolean
    Returns whether any items were not processed.
    @NonNull Map<String, List<software.amazon.awssdk.services.dynamodb.model.WriteRequest>>
    Returns the unprocessed items, keyed by table name.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BatchWriteResult

      public BatchWriteResult(@NonNull Map<String, List<software.amazon.awssdk.services.dynamodb.model.WriteRequest>> unprocessedItems)
      Constructs a new BatchWriteResult with no consumed capacity information.
      Parameters:
      unprocessedItems - the items that were not processed, keyed by table name
    • BatchWriteResult

      public BatchWriteResult(@NonNull Map<String, List<software.amazon.awssdk.services.dynamodb.model.WriteRequest>> unprocessedItems, @Nullable software.amazon.awssdk.services.dynamodb.model.ConsumedCapacity consumedCapacity)
      Constructs a new BatchWriteResult.
      Parameters:
      unprocessedItems - the items that were not processed, keyed by table name
      consumedCapacity - the consumed capacity, or null
  • Method Details

    • consumedCapacity

      public @Nullable software.amazon.awssdk.services.dynamodb.model.ConsumedCapacity consumedCapacity()
      Returns the consumed capacity, or null if capacity was not requested or the operation does not support capacity tracking.
      Specified by:
      consumedCapacity in interface Consumed
      Returns:
      consumed capacity, or null
    • unprocessedItems

      public @NonNull Map<String, List<software.amazon.awssdk.services.dynamodb.model.WriteRequest>> unprocessedItems()
      Returns the unprocessed items, keyed by table name.
      Returns:
      an unmodifiable map of unprocessed items (never null)
    • hasUnprocessed

      public boolean hasUnprocessed()
      Returns whether any items were not processed.
      Returns:
      true if there are unprocessed items, false otherwise