-
- All Implemented Interfaces:
-
com.facebook.imagepipeline.producers.Producer
public class PartialDiskCacheProducer implements Producer<EncodedImage>
Partial disk cache producer.
This producer looks in the disk cache to see if it holds part of the requested image. If the image is found, then it is passed to the consumer as a non-final result, but an adjusted request is still sent further along to request the remainder of the image.
When the final result comes from the input producer, the two parts are stitched back together and returned as a whole.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringPRODUCER_NAMEpublic final static StringEXTRA_CACHED_VALUE_FOUNDpublic final static StringENCODED_IMAGE_SIZE
-
Constructor Summary
Constructors Constructor Description PartialDiskCacheProducer(BufferedDiskCache defaultBufferedDiskCache, CacheKeyFactory cacheKeyFactory, PooledByteBufferFactory pooledByteBufferFactory, ByteArrayPool byteArrayPool, Producer<EncodedImage> inputProducer)
-
Method Summary
Modifier and Type Method Description voidproduceResults(Consumer<EncodedImage> consumer, ProducerContext producerContext)-
-
Constructor Detail
-
PartialDiskCacheProducer
PartialDiskCacheProducer(BufferedDiskCache defaultBufferedDiskCache, CacheKeyFactory cacheKeyFactory, PooledByteBufferFactory pooledByteBufferFactory, ByteArrayPool byteArrayPool, Producer<EncodedImage> inputProducer)
-
-
Method Detail
-
produceResults
void produceResults(Consumer<EncodedImage> consumer, ProducerContext producerContext)
-
-
-
-