public enum ThreadGroupManager extends java.lang.Enum<ThreadGroupManager>
Enum Constant and Description |
---|
Manager
The manager instance
|
Modifier and Type | Method and Description |
---|---|
java.lang.ThreadGroup |
getBackgroundTaskThreadGroup()
Returns the default thread group for the background tasks
|
java.lang.ThreadGroup |
getMainThreadGroup()
Returns the main thread group for the thread manager
|
java.lang.ThreadGroup |
getNamedChildGroup(java.lang.ThreadGroup parentGroup,
java.lang.String name)
Gets the thread group with the given name from the parent (immediate children only)
|
java.lang.ThreadGroup |
getNamedChildGroup(java.lang.ThreadGroup parentGroup,
java.lang.String name,
java.util.function.Function<? super java.lang.String,? extends java.lang.ThreadGroup> mappingFunction)
Gets the thread group with the given name from the parent (immediate children only).
|
java.lang.ThreadGroup |
getNamedGroup(java.lang.String name)
Returns a thread group with the given name, or creates one as a child of the system group if none currently exists
|
java.lang.ThreadGroup |
getNamedGroup(java.lang.String name,
java.util.function.Function<? super java.lang.String,? extends java.lang.ThreadGroup> mappingFunction)
Returns a thread group with the given name, or creates one using the mapping function if none currently exists
|
java.lang.ThreadGroup |
getSystemThreadGroup()
Returns the system thread group for the JVM
|
static ThreadGroupManager |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ThreadGroupManager[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ThreadGroupManager Manager
public static ThreadGroupManager[] values()
for (ThreadGroupManager c : ThreadGroupManager.values()) System.out.println(c);
public static ThreadGroupManager valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.ThreadGroup getSystemThreadGroup()
public java.lang.ThreadGroup getMainThreadGroup()
@NotNull public java.lang.ThreadGroup getBackgroundTaskThreadGroup()
@NotNull public java.lang.ThreadGroup getNamedGroup(@NotNull java.lang.String name)
name
- The name of the group to get@NotNull public java.lang.ThreadGroup getNamedGroup(@NotNull java.lang.String name, @NotNull java.util.function.Function<? super java.lang.String,? extends java.lang.ThreadGroup> mappingFunction)
name
- The name of the group to getmappingFunction
- The function used to create the thread group if it doesn't already exist@Nullable public java.lang.ThreadGroup getNamedChildGroup(@NotNull java.lang.ThreadGroup parentGroup, @NotNull java.lang.String name)
parentGroup
- The parent groupname
- The name of the child group to get@NotNull public java.lang.ThreadGroup getNamedChildGroup(@NotNull java.lang.ThreadGroup parentGroup, @NotNull java.lang.String name, @NotNull java.util.function.Function<? super java.lang.String,? extends java.lang.ThreadGroup> mappingFunction)
parentGroup
- The parent groupname
- The name of the child group to getmappingFunction
- A function used to create the thread group if it doesn't exist currently