{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

RxPagedListKt

{% setvar page_path %}androidx/paging/RxPagedListKt.html{% endsetvar %} {% setvar can_switch %}1{% endsetvar %} {% include "reference/_java_switcher2.md" %}

public final class RxPagedListKt


Summary

Public methods

static final @NonNull <ERROR CLASS><@NonNull PagedList<@NonNull Value>>
<Key extends Object, Value extends Object> toFlowable(
    @NonNull DataSource.Factory<@NonNull Key, @NonNull Value> receiver,
    @NonNull PagedList.Config config,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler,
    @NonNull <ERROR CLASS> backpressureStrategy
)

This method is deprecated. PagedList is deprecated and has been replaced by PagingData

static final @NonNull <ERROR CLASS><@NonNull PagedList<@NonNull Value>>
<Key extends Object, Value extends Object> toFlowable(
    @NonNull DataSource.Factory<@NonNull Key, @NonNull Value> receiver,
    int pageSize,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler,
    @NonNull <ERROR CLASS> backpressureStrategy
)

This method is deprecated. PagedList is deprecated and has been replaced by PagingData

static final @NonNull <ERROR CLASS><@NonNull PagedList<@NonNull Value>>
<Key extends Object, Value extends Object> toFlowable(
    @NonNull Function0<@NonNull PagingSource<@NonNull Key, @NonNull Value>> receiver,
    @NonNull PagedList.Config config,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler,
    @NonNull <ERROR CLASS> backpressureStrategy
)

This method is deprecated. PagedList is deprecated and has been replaced by PagingData

static final @NonNull <ERROR CLASS><@NonNull PagedList<@NonNull Value>>
<Key extends Object, Value extends Object> toFlowable(
    @NonNull Function0<@NonNull PagingSource<@NonNull Key, @NonNull Value>> receiver,
    int pageSize,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler,
    @NonNull <ERROR CLASS> backpressureStrategy
)

This method is deprecated. PagedList is deprecated and has been replaced by PagingData

static final @NonNull <ERROR CLASS><@NonNull PagedList<@NonNull Value>>
<Key extends Object, Value extends Object> toObservable(
    @NonNull DataSource.Factory<@NonNull Key, @NonNull Value> receiver,
    @NonNull PagedList.Config config,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler
)

This method is deprecated. PagedList is deprecated and has been replaced by PagingData

static final @NonNull <ERROR CLASS><@NonNull PagedList<@NonNull Value>>
<Key extends Object, Value extends Object> toObservable(
    @NonNull DataSource.Factory<@NonNull Key, @NonNull Value> receiver,
    int pageSize,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler
)

This method is deprecated. PagedList is deprecated and has been replaced by PagingData

static final @NonNull <ERROR CLASS><@NonNull PagedList<@NonNull Value>>
<Key extends Object, Value extends Object> toObservable(
    @NonNull Function0<@NonNull PagingSource<@NonNull Key, @NonNull Value>> receiver,
    @NonNull PagedList.Config config,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler
)

This method is deprecated. PagedList is deprecated and has been replaced by PagingData

static final @NonNull <ERROR CLASS><@NonNull PagedList<@NonNull Value>>
<Key extends Object, Value extends Object> toObservable(
    @NonNull Function0<@NonNull PagingSource<@NonNull Key, @NonNull Value>> receiver,
    int pageSize,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler
)

This method is deprecated. PagedList is deprecated and has been replaced by PagingData

Public methods

toFlowable

@NonNull
public static final <ERROR CLASS><@NonNull PagedList<@NonNull Value>> <Key extends Object, Value extends Object> toFlowable(
    @NonNull DataSource.Factory<@NonNull Key, @NonNull Value> receiver,
    @NonNull PagedList.Config config,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler,
    @NonNull <ERROR CLASS> backpressureStrategy
)

Constructs a Flowable<PagedList>, from this DataSource.Factory, convenience for RxPagedListBuilder.

The returned Flowable will already be subscribed on the fetchScheduler, and will perform all loading on that scheduler. It will already be observed on notifyScheduler, and will dispatch new PagedLists, as well as their updates to that scheduler.

Parameters
@NonNull PagedList.Config config

Paging configuration.

@Nullable Key initialLoadKey

Initial load key passed to the first PagedList / DataSource.

@Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback

The boundary callback for listening to PagedList load state.

@Nullable <ERROR CLASS> fetchScheduler

Scheduler used to fetch from DataSources, generally a background thread pool for e.g. I/O or network loading.

@Nullable <ERROR CLASS> notifyScheduler

Scheduler that receives PagedList updates, and where PagedList.Callback calls are dispatched. Generally, this is the UI / main thread.

@NonNull <ERROR CLASS> backpressureStrategy

BackpressureStrategy for the Flowable to use.

See also
RxPagedListBuilder
toObservable

toFlowable

@NonNull
public static final <ERROR CLASS><@NonNull PagedList<@NonNull Value>> <Key extends Object, Value extends Object> toFlowable(
    @NonNull DataSource.Factory<@NonNull Key, @NonNull Value> receiver,
    int pageSize,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler,
    @NonNull <ERROR CLASS> backpressureStrategy
)

Constructs a Flowable<PagedList>, from this DataSource.Factory, convenience for RxPagedListBuilder.

The returned Flowable will already be subscribed on the fetchScheduler, and will perform all loading on that scheduler. It will already be observed on notifyScheduler, and will dispatch new PagedLists, as well as their updates to that scheduler.

Parameters
int pageSize

Page size.

@Nullable Key initialLoadKey

Initial load key passed to the first PagedList / DataSource.

@Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback

The boundary callback for listening to PagedList load state.

@Nullable <ERROR CLASS> fetchScheduler

Scheduler used to fetch from DataSources, generally a background thread pool for e.g. I/O or network loading.

@Nullable <ERROR CLASS> notifyScheduler

Scheduler that receives PagedList updates, and where PagedList.Callback calls are dispatched. Generally, this is the UI / main thread.

@NonNull <ERROR CLASS> backpressureStrategy

BackpressureStrategy for the Flowable to use.

See also
RxPagedListBuilder
toObservable

toFlowable

@NonNull
public static final <ERROR CLASS><@NonNull PagedList<@NonNull Value>> <Key extends Object, Value extends Object> toFlowable(
    @NonNull Function0<@NonNull PagingSource<@NonNull Key, @NonNull Value>> receiver,
    @NonNull PagedList.Config config,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler,
    @NonNull <ERROR CLASS> backpressureStrategy
)

Constructs a Flowable<PagedList>, from this PagingSource factory, convenience for RxPagedListBuilder.

The returned Flowable will already be subscribed on the fetchScheduler, and will perform all loading on that scheduler. It will already be observed on notifyScheduler, and will dispatch new PagedLists, as well as their updates to that scheduler.

Parameters
@NonNull PagedList.Config config

Paging configuration.

@Nullable Key initialLoadKey

Initial load key passed to the first PagedList / PagingSource.

@Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback

The boundary callback for listening to PagedList load state.

@Nullable <ERROR CLASS> fetchScheduler

Scheduler used to fetch from PagingSources, generally a background thread pool for e.g. I/O or network loading.

@Nullable <ERROR CLASS> notifyScheduler

Scheduler that receives PagedList updates, and where PagedList.Callback calls are dispatched. Generally, this is the UI / main thread.

@NonNull <ERROR CLASS> backpressureStrategy

BackpressureStrategy for the Flowable to use.

See also
RxPagedListBuilder
toObservable

toFlowable

@NonNull
public static final <ERROR CLASS><@NonNull PagedList<@NonNull Value>> <Key extends Object, Value extends Object> toFlowable(
    @NonNull Function0<@NonNull PagingSource<@NonNull Key, @NonNull Value>> receiver,
    int pageSize,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler,
    @NonNull <ERROR CLASS> backpressureStrategy
)

Constructs a Flowable<PagedList>, from this PagingSource factory, convenience for RxPagedListBuilder.

The returned Flowable will already be subscribed on the fetchScheduler, and will perform all loading on that scheduler. It will already be observed on notifyScheduler, and will dispatch new PagedLists, as well as their updates to that scheduler.

Parameters
int pageSize

Page size.

@Nullable Key initialLoadKey

Initial load key passed to the first PagedList / PagingSource.

@Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback

The boundary callback for listening to PagedList load state.

@Nullable <ERROR CLASS> fetchScheduler

Scheduler used to fetch from PagingSources, generally a background thread pool for e.g. I/O or network loading.

@Nullable <ERROR CLASS> notifyScheduler

Scheduler that receives PagedList updates, and where PagedList.Callback calls are dispatched. Generally, this is the UI / main thread.

@NonNull <ERROR CLASS> backpressureStrategy

BackpressureStrategy for the Flowable to use.

See also
RxPagedListBuilder
toObservable

toObservable

@NonNull
public static final <ERROR CLASS><@NonNull PagedList<@NonNull Value>> <Key extends Object, Value extends Object> toObservable(
    @NonNull DataSource.Factory<@NonNull Key, @NonNull Value> receiver,
    @NonNull PagedList.Config config,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler
)

Constructs a Observable<PagedList> from this DataSource.Factory, convenience for RxPagedListBuilder.

The returned Observable will already be subscribed on the fetchScheduler, and will perform all loading on that scheduler. It will already be observed on notifyScheduler, and will dispatch new PagedLists, as well as their updates to that scheduler.

Parameters
@NonNull PagedList.Config config

Paging configuration.

@Nullable Key initialLoadKey

Initial load key passed to the first PagedList / DataSource.

@Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback

The boundary callback for listening to PagedList load state.

@Nullable <ERROR CLASS> fetchScheduler

Scheduler used to fetch from DataSources, generally a background thread pool for e.g. I/O or network loading.

@Nullable <ERROR CLASS> notifyScheduler

Scheduler that receives PagedList updates, and where PagedList.Callback calls are dispatched. Generally, this is the UI / main thread.

See also
RxPagedListBuilder
toFlowable

toObservable

@NonNull
public static final <ERROR CLASS><@NonNull PagedList<@NonNull Value>> <Key extends Object, Value extends Object> toObservable(
    @NonNull DataSource.Factory<@NonNull Key, @NonNull Value> receiver,
    int pageSize,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler
)

Constructs a Observable<PagedList> from this DataSource.Factory, convenience for RxPagedListBuilder.

The returned Observable will already be subscribed on the fetchScheduler, and will perform all loading on that scheduler. It will already be observed on notifyScheduler, and will dispatch new PagedLists, as well as their updates to that scheduler.

Parameters
int pageSize

Size of pages to load.

@Nullable Key initialLoadKey

Initial load key passed to the first PagedList / DataSource.

@Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback

The boundary callback for listening to PagedList load state.

@Nullable <ERROR CLASS> fetchScheduler

Scheduler used to fetch from DataSources, generally a background thread pool for e.g. I/O or network loading.

@Nullable <ERROR CLASS> notifyScheduler

Scheduler that receives PagedList updates, and where PagedList.Callback calls are dispatched. Generally, this is the UI / main thread.

See also
RxPagedListBuilder
toFlowable

toObservable

@NonNull
public static final <ERROR CLASS><@NonNull PagedList<@NonNull Value>> <Key extends Object, Value extends Object> toObservable(
    @NonNull Function0<@NonNull PagingSource<@NonNull Key, @NonNull Value>> receiver,
    @NonNull PagedList.Config config,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler
)

Constructs a Observable<PagedList> from this PagingSource factory, convenience for RxPagedListBuilder.

The returned Observable will already be subscribed on the fetchScheduler, and will perform all loading on that scheduler. It will already be observed on notifyScheduler, and will dispatch new PagedLists, as well as their updates to that scheduler.

Parameters
@NonNull PagedList.Config config

Paging configuration.

@Nullable Key initialLoadKey

Initial load key passed to the first PagedList / PagingSource.

@Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback

The boundary callback for listening to PagedList load state.

@Nullable <ERROR CLASS> fetchScheduler

Scheduler used to fetch from PagingSources, generally a background thread pool for e.g. I/O or network loading.

@Nullable <ERROR CLASS> notifyScheduler

Scheduler that receives PagedList updates, and where PagedList.Callback calls are dispatched. Generally, this is the UI / main thread.

See also
RxPagedListBuilder
toFlowable

toObservable

@NonNull
public static final <ERROR CLASS><@NonNull PagedList<@NonNull Value>> <Key extends Object, Value extends Object> toObservable(
    @NonNull Function0<@NonNull PagingSource<@NonNull Key, @NonNull Value>> receiver,
    int pageSize,
    @Nullable Key initialLoadKey,
    @Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback,
    @Nullable <ERROR CLASS> fetchScheduler,
    @Nullable <ERROR CLASS> notifyScheduler
)

Constructs a Observable<PagedList> from this PagingSource factory, convenience for RxPagedListBuilder.

The returned Observable will already be subscribed on the fetchScheduler, and will perform all loading on that scheduler. It will already be observed on notifyScheduler, and will dispatch new PagedLists, as well as their updates to that scheduler.

Parameters
int pageSize

Size of pages to load.

@Nullable Key initialLoadKey

Initial load key passed to the first PagedList / PagingSource.

@Nullable PagedList.BoundaryCallback<@NonNull Value> boundaryCallback

The boundary callback for listening to PagedList load state.

@Nullable <ERROR CLASS> fetchScheduler

Scheduler used to fetch from PagingSources, generally a background thread pool for e.g. I/O or network loading.

@Nullable <ERROR CLASS> notifyScheduler

Scheduler that receives PagedList updates, and where PagedList.Callback calls are dispatched. Generally, this is the UI / main thread.

See also
RxPagedListBuilder
toFlowable