class BucketCache.WriterThread extends Thread
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description | 
|---|---|
| private BlockingQueue<BucketCache.RAMQueueEntry> | inputQueue | 
| private boolean | writerEnabled | 
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description | 
|---|
| WriterThread(BlockingQueue<BucketCache.RAMQueueEntry> queue) | 
| Modifier and Type | Method and Description | 
|---|---|
| (package private) void | disableWriter() | 
| (package private) void | doDrain(List<BucketCache.RAMQueueEntry> entries)Flush the entries in ramCache to IOEngine and add bucket entry to backingMap. | 
| private void | putIntoBackingMap(BlockCacheKey key,
                 BucketEntry bucketEntry)Put the new bucket entry into backingMap. | 
| 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, yieldprivate final BlockingQueue<BucketCache.RAMQueueEntry> inputQueue
private volatile boolean writerEnabled
WriterThread(BlockingQueue<BucketCache.RAMQueueEntry> queue)
void disableWriter()
private void putIntoBackingMap(BlockCacheKey key, BucketEntry bucketEntry)
key - Block cache keybucketEntry - Bucket entry to put into backingMap.BlockCacheUtil.shouldReplaceExistingCacheBlock(BlockCache blockCache,BlockCacheKey
      cacheKey, Cacheable newBlock)void doDrain(List<BucketCache.RAMQueueEntry> entries) throws InterruptedException
entries - Presumes list passed in here will be processed by this invocation only. No
   interference expected.InterruptedExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.