Top Description Fields Constructors Methods
io.netty.util.internal

public final Class InternalThreadLocalMap

extends UnpaddedInternalThreadLocalMap
Class Inheritance
Imports
io.netty.util.concurrent.FastThreadLocal, .FastThreadLocalThread, io.netty.util.internal.logging.InternalLogger, .InternalLoggerFactory, java.nio.charset.Charset, .CharsetDecoder, .CharsetEncoder, java.util.ArrayList, .Arrays, .BitSet, .IdentityHashMap, .Map, .Set, .WeakHashMap, java.util.concurrent.atomic.AtomicInteger

Deprecated

as a consequence of UnpaddedInternalThreadLocalMap being deprecated. See corresponding docs for further information.

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

Modifier and TypeField and Description
private static final int
private static final int
private ArrayList<Object>
private Map<Charset, CharsetDecoder>
private Map<Charset, CharsetEncoder>
private BitSet
private IntegerHolder
counterHashCode

Deprecated as a consequence of IntegerHolder being deprecated.
private static final int
private int
private static final int
private Map<Class<?>, Boolean>
private static final int
private Object[]
private int
private static final InternalLogger
private static final AtomicInteger
private ThreadLocalRandom
public long
rp1

Deprecated These padding fields will be removed in the future.
public long
rp2

Deprecated These padding fields will be removed in the future.
public long
rp3

Deprecated These padding fields will be removed in the future.
public long
rp4

Deprecated These padding fields will be removed in the future.
public long
rp5

Deprecated These padding fields will be removed in the future.
public long
rp6

Deprecated These padding fields will be removed in the future.
public long
rp7

Deprecated These padding fields will be removed in the future.
public long
rp8

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>
public static final Object
UNSET

Internal use only.

public static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public <E> ArrayList<E>
public <E> ArrayList<E>
arrayList(int minCapacity)

public Map<Charset, CharsetDecoder>
public Map<Charset, CharsetEncoder>
public IntegerHolder
counterHashCode()

Deprecated
public static void
private void
private static InternalThreadLocalMap
fastGet(FastThreadLocalThread thread)

Deprecated as a consequence of InternalThreadLocalMap being deprecated.
public int
public static InternalThreadLocalMap
get()

Deprecated as a consequence of InternalThreadLocalMap being deprecated.
public static InternalThreadLocalMap
getIfSet()

Deprecated as a consequence of InternalThreadLocalMap being deprecated.
public Map<Class<?>, Boolean>
public Object
indexedVariable(int index)

public boolean
isCleanerFlagSet(int index)

public boolean
public static int
public int
private static Object[]
public static int
public ThreadLocalRandom
public static void
public Object
public void
setCleanerFlag(int index)

public void
setCounterHashCode(IntegerHolder counterHashCode)

Deprecated
public void
setFutureListenerStackDepth(int futureListenerStackDepth)

public boolean

Returns:

true if and only if a new thread-local variable has been created
setIndexedVariable
(int index, Object value)

public void
setLocalChannelReaderStackDepth(int localChannelReaderStackDepth)

public int
size()

private static InternalThreadLocalMap
slowGet()

Deprecated as a consequence of InternalThreadLocalMap being deprecated.
public StringBuilder
public Map<Class<?>, Map<String, TypeParameterMatcher>>
public Map<Class<?>, TypeParameterMatcher>

Field Detail

ARRAY_LIST_CAPACITY_EXPAND_THRESHOLDback to summary
private static final int ARRAY_LIST_CAPACITY_EXPAND_THRESHOLD
ARRAY_LIST_CAPACITY_MAX_SIZEback to summary
private static final int ARRAY_LIST_CAPACITY_MAX_SIZE
arrayListback to summary
private ArrayList<Object> arrayList
charsetDecoderCacheback to summary
private Map<Charset, CharsetDecoder> charsetDecoderCache
charsetEncoderCacheback to summary
private Map<Charset, CharsetEncoder> charsetEncoderCache
cleanerFlagsback to summary
private BitSet cleanerFlags
counterHashCodeback to summary
private IntegerHolder counterHashCode

Deprecated

as a consequence of IntegerHolder being deprecated. See corresponding docs for further information.

DEFAULT_ARRAY_LIST_INITIAL_CAPACITYback to summary
private static final int DEFAULT_ARRAY_LIST_INITIAL_CAPACITY
futureListenerStackDepthback to summary
private int futureListenerStackDepth
HANDLER_SHARABLE_CACHE_INITIAL_CAPACITYback to summary
private static final int HANDLER_SHARABLE_CACHE_INITIAL_CAPACITY
handlerSharableCacheback to summary
private Map<Class<?>, Boolean> handlerSharableCache
INDEXED_VARIABLE_TABLE_INITIAL_SIZEback to summary
private static final int INDEXED_VARIABLE_TABLE_INITIAL_SIZE
indexedVariablesback to summary
private Object[] indexedVariables

Used by FastThreadLocal

