@NotThreadSafe public interface DatabaseUpgradePaginator
By definition the paginator is not thread safe. It is expected to be used in a single-threaded environment within an upgrade tasks.
Modifier and Type | Interface and Description |
---|---|
static interface |
DatabaseUpgradePaginator.PaginatedDataSupplier<T>
A supplier of pages over a large collection of elements.
|
Modifier and Type | Method and Description |
---|---|
<T> void |
forEach(DatabaseUpgradePaginator.PaginatedDataSupplier<T> dataSupplier,
Consumer<T> consumer)
Executes the given
consumer for each element of an underlying large collection of elements. |
<T> void |
forEach(DatabaseUpgradePaginator.PaginatedDataSupplier<T> dataSupplier,
int pageSize,
Consumer<T> consumer)
Executes the given
consumer for each element of an underlying large collection of elements. |
<T> void |
forEachPage(DatabaseUpgradePaginator.PaginatedDataSupplier<T> dataSupplier,
Consumer<Collection<T>> consumer)
Executes the given
consumer on each page of an underlying large collection of elements. |
<T> void |
forEachPage(DatabaseUpgradePaginator.PaginatedDataSupplier<T> dataSupplier,
int pageSize,
Consumer<Collection<T>> consumer)
Executes the given
consumer for each page of an underlying large collection of elements. |
<T> void forEachPage(@NotNull DatabaseUpgradePaginator.PaginatedDataSupplier<T> dataSupplier, @NotNull Consumer<Collection<T>> consumer)
consumer
on each page of an underlying large collection of elements. The elements
are fetched using the dataSupplier
page by page, with default pageSize
.T
- type of elements iterated overdataSupplier
- a supplier for fetching paginated data from the actual data sourceconsumer
- action to perform for each page; every call will be wrapped in a separate transaction<T> void forEachPage(@NotNull DatabaseUpgradePaginator.PaginatedDataSupplier<T> dataSupplier, int pageSize, @NotNull Consumer<Collection<T>> consumer)
consumer
for each page of an underlying large collection of elements. The elements
are fetched using the dataSupplier
page by page, with specified pageSize
.T
- type of elements iterated overdataSupplier
- a supplier for fetching paginated data from the actual data sourcepageSize
- size of each fetched pageconsumer
- action to perform for each page; every call will be wrapped in a separate transaction<T> void forEach(@NotNull DatabaseUpgradePaginator.PaginatedDataSupplier<T> dataSupplier, @NotNull Consumer<T> consumer)
consumer
for each element of an underlying large collection of elements. The elements
are fetched using the dataSupplier
page by page, with default pageSize
.T
- type of elements iterated overdataSupplier
- a supplier for fetching paginated data from the actual data sourceconsumer
- action to perform for each element; executed in transactions, one transaction per page<T> void forEach(@NotNull DatabaseUpgradePaginator.PaginatedDataSupplier<T> dataSupplier, int pageSize, @NotNull Consumer<T> consumer)
consumer
for each element of an underlying large collection of elements. The elements
are fetched using the dataSupplier
page by page, with specified pageSize
.T
- type of elements iterated overdataSupplier
- a supplier for fetching paginated data from the actual data sourcepageSize
- size of each fetched pageconsumer
- action to perform for each element; executed in transactions, one transaction per pageCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.