Class DatabaseUpgradePaginatorImpl

java.lang.Object
com.atlassian.bamboo.upgrade.utils.impl.DatabaseUpgradePaginatorImpl
All Implemented Interfaces:
DatabaseUpgradePaginator

public class DatabaseUpgradePaginatorImpl extends Object implements DatabaseUpgradePaginator
  • Constructor Details

  • Method Details

    • forEachPage

      public <T> void forEachPage(@NotNull @NotNull DatabaseUpgradePaginator.PaginatedDataSupplier<T> dataSupplier, @NotNull @NotNull Consumer<Collection<T>> elementConsumer)
      Description copied from interface: DatabaseUpgradePaginator
      Executes the given consumer on each page of an underlying large collection of elements. The elements are fetched using the dataSupplier page by page, with default pageSize.
      Specified by:
      forEachPage in interface DatabaseUpgradePaginator
      Type Parameters:
      T - type of elements iterated over
      Parameters:
      dataSupplier - a supplier for fetching paginated data from the actual data source
      elementConsumer - action to perform for each page; every call will be wrapped in a separate transaction
    • forEachPage

      public <T> void forEachPage(@NotNull @NotNull DatabaseUpgradePaginator.PaginatedDataSupplier<T> dataSupplier, int pageSize, @NotNull @NotNull Consumer<Collection<T>> elementConsumer)
      Description copied from interface: DatabaseUpgradePaginator
      Executes the given consumer for each page of an underlying large collection of elements. The elements are fetched using the dataSupplier page by page, with specified pageSize.
      Specified by:
      forEachPage in interface DatabaseUpgradePaginator
      Type Parameters:
      T - type of elements iterated over
      Parameters:
      dataSupplier - a supplier for fetching paginated data from the actual data source
      pageSize - size of each fetched page
      elementConsumer - action to perform for each page; every call will be wrapped in a separate transaction
    • forEach

      public <T> void forEach(@NotNull @NotNull DatabaseUpgradePaginator.PaginatedDataSupplier<T> dataSupplier, @NotNull @NotNull Consumer<T> consumer)
      Description copied from interface: DatabaseUpgradePaginator
      Executes the given consumer for each element of an underlying large collection of elements. The elements are fetched using the dataSupplier page by page, with default pageSize.
      Specified by:
      forEach in interface DatabaseUpgradePaginator
      Type Parameters:
      T - type of elements iterated over
      Parameters:
      dataSupplier - a supplier for fetching paginated data from the actual data source
      consumer - action to perform for each element; executed in transactions, one transaction per page
    • forEach

      public <T> void forEach(@NotNull @NotNull DatabaseUpgradePaginator.PaginatedDataSupplier<T> dataSupplier, int pageSize, @NotNull @NotNull Consumer<T> consumer)
      Description copied from interface: DatabaseUpgradePaginator
      Executes the given consumer for each element of an underlying large collection of elements. The elements are fetched using the dataSupplier page by page, with specified pageSize.
      Specified by:
      forEach in interface DatabaseUpgradePaginator
      Type Parameters:
      T - type of elements iterated over
      Parameters:
      dataSupplier - a supplier for fetching paginated data from the actual data source
      pageSize - size of each fetched page
      consumer - action to perform for each element; executed in transactions, one transaction per page