1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package io.netty.util.internal;
18
19 import io.netty.util.concurrent.FastThreadLocal;
20
21 import java.nio.charset.Charset;
22 import java.nio.charset.CharsetDecoder;
23 import java.nio.charset.CharsetEncoder;
24 import java.util.ArrayList;
25 import java.util.Map;
26 import java.util.concurrent.atomic.AtomicInteger;
27
28
29
30
31
32
33 class UnpaddedInternalThreadLocalMap {
34
35 static final ThreadLocal<InternalThreadLocalMap> slowThreadLocalMap = new ThreadLocal<InternalThreadLocalMap>();
36 static final AtomicInteger nextIndex = new AtomicInteger();
37
38
39 Object[] indexedVariables;
40
41
42 int futureListenerStackDepth;
43 int localChannelReaderStackDepth;
44 Map<Class<?>, Boolean> handlerSharableCache;
45 IntegerHolder counterHashCode;
46 ThreadLocalRandom random;
47 Map<Class<?>, TypeParameterMatcher> typeParameterMatcherGetCache;
48 Map<Class<?>, Map<String, TypeParameterMatcher>> typeParameterMatcherFindCache;
49
50
51 StringBuilder stringBuilder;
52 Map<Charset, CharsetEncoder> charsetEncoderCache;
53 Map<Charset, CharsetDecoder> charsetDecoderCache;
54
55
56 ArrayList<Object> arrayList;
57
58 UnpaddedInternalThreadLocalMap(Object[] indexedVariables) {
59 this.indexedVariables = indexedVariables;
60 }
61 }