| Modifier and Type | Field and Description |
|---|---|
| public static final TerminatingThreadLocal | REGISTRY
A per-platform-thread registry of TerminatingThreadLocal(s). |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public static void | register(TerminatingThreadLocal<?>
the ThreadLocal to register tl)Register given TerminatingThreadLocal |
| public void | remove()
Overrides jdk. Removes the current thread's value for this thread-local variable. |
| public void | set(T value)
Overrides jdk. Sets the current thread's copy of this thread-local variable to the specified value. |
| protected void | threadTerminated(T
current thread's value of this thread-local variable
(may be null but only if null value was explicitly initialized) value)Invoked by a thread when terminating and this thread-local has an associated value for the terminating thread (even if that value is null), so that any native resources maintained by the value can be released. |
| public static void | threadTerminated()
Invokes the TerminatingThreadLocal's |
| private static void | unregister(TerminatingThreadLocal<?>
the ThreadLocal to unregister tl)Unregister given TerminatingThreadLocal |
| REGISTRY | back to summary |
|---|---|
| public static final TerminatingThreadLocal<Collection<TerminatingThreadLocal<?>>> REGISTRY A per-platform-thread registry of TerminatingThreadLocal(s). The registry is itself a TerminatingThreadLocal to keep it reachable until the thread terminates. | |
| TerminatingThreadLocal | back to summary |
|---|---|
| public TerminatingThreadLocal() | |
| _threadTerminated | back to summary |
|---|---|
| private void _threadTerminated() | |
| register | back to summary |
|---|---|
| public static void register(TerminatingThreadLocal<?> tl) Register given TerminatingThreadLocal
| |
| remove | back to summary |
|---|---|
| public void remove() Overrides jdk. Doc from java. Removes the current thread's value for this thread-local
variable. If this thread-local variable is subsequently
read by the current thread, its value will be
reinitialized by invoking its
| |
| set | back to summary |
|---|---|
| public void set(T value) Overrides jdk. Doc from java. Sets the current thread's copy of this thread-local variable
to the specified value. Most subclasses will have no need to
override this method, relying solely on the
| |
| threadTerminated | back to summary |
|---|---|
| protected void threadTerminated(T value) Invoked by a thread when terminating and this thread-local has an associated value for the terminating thread (even if that value is null), so that any native resources maintained by the value can be released.
| |
| threadTerminated | back to summary |
|---|---|
| public static void threadTerminated() Invokes the TerminatingThreadLocal's | |
| unregister | back to summary |
|---|---|
| private static void unregister(TerminatingThreadLocal<?> tl) Unregister given TerminatingThreadLocal
| |