ThreadGroup (Java SE 26 & JDK 26)
- All Implemented Interfaces:
Thread.UncaughtExceptionHandler
-
Constructor Summary
Constructors
Constructs a new thread group.
Creates a new thread group.
-
Method Summary
intReturns an estimate of the number of live platform threads in this thread group and its subgroups.
intReturns an estimate of the number of groups in this thread group and its subgroups.
final voidDeprecated, for removal: This API element is subject to removal in a future version.
final voiddestroy()Deprecated, for removal: This API element is subject to removal in a future version.
intCopies into the specified array every live platform thread in this thread group and its subgroups.
intenumerate(Thread[] list, boolean recurse) Copies into the specified array every live platform thread in this thread group.
intCopies into the specified array references to every subgroup in this thread group and its subgroups.
intCopies into the specified array references to every subgroup in this thread group.
final intReturns the maximum priority of this thread group.
getName()Returns the name of this thread group.
Returns the parent of this thread group.
final voidInterrupts all live platform threads in this thread group and its subgroups.
final booleanisDaemon()Deprecated, for removal: This API element is subject to removal in a future version.
booleanDeprecated, for removal: This API element is subject to removal in a future version.
voidlist()Prints information about this thread group to the standard output.
final booleanTests if this thread group is either the thread group argument or one of its ancestor thread groups.
final voidsetDaemon(boolean daemon) Deprecated, for removal: This API element is subject to removal in a future version.
final voidsetMaxPriority(int pri) Sets the maximum priority of the group.
toString()Returns a string representation of this Thread group.
voidCalled by the Java Virtual Machine when a thread in this thread group stops because of an uncaught exception, and the thread does not have a specific
Thread.UncaughtExceptionHandlerinstalled.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitCreates and returns a copy of this object.
booleanIndicates whether some other object is "equal to" this one.
protected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.intReturns a hash code value for this object.
final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Constructor Details
-
ThreadGroup
-
ThreadGroup
-
-
Method Details
-
getName
-
getParent
-
getMaxPriority
-
isDaemon
-
isDestroyed
-
setDaemon
-
setMaxPriority
-
parentOf
-
checkAccess
-
activeCount
-
enumerate
-
enumerate
-
activeGroupCount
-
enumerate
-
enumerate
-
interrupt
-
destroy
-
list
-
uncaughtException
-
toString
-