Class CrossTableBatchWriteResult

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

public final class CrossTableBatchWriteResult extends Object implements Consumed
Holds the result of a cross-table batch write operation.

Contains any unprocessed items that were not written, and optionally the consumed capacity if requested.

  • Constructor Summary

    Constructors
    Constructor
    Description
    CrossTableBatchWriteResult(@NonNull Map<String, List<software.amazon.awssdk.services.dynamodb.model.WriteRequest>> unprocessedItems)
    Constructs a new CrossTableBatchWriteResult with no consumed capacity information.
    CrossTableBatchWriteResult(@NonNull Map<String, List<software.amazon.awssdk.services.dynamodb.model.WriteRequest>> unprocessedItems, @Nullable software.amazon.awssdk.services.dynamodb.model.ConsumedCapacity consumedCapacity)
    Constructs a new CrossTableBatchWriteResult.
  • 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

    • CrossTableBatchWriteResult

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

      public CrossTableBatchWriteResult(@NonNull Map<String, List<software.amazon.awssdk.services.dynamodb.model.WriteRequest>> unprocessedItems, @Nullable software.amazon.awssdk.services.dynamodb.model.ConsumedCapacity consumedCapacity)
      Constructs a new CrossTableBatchWriteResult.
      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