Prefetcher

interface Prefetcher

Provides ability to prefetch content of lenses before they are applied using a Processor. The amount of lenses content that gets prefetched is limited by the Cache.Configuration provided to LensesComponent.

Types

Noop
Link copied to clipboard
object Noop : LensesComponent.Prefetcher
Status
Link copied to clipboard
enum Status : Enum<LensesComponent.Prefetcher.Status>
Possible states of lens content availability for local use.

Functions

observe
Link copied to clipboard
abstract fun observe(lens: LensesComponent.Lens, callback: Consumer<LensesComponent.Prefetcher.Status> = Consumer {}): Closeable
Allows to observe individual lens content loading Status.
run
Link copied to clipboard
abstract fun run(lenses: List<LensesComponent.Lens>, callback: Consumer<Boolean> = Consumer {}): Closeable
Starts a new operation to prefetch content for the provided list of lenses.

Inheritors

LensesComponent.Prefetcher
Link copied to clipboard