public class CacheDispatcher
extends java.lang.Thread
ResponseDelivery. Cache misses and responses that require
refresh are enqueued on the specified network queue for processing
by a NetworkDispatcher.| Constructor and Description |
|---|
CacheDispatcher(java.util.concurrent.BlockingQueue<Request<?>> cacheQueue,
java.util.concurrent.BlockingQueue<Request<?>> networkQueue,
Cache cache,
ResponseDelivery delivery)
Creates a new cache triage dispatcher thread.
|
| Modifier and Type | Method and Description |
|---|---|
void |
quit()
Forces this dispatcher to quit immediately.
|
void |
run() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic CacheDispatcher(java.util.concurrent.BlockingQueue<Request<?>> cacheQueue, java.util.concurrent.BlockingQueue<Request<?>> networkQueue, Cache cache, ResponseDelivery delivery)
Thread.start()
in order to begin processing.cacheQueue - Queue of incoming requests for triagenetworkQueue - Queue to post requests that require network tocache - Cache interface to use for resolutiondelivery - Delivery interface to use for posting responses