| Modifier and Type | Class and Description |
|---|---|
| private abstract static class | ThreadContainers.
Root container that "contains" all platform threads not started in a container. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Set | |
| private static final JavaLangAccess | |
| private static final ReferenceQueue | |
| private static final ThreadContainers. | |
| private static final boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static Stream | |
| public static ThreadContainer | |
| public static void | deregisterContainer(Object key)
Removes a thread container from being tracked by specifying the key returned when the thread container was registered. |
| private static void | |
| private static ThreadContainer | next(ThreadContainer container)
Returns the thread container that the given thread container encloses. |
| pack-priv static ThreadContainer | |
| public static Object | registerContainer(ThreadContainer container)
Registers a thread container to be tracked this class, returning a key that is used to remove it from the registry. |
| public static ThreadContainer | |
| private static ThreadContainer | |
| public static boolean |
| CONTAINER_REGISTRY | back to summary |
|---|---|
| private static final Set<WeakReference<ThreadContainer>> CONTAINER_REGISTRY | |
| JLA | back to summary |
|---|---|
| private static final JavaLangAccess JLA | |
| QUEUE | back to summary |
|---|---|
| private static final ReferenceQueue<Object> QUEUE | |
| ROOT_CONTAINER | back to summary |
|---|---|
| private static final ThreadContainers. | |
| TRACK_ALL_THREADS | back to summary |
|---|---|
| private static final boolean TRACK_ALL_THREADS | |
| ThreadContainers | back to summary |
|---|---|
| private ThreadContainers() | |
| children | back to summary |
|---|---|
| pack-priv static Stream Returns given thread container's "children". | |
| container | back to summary |
|---|---|
| public static ThreadContainer container(Thread thread) Returns the thread container that the given Thread is in or the root container if not started in a container.
| |
| deregisterContainer | back to summary |
|---|---|
| public static void deregisterContainer(Object key) Removes a thread container from being tracked by specifying the key returned when the thread container was registered. | |
| expungeStaleEntries | back to summary |
|---|---|
| private static void expungeStaleEntries() Expunge stale entries from the container registry. | |
| next | back to summary |
|---|---|
| private static ThreadContainer next(ThreadContainer container) Returns the thread container that the given thread container encloses. | |
| parent | back to summary |
|---|---|
| pack-priv static ThreadContainer parent(ThreadContainer container) Returns the parent of the given thread container. If the container has an owner then its parent is the enclosing container when nested, or the container that the owner is in, when not nested. If the container does not have an owner then the root container is returned, or null if called with the root container. | |
| registerContainer | back to summary |
|---|---|
| public static Object registerContainer(ThreadContainer container) Registers a thread container to be tracked this class, returning a key that is used to remove it from the registry. | |
| root | back to summary |
|---|---|
| public static ThreadContainer root() Returns the root thread container. | |
| top | back to summary |
|---|---|
| private static ThreadContainer top(Thread thread) Returns the top-most thread container owned by the given thread. | |
| trackAllThreads | back to summary |
|---|---|
| public static boolean trackAllThreads() Returns true if all threads are tracked. | |
| Modifier and Type | Class and Description |
|---|---|
| private static class | ThreadContainers.
Root container that tracks all platform threads and just keeps a count of the virtual threads. |
| private static class | ThreadContainers.
Root container that tracks all threads. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public String | name()
Overrides jdk. Return the name of this container, may be null. |
| public ThreadContainer | parent()
Overrides jdk. Returns the parent of this container or null if this is the root container. |
| protected Stream | platformThreads()
Returns the platform threads that are not in the container as these threads are considered to be in the root container. |
| public StackableScope | previous()
Overrides jdk. Returns the scope that directly encloses this scope, null if none. |
| public String | toString()
Overrides jdk. Returns a string representation of the object. |
| RootContainer | back to summary |
|---|---|
| protected RootContainer() | |
| name | back to summary |
|---|---|
| public String name() Overrides jdk. Doc from jdk. Return the name of this container, may be null.
| |
| parent | back to summary |
|---|---|
| public ThreadContainer parent() Overrides jdk. Doc from jdk. Returns the parent of this container or null if this is the root container.
| |
| platformThreads | back to summary |
|---|---|
| protected Stream Returns the platform threads that are not in the container as these threads are considered to be in the root container. | |
| previous | back to summary |
|---|---|
| public StackableScope previous() Overrides jdk. Doc from jdk. Returns the scope that directly encloses this scope, null if none.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides jdk. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final LongAdder |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | onExit(Thread thread)
Overrides jdk. Invoked by |
| public void | onStart(Thread thread)
Overrides jdk. Invoked by |
| public long | threadCount()
Overrides jdk. Return a count of the number of threads in this container. |
| public Stream | threads()
Implements abstract jdk. Returns a stream of the live threads in this container. |
| VTHREAD_COUNT | back to summary |
|---|---|
| private static final LongAdder VTHREAD_COUNT | |
| CountingRootContainer | back to summary |
|---|---|
| private CountingRootContainer() | |
| onExit | back to summary |
|---|---|
| public void onExit(Thread thread) Overrides jdk. Doc from jdk. Invoked by
| |
| onStart | back to summary |
|---|---|
| public void onStart(Thread thread) Overrides jdk. Doc from jdk. Invoked by
| |
| threadCount | back to summary |
|---|---|
| public long threadCount() Overrides jdk. Doc from jdk. Return a count of the number of threads in this container.
| |
| threads | back to summary |
|---|---|
| public Stream Implements abstract jdk. Doc from jdk. Returns a stream of the live threads in this container.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | onExit(Thread thread)
Overrides jdk. Invoked by |
| public void | onStart(Thread thread)
Overrides jdk. Invoked by |
| public long | threadCount()
Overrides jdk. Return a count of the number of threads in this container. |
| public Stream | threads()
Implements abstract jdk. Returns a stream of the live threads in this container. |
| VTHREADS | back to summary |
|---|---|
| private static final Set<Thread> VTHREADS | |
| TrackingRootContainer | back to summary |
|---|---|
| private TrackingRootContainer() | |
| onExit | back to summary |
|---|---|
| public void onExit(Thread thread) Overrides jdk. Doc from jdk. Invoked by
| |
| onStart | back to summary |
|---|---|
| public void onStart(Thread thread) Overrides jdk. Doc from jdk. Invoked by
| |
| threadCount | back to summary |
|---|---|
| public long threadCount() Overrides jdk. Doc from jdk. Return a count of the number of threads in this container.
| |
| threads | back to summary |
|---|---|
| public Stream Implements abstract jdk. Doc from jdk. Returns a stream of the live threads in this container.
| |