| Modifier and Type | Field and Description |
|---|---|
| private static final VarHandle | |
| private volatile boolean | |
| private static final JavaLangAccess | |
| private volatile Object | |
| private final String | |
| private static final VarHandle | |
| private volatile Set |
| Access | Constructor and Description |
|---|---|
| private | SharedThreadContainer(String
the container name, can be null name)Initialize a new SharedThreadContainer. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public static SharedThreadContainer | create(ThreadContainer parent, String name)
Creates a shared thread container with the given parent and name. |
| public static SharedThreadContainer | |
| public String | name()
Overrides jdk. Return the name of this container, may be null. |
| public void | onExit(Thread thread)
Overrides jdk. Invoked by |
| public void | onStart(Thread thread)
Overrides jdk. Invoked by |
| public Thread | owner()
Overrides jdk. Returns the scope owner or null if not owned. |
| public void | |
| public Stream | threads()
Implements abstract jdk. Returns a stream of the live threads in this container. |
| CLOSED | back to summary |
|---|---|
| private static final VarHandle CLOSED | |
| closed | back to summary |
|---|---|
| private volatile boolean closed | |
| JLA | back to summary |
|---|---|
| private static final JavaLangAccess JLA | |
| key | back to summary |
|---|---|
| private volatile Object key | |
| name | back to summary |
|---|---|
| private final String name | |
| VIRTUAL_THREADS | back to summary |
|---|---|
| private static final VarHandle VIRTUAL_THREADS | |
| virtualThreads | back to summary |
|---|---|
| private volatile Set<Thread> virtualThreads | |
| SharedThreadContainer | back to summary |
|---|---|
| private SharedThreadContainer(String name) Initialize a new SharedThreadContainer.
| |
| close | back to summary |
|---|---|
| public void close() Implements java. Closes this container. Further attempts to start a thread in this container throw IllegalStateException. This method has no impact on threads that are still running or starting around the time that this method is invoked.
| |
| create | back to summary |
|---|---|
| public static SharedThreadContainer create(ThreadContainer parent, String name) Creates a shared thread container with the given parent and name.
| |
| create | back to summary |
|---|---|
| public static SharedThreadContainer create(String name) Creates a shared thread container with the given name. Its parent will be the root thread container. | |
| name | back to summary |
|---|---|
| public String name() Overrides jdk. Doc from jdk. Return the name of this container, may be null.
| |
| 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
| |
| owner | back to summary |
|---|---|
| public Thread owner() Overrides jdk. Doc from jdk. Returns the scope owner or null if not owned.
| |
| start | back to summary |
|---|---|
| public void start(Thread thread) Starts a thread 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.
| |