Class BatchGetResult<T>

java.lang.Object
dev.hogwai.dynamodb.simplified.result.BatchGetResult<T>
Type Parameters:
T - the item type
All Implemented Interfaces:
Consumed

public final class BatchGetResult<T> extends Object implements Consumed
Holds the result of a BatchGetBuilder execution. Contains the successfully retrieved items and any keys that were not processed.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BatchGetResult(@NonNull List<T> items, @NonNull Map<String, software.amazon.awssdk.services.dynamodb.model.KeysAndAttributes> unprocessedKeys)
    Constructs a new BatchGetResult with no consumed capacity information.
    BatchGetResult(@NonNull List<T> items, @NonNull Map<String, software.amazon.awssdk.services.dynamodb.model.KeysAndAttributes> unprocessedKeys, @Nullable software.amazon.awssdk.services.dynamodb.model.ConsumedCapacity consumedCapacity)
    Constructs a new BatchGetResult.
  • 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 keys were not processed.
    @NonNull List<T>
    Returns the successfully retrieved items.
    @NonNull Map<String, software.amazon.awssdk.services.dynamodb.model.KeysAndAttributes>
    Returns the unprocessed keys, keyed by table name.

    Methods inherited from class Object

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

    • BatchGetResult

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

      public BatchGetResult(@NonNull List<T> items, @NonNull Map<String, software.amazon.awssdk.services.dynamodb.model.KeysAndAttributes> unprocessedKeys, @Nullable software.amazon.awssdk.services.dynamodb.model.ConsumedCapacity consumedCapacity)
      Constructs a new BatchGetResult.
      Parameters:
      items - the successfully retrieved items
      unprocessedKeys - the keys 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
    • items

      public @NonNull List<T> items()
      Returns the successfully retrieved items.
      Returns:
      an unmodifiable list of items (never null)
    • unprocessedKeys

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

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