public final void destroy():
Destroys this thread group and all of its subgroups. This thread group must be empty, indicating that all threads that had been in this thread group have since stopped.
First, the checkAccess
method of this thread group is called with no arguments; this may result in a security exception.
public int activeGroupCount():
The value returned is only an estimate because the number of thread groups may change dynamically while this method traverses internal data structures. This method is intended primarily for debugging and monitoring purposes.
public final void checkAccess():
If there is a security manager, its checkAccess
method is called with this thread group as its argument. This may result in throwing a SecurityException
.
public final void setMaxPriority(int pri):
Sets the maximum priority of the group. Threads in the thread group that already have a higher priority are not affected.
First, the checkAccess
method of this thread group is called with no arguments; this may result in a security exception.
If the pri
argument is less than Thread.MIN_PRIORITY
or greater than Thread.MAX_PRIORITY
, the maximum priority of the group remains unchanged.
Otherwise, the priority of this ThreadGroup object is set to the smaller of the specified pri
and the maximum permitted priority of the parent of this thread group. (If this thread group is the system thread group, which has no parent, then its maximum priority is simply set to pri
.) Then this method is called recursively, with pri
as its argument, for every thread group that belongs to this thread group.