InvalidatingPagingSourceFactory



Wrapper class for a PagingSource factory intended for usage in Pager construction.

Calling invalidate on this InvalidatingPagingSourceFactory will forward invalidate signals to all active PagingSources that were produced by calling invoke.

This class is thread-safe for concurrent calls to any mutative operations including both invoke and invalidate.

Summary

Public constructors

<Key : Any, Value : Any> InvalidatingPagingSourceFactory(
    pagingSourceFactory: () -> PagingSource<Key, Value>
)
Cmn

Public functions

Unit

Calls PagingSource.invalidate on each PagingSource that was produced by this InvalidatingPagingSourceFactory

Cmn
open operator PagingSource<Key, Value>
Cmn

Public constructors

InvalidatingPagingSourceFactory

<Key : Any, Value : Any> InvalidatingPagingSourceFactory(
    pagingSourceFactory: () -> PagingSource<Key, Value>
)
Parameters
pagingSourceFactory: () -> PagingSource<Key, Value>

The PagingSource factory that returns a PagingSource when called

Public functions

invalidate

fun invalidate(): Unit

Calls PagingSource.invalidate on each PagingSource that was produced by this InvalidatingPagingSourceFactory

invoke

open operator fun invoke(): PagingSource<Key, Value>
Returns
PagingSource<Key, Value>

PagingSource which will be invalidated when this factory's invalidate method is called