Searched refs:ThreadLocal (Results 1 - 25 of 133) sorted by relevance

123456

/openjdk9/jdk/test/java/lang/ThreadLocal/
H A DMemoryLeak.java34 ThreadLocal t = new ThreadLocal();
H A DImmutableLocal.java27 * @summary Confirm ThreadLocal.set() usage is not a side effect of get()
33 * {@link ThreadLocal} guaranteed to always return the same reference.
35 public abstract static class ImmutableThreadLocal extends ThreadLocal {
44 private static final ThreadLocal cache = new ImmutableThreadLocal() {
H A DThreadId.java27 * Example class from java.lang.ThreadLocal class doc. Used by
41 private static final ThreadLocal<Integer> threadId =
42 new ThreadLocal<Integer>() {
H A DInitialValue.java32 static ThreadLocal<String> other;
35 public class MyLocal extends ThreadLocal<String> {
38 other = new ThreadLocal<String>();
62 // ThreadLocal map at this point, so test with a second thread.
H A DThreadLocalSupplierTest.java32 * @summary tests ThreadLocal.withInitial(<Supplier>).
33 * Adapted from java.lang.Basic functional test of ThreadLocal
56 static final class MyThreadLocal extends ThreadLocal<Integer> {
58 private final ThreadLocal<Integer> delegate;
63 delegate = ThreadLocal.<Integer>withInitial(supplier);
80 * Our one and only ThreadLocal from which we get thread ids using a
122 final ThreadLocal<String> threadLocal = ThreadLocal.<String>withInitial(() -> expected);
H A DBasic.java26 * @summary Basic functional test of ThreadLocal
31 static ThreadLocal n = new ThreadLocal() {
H A DTLRemoveTest.java26 * @summary Basic functional test of remove method for ThreadLocal
34 static ThreadLocal<Integer> n = new ThreadLocal<Integer>() {
43 // ThreadLocal values will be removed for these threads.
45 // ThreadLocal values will be removed and sets new values..
60 // To remove the ThreadLocal ....
63 n.remove(); // Removes ThreadLocal values..
67 // To remove the ThreadLocal value and set new value ...
70 n.remove(); // Removes the ThreadLocal Value...
72 ThreadLocal */
[all...]
/openjdk9/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/threads/
H A DThreadLocal01.java33 private static final ThreadLocal<Integer> local = new ThreadLocal<>();
H A DThreadLocal02.java34 ThreadLocal<Integer> local = new ThreadLocal<>();
H A DThreadLocal03.java33 static final ThreadLocal<Integer> local = new ThreadLocal<>();
/openjdk9/jaxp/src/java.xml/share/classes/com/sun/xml/internal/stream/util/
H A DThreadLocalBufferAllocator.java32 * are stored in ThreadLocal. This class stores 3 types of char
42 private static ThreadLocal<SoftReference> tlba = new ThreadLocal<>();
/openjdk9/jdk/src/java.base/share/classes/java/lang/
H A DInheritableThreadLocal.java30 * This class extends {@code ThreadLocal} to provide inheritance of values
49 * @see ThreadLocal
53 public class InheritableThreadLocal<T> extends ThreadLocal<T> {
71 * Get the map associated with a ThreadLocal.
80 * Create the map associated with a ThreadLocal.
H A DThreadLocal.java36 * copy of the variable. {@code ThreadLocal} instances are typically private
52 * private static final ThreadLocal&lt;Integer&gt; threadId =
53 * new ThreadLocal&lt;Integer&gt;() {
66 * variable as long as the thread is alive and the {@code ThreadLocal}
74 public class ThreadLocal<T> { class
78 * inheritableThreadLocals). The ThreadLocal objects act as keys,
120 * value other than {@code null}, {@code ThreadLocal} must be
140 public static <S> ThreadLocal<S> withInitial(Supplier<? extends S> supplier) {
148 public ThreadLocal() { method in class:ThreadLocal
226 * Get the map associated with a ThreadLocal
[all...]
/openjdk9/jdk/src/java.management/share/classes/javax/management/
H A DQueryEval.java41 private static ThreadLocal<MBeanServer> server =
/openjdk9/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/server/
H A DThreadLocalContainerResolver.java31 * ContainerResolver based on {@link ThreadLocal}.
49 private ThreadLocal<Container> containerThreadLocal = new ThreadLocal<Container>() {
/openjdk9/nashorn/test/src/jdk/dynalink/test/
H A DTrustedGuardingDynamicLinkerExporter.java40 private static final ThreadLocal<CallSiteDescriptor> lastDescriptor = new ThreadLocal<>();
/openjdk9/corba/src/java.corba/share/classes/com/sun/corba/se/impl/encoding/
H A DCodeSetCache.java44 * The ThreadLocal data is a 2 element Map array indexed
47 private ThreadLocal converterCaches = new ThreadLocal() {
/openjdk9/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/
H A DCompilationAlarm.java52 private static final ThreadLocal<Long> compilationStartedTimeStamps = new ThreadLocal<>();
/openjdk9/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/api/client/
H A DServiceInterceptorFactory.java79 private static ThreadLocal<Set<ServiceInterceptorFactory>> threadLocalFactories = new ThreadLocal<Set<ServiceInterceptorFactory>>() {
/openjdk9/jaxws/src/java.xml.ws/share/classes/com/sun/xml/internal/ws/encoding/fastinfoset/
H A DFastInfosetStreamReaderFactory.java40 private ThreadLocal<StAXDocumentParser> pool = new ThreadLocal<StAXDocumentParser>();
/openjdk9/jdk/src/java.desktop/share/classes/sun/java2d/
H A DReentrantContextProviderTL.java30 * This ReentrantContextProvider implementation uses a ThreadLocal to hold
44 private final ThreadLocal<Reference<K>> ctxTL
45 = new ThreadLocal<Reference<K>>();
65 * @param refTypeTL reference type used by ThreadLocal
/openjdk9/jdk/test/lib/testlibrary/jdk/testlibrary/
H A DLockFreeLogManager.java52 private final ThreadLocal<Map<Integer, String>> records = new ThreadLocal<Map<Integer, String>>() {
/openjdk9/jaxp/test/javax/xml/jaxp/libs/jaxp/library/
H A DJAXPPolicyManager.java167 private ThreadLocal<Map<Integer, Permission>> transientPermissions = new ThreadLocal<>();
168 private ThreadLocal<Boolean> allowAll = new ThreadLocal<>();
/openjdk9/jdk/test/java/lang/Class/getDeclaredField/
H A DClassDeclaredFieldsTest.java96 static final ThreadLocal<AtomicBoolean> allowAll = new ThreadLocal<AtomicBoolean>() {
171 final ThreadLocal<AtomicBoolean> allowAll; // actually: this should be in a thread locale
172 public SimplePolicy(TestCase test, ThreadLocal<AtomicBoolean> allowAll) {
/openjdk9/jdk/src/jdk.zipfs/share/classes/jdk/nio/zipfs/
H A DZipCoder.java128 private final ThreadLocal<CharsetDecoder> decTL = new ThreadLocal<>();
129 private final ThreadLocal<CharsetEncoder> encTL = new ThreadLocal<>();

Completed in 237 milliseconds

123456