{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
public final class InvalidatingPagingSourceFactory<Key extends Object, Value extends Object>
Wrapper class for PagingSource
factory intended for usage in Pager
construction. Stores reference to the PagingSource
factory and the PagingSource
s it produces for invalidation when the backing dataset is updated.
Calling invalidate
on this InvalidatingPagingSourceFactory
will automatically forward invalidate signals to all active PagingSource
s.
Public constructors |
|
---|---|
<Key extends Object, Value extends Object> InvalidatingPagingSourceFactory( |
Public methods |
|
---|---|
final void |
Calls |
@NonNull PagingSource<@NonNull Key, @NonNull Value> |
invoke() |
@NonNull
public final <Key extends Object, Value extends Object> InvalidatingPagingSourceFactory(
@NonNull Function0<@NonNull PagingSource<@NonNull Key, @NonNull Value>> pagingSourceFactory
)
Parameters | |
---|---|
@NonNull Function0<@NonNull PagingSource<@NonNull Key, @NonNull Value>> pagingSourceFactory |
The |
@NonNull
public final void invalidate()
Calls PagingSource.invalidate
on each PagingSource
that was produced by this InvalidatingPagingSourceFactory
@NonNull
public PagingSource<@NonNull Key, @NonNull Value> invoke()
Returns | |
---|---|
PagingSource<@NonNull Key, @NonNull Value> |
|