localChannelReaderStackDepthback to summary
private int localChannelReaderStackDepth
loggerback to summary
private static final InternalLogger logger
nextIndexback to summary
private static final AtomicInteger nextIndex
randomback to summary
private ThreadLocalRandom random
rp1back to summary
public long rp1

Deprecated

These padding fields will be removed in the future.

rp2back to summary
public long rp2

Deprecated

These padding fields will be removed in the future.

rp3back to summary
public long rp3

Deprecated

These padding fields will be removed in the future.

rp4back to summary
public long rp4

Deprecated

These padding fields will be removed in the future.

rp5back to summary
public long rp5

Deprecated

These padding fields will be removed in the future.

rp6back to summary
public long rp6

Deprecated

These padding fields will be removed in the future.

rp7back to summary
public long rp7

Deprecated

These padding fields will be removed in the future.

rp8back to summary
public long rp8

Deprecated

These padding fields will be removed in the future.

slowThreadLocalMapback to summary
private static final ThreadLocal<InternalThreadLocalMap> slowThreadLocalMap
STRING_BUILDER_INITIAL_SIZEback to summary
private static final int STRING_BUILDER_INITIAL_SIZE
STRING_BUILDER_MAX_SIZEback to summary
private static final int STRING_BUILDER_MAX_SIZE
stringBuilderback to summary
private StringBuilder stringBuilder
typeParameterMatcherFindCacheback to summary
private Map<Class<?>, Map<String, TypeParameterMatcher>> typeParameterMatcherFindCache
typeParameterMatcherGetCacheback to summary
private Map<Class<?>, TypeParameterMatcher> typeParameterMatcherGetCache
UNSETback to summary
public static final Object UNSET

Internal use only.

VARIABLES_TO_REMOVE_INDEXback to summary
public static final int VARIABLES_TO_REMOVE_INDEX

Constructor Detail

InternalThreadLocalMapback to summary
private InternalThreadLocalMap()

Method Detail

arrayListback to summary
public <E> ArrayList<E> arrayList()
arrayListback to summary
public <E> ArrayList<E> arrayList(int minCapacity)
Annotations
@SuppressWarnings:unchecked
charsetDecoderCacheback to summary
public Map<Charset, CharsetDecoder> charsetDecoderCache()
charsetEncoderCacheback to summary
public Map<Charset, CharsetEncoder> charsetEncoderCache()
counterHashCodeback to summary
public IntegerHolder counterHashCode()

Deprecated

Annotations
@Deprecated
destroyback to summary
public static void destroy()
expandIndexedVariableTableAndSetback to summary
private void expandIndexedVariableTableAndSet(int index, Object value)
fastGetback to summary
private static InternalThreadLocalMap fastGet(FastThreadLocalThread thread)

Deprecated

as a consequence of InternalThreadLocalMap being deprecated. See corresponding docs for further information.

futureListenerStackDepthback to summary
public int futureListenerStackDepth()
getback to summary
public static InternalThreadLocalMap get()

Deprecated

as a consequence of InternalThreadLocalMap being deprecated. See corresponding docs for further information.

getIfSetback to summary
public static InternalThreadLocalMap getIfSet()

Deprecated

as a consequence of InternalThreadLocalMap being deprecated. See corresponding docs for further information.

handlerSharableCacheback to summary
public Map<Class<?>, Boolean> handlerSharableCache()
indexedVariableback to summary
public Object indexedVariable(int index)
isCleanerFlagSetback to summary
public boolean isCleanerFlagSet(int index)
isIndexedVariableSetback to summary
public boolean isIndexedVariableSet(int index)
lastVariableIndexback to summary
public static int lastVariableIndex()
localChannelReaderStackDepthback to summary
public int localChannelReaderStackDepth()
newIndexedVariableTableback to summary
private static Object[] newIndexedVariableTable()
nextVariableIndexback to summary
public static int nextVariableIndex()
randomback to summary
public ThreadLocalRandom random()
removeback to summary
public static void remove()
removeIndexedVariableback to summary
public Object removeIndexedVariable(int index)
setCleanerFlagback to summary
public void setCleanerFlag(int index)
setCounterHashCodeback to summary
public void setCounterHashCode(IntegerHolder counterHashCode)

Deprecated

Annotations
@Deprecated
setFutureListenerStackDepthback to summary
public void setFutureListenerStackDepth(int futureListenerStackDepth)
setIndexedVariableback to summary
public boolean setIndexedVariable(int index, Object value)
Returns:boolean

true if and only if a new thread-local variable has been created

setLocalChannelReaderStackDepthback to summary
public void setLocalChannelReaderStackDepth(int localChannelReaderStackDepth)
sizeback to summary
public int size()
slowGetback to summary
private static InternalThreadLocalMap slowGet()

Deprecated

as a consequence of InternalThreadLocalMap being deprecated. See corresponding docs for further information.

stringBuilderback to summary
public StringBuilder stringBuilder()
typeParameterMatcherFindCacheback to summary
public Map<Class<?>, Map<String, TypeParameterMatcher>> typeParameterMatcherFindCache()
typeParameterMatcherGetCacheback to summary
public Map<Class<?>, TypeParameterMatcher> typeParameterMatcherGetCache()