JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.795

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.services.dynamodbv2.document

Class ItemCollection<R>

  • Type Parameters:
    R - low level result type
    All Implemented Interfaces:
    Iterable<Item>


    public abstract class ItemCollection<R>
    extends PageBasedCollection<Item,R>
    A collection of Item's. An ItemCollection object maintains a cursor pointing to its current pages of data. Initially the cursor is positioned before the first page. The next method moves the cursor to the next row, and because it returns false when there are no more rows in the ItemCollection object, it can be used in a while loop to iterate through the collection. Network calls can be triggered when the collection is iterated across page boundaries.
    • Constructor Detail

      • ItemCollection

        public ItemCollection()
    • Method Detail

      • getTotalCount

        @Deprecated
        public int getTotalCount()
        Deprecated. This method returns the accumulated count and not the total count. Use getAccumulatedItemCount() instead.
        Returns the count of items accumulated so far.
      • getAccumulatedItemCount

        public int getAccumulatedItemCount()
        Returns the count of items accumulated so far.
      • getTotalScannedCount

        @Deprecated
        public int getTotalScannedCount()
        Deprecated. This method returns the accumulated count and not the total count. Use getAccumulatedScannedCount() instead.
        Returns the scanned count accumulated so far.
      • getAccumulatedScannedCount

        public int getAccumulatedScannedCount()
        Returns the scanned count accumulated so far.
      • getAccumulatedConsumedCapacity

        public ConsumedCapacity getAccumulatedConsumedCapacity()
        Returns the consumed capacity accumulated so far.
      • pages

        public PageIterable<Item,R> pages()
        Returns an Iterable<Page<Item, R>> that iterates over pages of items from this collection. Each call to Iterator.next on an Iterator returned from this Iterable results in exactly one call to DynamoDB to retrieve a single page of results.

        ItemCollection<QueryResult> collection = ...; for (Page<Item> page : collection.pages()) { processItems(page); ConsumedCapacity consumedCapacity = page.getLowLevelResult().getConsumedCapacity(); Thread.sleep(getBackoff(consumedCapacity.getCapacityUnits())); }

        The use of the internal/undocumented PageIterable class instead of Iterable in the public interface here is retained for backwards compatibility. It doesn't expose any methods beyond those of the Iterable interface. This method will be changed to return an Iterable<Page<Item, R>> directly in a future release of the SDK.

        Overrides:
        pages in class PageBasedCollection<Item,R>
        See Also:
        Page
      • getMaxResultSize

        public abstract Integer getMaxResultSize()
        Returns the maximum number of resources to be retrieved in this collection; or null if there is no limit.
        Specified by:
        getMaxResultSize in class PageBasedCollection<Item,R>
      • getLastLowLevelResult

        public R getLastLowLevelResult()
        Returns the low-level result last retrieved (for the current page) from the server side; or null if there has yet no calls to the server.
        Overrides:
        getLastLowLevelResult in class PageBasedCollection<Item,R>
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /