Paginators
Factory for multiple pagination types.
Resource usage
Since paginators heavily rely on ephemeral components, they might consume more memory if not cleaned up.
In case the paginator is deleted, calling AbstractPaginator.cleanup allows cleaning up early. If this is not called, it will be done when the paginator expires.
By default, components used in a page are invalidated when a new page is requested. In case you want to reuse components, you can make the components be only invalidated once the pagination expires by disabling AbstractPaginationBuilder.cleanAfterRefresh.
Timeout
Paginators have a default timeout set to Components.defaultEphemeralTimeout, which can be modified using AbstractPaginationBuilder.setTimeout.
You can also disable the timeout using AbstractPaginationBuilder.noTimeout, in which case you will need to clean up the components manually.
Functions
A paginator where each page is filled with a list of entries.
A paginator where each page is filled with a list of entries.
Classic paginator, where each page is generated by a CustomPageEditor.
A paginator which wraps a paginator, with a select menu to switch between them.
Classic paginator, where each page is generated by a PageEditor.
A single page generated by a CustomPageEditor.