Class PooledByteBufAllocator.PoolThreadLocalCache
java.lang.Object
io.netty.util.concurrent.FastThreadLocal<PoolThreadCache>
io.netty.buffer.PooledByteBufAllocator.PoolThreadLocalCache
- Enclosing class:
PooledByteBufAllocator
private final class PooledByteBufAllocator.PoolThreadLocalCache
extends FastThreadLocal<PoolThreadCache>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PoolThreadCacheReturns the initial value for this thread-local variable.private <T> PoolArena<T> leastUsedArena(PoolArena<T>[] arenas) protected voidonRemoval(PoolThreadCache threadCache) Invoked when this thread local variable is removed byFastThreadLocal.remove().Methods inherited from class FastThreadLocal
destroy, get, get, getAndSet, getAndSet, getIfExists, isSet, isSet, remove, remove, removeAll, set, set, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
useCacheForAllThreads
private final boolean useCacheForAllThreads
-
-
Constructor Details
-
PoolThreadLocalCache
PoolThreadLocalCache(boolean useCacheForAllThreads)
-
-
Method Details
-
initialValue
Description copied from class:FastThreadLocalReturns the initial value for this thread-local variable.- Overrides:
initialValuein classFastThreadLocal<PoolThreadCache>
-
onRemoval
Description copied from class:FastThreadLocalInvoked when this thread local variable is removed byFastThreadLocal.remove(). Be aware thatFastThreadLocal.remove()is not guaranteed to be called when the `Thread` completes which means you can not depend on this for cleanup of the resources in the case of `Thread` completion.- Overrides:
onRemovalin classFastThreadLocal<PoolThreadCache>
-
leastUsedArena
-