Class CursorBasedPaginatedService<T>

java.lang.Object
com.symphony.bdk.core.service.pagination.PaginatedService
com.symphony.bdk.core.service.pagination.CursorBasedPaginatedService<T>

@API(status=INTERNAL) public class CursorBasedPaginatedService<T> extends PaginatedService
  • Constructor Details

    • CursorBasedPaginatedService

      public CursorBasedPaginatedService(CursorBasedPaginatedApi<T> paginatedApi, Integer chunkSize, Integer maxSize)
      Parameters:
      paginatedApi - the paginated api to be called
      chunkSize - the max number of items to be retrieved in one call
      maxSize - the total max number of items to be retrieved
  • Method Details

    • stream

      public Stream<T> stream()
      Returns an stream of elements with lazy fetching.
      Returns:
      a Stream which lazily makes calls to the paginatedApi.