Package io.netty.util.internal
Class InternalThreadLocalMap
java.lang.Object
io.netty.util.internal.UnpaddedInternalThreadLocalMap
io.netty.util.internal.InternalThreadLocalMap
The internal data structure that stores the thread-local variables for Netty and all
FastThreadLocal
s.
Note that this class is for internal use only and is subject to change at any time. Use FastThreadLocal
unless you know what you are doing.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private Map
<Charset, CharsetDecoder> private Map
<Charset, CharsetEncoder> private BitSet
private IntegerHolder
private static final int
private int
private static final int
private static final int
private Object[]
Used byFastThreadLocal
private int
private static final InternalLogger
private static final AtomicInteger
private ThreadLocalRandom
long
Deprecated.These padding fields will be removed in the future.long
Deprecated.These padding fields will be removed in the future.long
Deprecated.These padding fields will be removed in the future.long
Deprecated.These padding fields will be removed in the future.long
Deprecated.These padding fields will be removed in the future.long
Deprecated.These padding fields will be removed in the future.long
Deprecated.These padding fields will be removed in the future.long
Deprecated.These padding fields will be removed in the future.private static final ThreadLocal
<InternalThreadLocalMap> private static final int
private static final int
private StringBuilder
private Map
<Class<?>, Map<String, TypeParameterMatcher>> private Map
<Class<?>, TypeParameterMatcher> static final Object
Internal use only.static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<E> ArrayList
<E> <E> ArrayList
<E> arrayList
(int minCapacity) Deprecated.static void
destroy()
private void
expandIndexedVariableTableAndSet
(int index, Object value) private static InternalThreadLocalMap
fastGet
(FastThreadLocalThread thread) int
static InternalThreadLocalMap
get()
static InternalThreadLocalMap
getIfSet()
indexedVariable
(int index) boolean
isCleanerFlagSet
(int index) boolean
isIndexedVariableSet
(int index) static int
int
private static Object[]
static int
random()
static void
remove()
removeIndexedVariable
(int index) void
setCleanerFlag
(int index) void
setCounterHashCode
(IntegerHolder counterHashCode) Deprecated.void
setFutureListenerStackDepth
(int futureListenerStackDepth) boolean
setIndexedVariable
(int index, Object value) void
setLocalChannelReaderStackDepth
(int localChannelReaderStackDepth) int
size()
private static InternalThreadLocalMap
slowGet()
-
Field Details
-
slowThreadLocalMap
-
nextIndex
-
VARIABLES_TO_REMOVE_INDEX
public static final int VARIABLES_TO_REMOVE_INDEX -
DEFAULT_ARRAY_LIST_INITIAL_CAPACITY
private static final int DEFAULT_ARRAY_LIST_INITIAL_CAPACITY- See Also:
-
ARRAY_LIST_CAPACITY_EXPAND_THRESHOLD
private static final int ARRAY_LIST_CAPACITY_EXPAND_THRESHOLD- See Also:
-
ARRAY_LIST_CAPACITY_MAX_SIZE
private static final int ARRAY_LIST_CAPACITY_MAX_SIZE- See Also:
-
HANDLER_SHARABLE_CACHE_INITIAL_CAPACITY
private static final int HANDLER_SHARABLE_CACHE_INITIAL_CAPACITY- See Also:
-
INDEXED_VARIABLE_TABLE_INITIAL_SIZE
private static final int INDEXED_VARIABLE_TABLE_INITIAL_SIZE- See Also:
-
STRING_BUILDER_INITIAL_SIZE
private static final int STRING_BUILDER_INITIAL_SIZE -
STRING_BUILDER_MAX_SIZE
private static final int STRING_BUILDER_MAX_SIZE -
logger
-
UNSET
Internal use only. -
indexedVariables
Used byFastThreadLocal
-
futureListenerStackDepth
private int futureListenerStackDepth -
localChannelReaderStackDepth
private int localChannelReaderStackDepth -
handlerSharableCache
-
counterHashCode
-
random
-
typeParameterMatcherGetCache
-
typeParameterMatcherFindCache
-
stringBuilder
-
charsetEncoderCache
-
charsetDecoderCache
-
arrayList
-
cleanerFlags
-
rp1
public long rp1Deprecated.These padding fields will be removed in the future. -
rp2
public long rp2Deprecated.These padding fields will be removed in the future. -
rp3
public long rp3Deprecated.These padding fields will be removed in the future. -
rp4
public long rp4Deprecated.These padding fields will be removed in the future. -
rp5
public long rp5Deprecated.These padding fields will be removed in the future. -
rp6
public long rp6Deprecated.These padding fields will be removed in the future. -
rp7
public long rp7Deprecated.These padding fields will be removed in the future. -
rp8
public long rp8Deprecated.These padding fields will be removed in the future.
-
-
Constructor Details
-
InternalThreadLocalMap
private InternalThreadLocalMap()
-
-
Method Details
-
getIfSet
-
get
-
fastGet
-
slowGet
-
remove
public static void remove() -
destroy
public static void destroy() -
nextVariableIndex
public static int nextVariableIndex() -
lastVariableIndex
public static int lastVariableIndex() -
newIndexedVariableTable
-
size
public int size() -
stringBuilder
-
charsetEncoderCache
-
charsetDecoderCache
-
arrayList
-
arrayList
-
futureListenerStackDepth
public int futureListenerStackDepth() -
setFutureListenerStackDepth
public void setFutureListenerStackDepth(int futureListenerStackDepth) -
random
-
typeParameterMatcherGetCache
-
typeParameterMatcherFindCache
-
counterHashCode
Deprecated. -
setCounterHashCode
Deprecated. -
handlerSharableCache
-
localChannelReaderStackDepth
public int localChannelReaderStackDepth() -
setLocalChannelReaderStackDepth
public void setLocalChannelReaderStackDepth(int localChannelReaderStackDepth) -
indexedVariable
-
setIndexedVariable
- Returns:
true
if and only if a new thread-local variable has been created
-
expandIndexedVariableTableAndSet
-
removeIndexedVariable
-
isIndexedVariableSet
public boolean isIndexedVariableSet(int index) -
isCleanerFlagSet
public boolean isCleanerFlagSet(int index) -
setCleanerFlag
public void setCleanerFlag(int index)
-