java.lang.Object | |
↳ | com.facebook.imagepipeline.producers.MediaVariationsFallbackProducer |
Disk cache read producer.
This producer looks in the disk cache for variations of the original image which hasn't been found in cache itself.
If an alternative image is found, then it is passed to the consumer. If it's big enough for
the request's ResizeOptions
then the request goes no further down the pipeline. If it's
smaller than required then it will be passed as a non-final response.
If the image is not found or is sent as non-final, then the request is passed to the next producer in the sequence. Any results that the producer returns are passed to the consumer.
This producer is used only if the media variations experiment is turned on and does nothing
unless the image request includes defined MediaVariations
and ResizeOptions
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | EXTRA_CACHED_VALUE_FOUND | ||||||||||
String | EXTRA_CACHED_VALUE_USED_AS_LAST | ||||||||||
String | EXTRA_VARIANTS_COUNT | ||||||||||
String | EXTRA_VARIANTS_SOURCE | ||||||||||
String | PRODUCER_NAME |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MediaVariationsFallbackProducer(BufferedDiskCache defaultBufferedDiskCache, BufferedDiskCache smallImageBufferedDiskCache, CacheKeyFactory cacheKeyFactory, MediaVariationsIndex mediaVariationsIndex, Producer<EncodedImage> inputProducer) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | produceResults(Consumer<EncodedImage> consumer, ProducerContext producerContext) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |