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
FastThreadLocals.
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 intprivate static final intprivate Map<Charset, CharsetDecoder> private Map<Charset, CharsetEncoder> private BitSetprivate IntegerHolderprivate static final intprivate intprivate static final intprivate static final intprivate Object[]Used byFastThreadLocalprivate intprivate static final InternalLoggerprivate static final AtomicIntegerprivate ThreadLocalRandomlongDeprecated.These padding fields will be removed in the future.longDeprecated.These padding fields will be removed in the future.longDeprecated.These padding fields will be removed in the future.longDeprecated.These padding fields will be removed in the future.longDeprecated.These padding fields will be removed in the future.longDeprecated.These padding fields will be removed in the future.longDeprecated.These padding fields will be removed in the future.longDeprecated.These padding fields will be removed in the future.private static final ThreadLocal<InternalThreadLocalMap> private static final intprivate static final intprivate StringBuilderprivate Map<Class<?>, Map<String, TypeParameterMatcher>> private Map<Class<?>, TypeParameterMatcher> static final ObjectInternal use only.static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<E> ArrayList<E> <E> ArrayList<E> arrayList(int minCapacity) Deprecated.static voiddestroy()private voidexpandIndexedVariableTableAndSet(int index, Object value) private static InternalThreadLocalMapfastGet(FastThreadLocalThread thread) intstatic InternalThreadLocalMapget()getAndSetIndexedVariable(int index, Object value) static InternalThreadLocalMapgetIfSet()indexedVariable(int index) booleanisCleanerFlagSet(int index) booleanisIndexedVariableSet(int index) static intintprivate static Object[]static intrandom()static voidremove()removeIndexedVariable(int index) voidsetCleanerFlag(int index) voidsetCounterHashCode(IntegerHolder counterHashCode) Deprecated.voidsetFutureListenerStackDepth(int futureListenerStackDepth) booleansetIndexedVariable(int index, Object value) voidsetLocalChannelReaderStackDepth(int localChannelReaderStackDepth) intsize()private static InternalThreadLocalMapslowGet()
-
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:
trueif and only if a new thread-local variable has been created
-
getAndSetIndexedVariable
- Returns:
UNSETif 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)
-