类 CacheDispatcher

java.lang.Object
java.lang.Thread
com.android.volley.CacheDispatcher
所有已实现的接口:
Runnable

public class CacheDispatcher extends Thread
Provides a thread for performing cache triage on a queue of requests. Requests added to the specified cache queue are resolved from cache. Any deliverable response is posted back to the caller via a ResponseDelivery. Cache misses and responses that require refresh are enqueued on the specified network queue for processing by a NetworkDispatcher.
  • 构造器详细资料

    • CacheDispatcher

      public CacheDispatcher(BlockingQueue<Request<?>> cacheQueue, BlockingQueue<Request<?>> networkQueue, Cache cache, ResponseDelivery delivery)
      Creates a new cache triage dispatcher thread. You must call Thread.start() in order to begin processing.
      参数:
      cacheQueue - Queue of incoming requests for triage
      networkQueue - Queue to post requests that require network to
      cache - Cache interface to use for resolution
      delivery - Delivery interface to use for posting responses
  • 方法详细资料

    • quit

      public void quit()
      Forces this dispatcher to quit immediately. If any requests are still in the queue, they are not guaranteed to be processed.
    • run

      public void run()
      指定者:
      run 在接口中 Runnable
      覆盖:
      run 在类中 Thread