Class PaginationSubscription<ResponseT>

java.lang.Object
software.amazon.awssdk.core.pagination.async.PaginationSubscription<ResponseT>
All Implemented Interfaces:
org.reactivestreams.Subscription
Direct Known Subclasses:
ItemsSubscription, ResponsesSubscription

@SdkProtectedApi public abstract class PaginationSubscription<ResponseT> extends Object implements org.reactivestreams.Subscription
  • Field Details

    • outstandingRequests

      protected AtomicLong outstandingRequests
    • subscriber

      protected final org.reactivestreams.Subscriber subscriber
    • nextPageFetcher

      protected final AsyncPageFetcher<ResponseT> nextPageFetcher
    • currentPage

      protected volatile ResponseT currentPage
  • Constructor Details

  • Method Details

    • request

      public void request(long n)
      Specified by:
      request in interface org.reactivestreams.Subscription
    • handleRequests

      protected abstract void handleRequests()
      Recursive method to deal with requests until there are no outstandingRequests or no more pages.
    • cancel

      public void cancel()
      Specified by:
      cancel in interface org.reactivestreams.Subscription
    • hasNextPage

      protected boolean hasNextPage()
    • completeSubscription

      protected void completeSubscription()
    • isTerminated

      protected boolean isTerminated()
    • stopTask

      protected void stopTask()
    • cleanup

      protected void cleanup()