PrefetchScheduler


Implementations of this interface accept prefetch requests via schedulePrefetch and decide when to execute them in a way that will have minimal impact on user experience, e.g. during frame idle time.

Requests should be executed by invoking PrefetchRequest.execute. The implementation of PrefetchRequest.execute will return false when all work for that request is done, or true when it still has more to do but doesn't think it can complete it within PrefetchRequestScope.availableTimeNanos.

Summary

Public functions

Unit

Accepts a prefetch request.

Cmn

Public functions

schedulePrefetch

fun schedulePrefetch(prefetchRequest: PrefetchRequest): Unit

Accepts a prefetch request. Implementations should find a time to execute them which will have minimal impact on user experience.