src/share/classes/java/lang/ThreadGroup.java
Print this page
rev 10048 : 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
Reviewed-by:
@@ -38,11 +38,11 @@
* A thread is allowed to access information about its own thread
* group, but not to access information about its thread group's
* parent thread group or any other thread groups.
*
* @author unascribed
- * @since JDK1.0
+ * @since 1.0
*/
/* The locking strategy for this code is to try to lock only one level of the
* tree wherever possible, but otherwise to lock from the bottom up.
* That is, from child thread groups to parents.
* This has the advantage of limiting the number of locks that need to be held
@@ -88,11 +88,11 @@
*
* @param name the name of the new thread group.
* @exception SecurityException if the current thread cannot create a
* thread in the specified thread group.
* @see java.lang.ThreadGroup#checkAccess()
- * @since JDK1.0
+ * @since 1.0
*/
public ThreadGroup(String name) {
this(Thread.currentThread().getThreadGroup(), name);
}
@@ -109,11 +109,11 @@
* <code>null</code>.
* @exception SecurityException if the current thread cannot create a
* thread in the specified thread group.
* @see java.lang.SecurityException
* @see java.lang.ThreadGroup#checkAccess()
- * @since JDK1.0
+ * @since 1.0
*/
public ThreadGroup(ThreadGroup parent, String name) {
this(checkParentAccess(parent), parent, name);
}
@@ -138,11 +138,11 @@
/**
* Returns the name of this thread group.
*
* @return the name of this thread group.
- * @since JDK1.0
+ * @since 1.0
*/
public final String getName() {
return name;
}
@@ -158,11 +158,11 @@
* @exception SecurityException if the current thread cannot modify
* this thread group.
* @see java.lang.ThreadGroup#checkAccess()
* @see java.lang.SecurityException
* @see java.lang.RuntimePermission
- * @since JDK1.0
+ * @since 1.0
*/
public final ThreadGroup getParent() {
if (parent != null)
parent.checkAccess();
return parent;
@@ -174,11 +174,11 @@
* priority.
*
* @return the maximum priority that a thread in this thread group
* can have.
* @see #setMaxPriority
- * @since JDK1.0
+ * @since 1.0
*/
public final int getMaxPriority() {
return maxPriority;
}
@@ -187,21 +187,21 @@
* daemon thread group is automatically destroyed when its last
* thread is stopped or its last thread group is destroyed.
*
* @return <code>true</code> if this thread group is a daemon thread group;
* <code>false</code> otherwise.
- * @since JDK1.0
+ * @since 1.0
*/
public final boolean isDaemon() {
return daemon;
}
/**
* Tests if this thread group has been destroyed.
*
* @return true if this object is destroyed
- * @since JDK1.1
+ * @since 1.1
*/
public synchronized boolean isDestroyed() {
return destroyed;
}
@@ -219,11 +219,11 @@
* thread group as normal.
* @exception SecurityException if the current thread cannot modify
* this thread group.
* @see java.lang.SecurityException
* @see java.lang.ThreadGroup#checkAccess()
- * @since JDK1.0
+ * @since 1.0
*/
public final void setDaemon(boolean daemon) {
checkAccess();
this.daemon = daemon;
}
@@ -252,11 +252,11 @@
* @exception SecurityException if the current thread cannot modify
* this thread group.
* @see #getMaxPriority
* @see java.lang.SecurityException
* @see java.lang.ThreadGroup#checkAccess()
- * @since JDK1.0
+ * @since 1.0
*/
public final void setMaxPriority(int pri) {
int ngroupsSnapshot;
ThreadGroup[] groupsSnapshot;
synchronized (this) {
@@ -283,11 +283,11 @@
*
* @param g a thread group.
* @return <code>true</code> if this thread group is the thread group
* argument or one of its ancestor thread groups;
* <code>false</code> otherwise.
- * @since JDK1.0
+ * @since 1.0
*/
public final boolean parentOf(ThreadGroup g) {
for (; g != null ; g = g.parent) {
if (g == this) {
return true;
@@ -305,11 +305,11 @@
* in throwing a <code>SecurityException</code>.
*
* @exception SecurityException if the current thread is not allowed to
* access this thread group.
* @see java.lang.SecurityManager#checkAccess(java.lang.ThreadGroup)
- * @since JDK1.0
+ * @since 1.0
*/
public final void checkAccess() {
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkAccess(this);
@@ -329,11 +329,11 @@
*
* @return an estimate of the number of active threads in this thread
* group and in any other thread group that has this thread
* group as an ancestor
*
- * @since JDK1.0
+ * @since 1.0
*/
public int activeCount() {
int result;
// Snapshot sub-group data so we don't hold this lock
// while our children are computing.
@@ -375,11 +375,11 @@
*
* @throws SecurityException
* if {@linkplain #checkAccess checkAccess} determines that
* the current thread cannot access this thread group
*
- * @since JDK1.0
+ * @since 1.0
*/
public int enumerate(Thread list[]) {
checkAccess();
return enumerate(list, 0, true);
}
@@ -413,11 +413,11 @@
*
* @throws SecurityException
* if {@linkplain #checkAccess checkAccess} determines that
* the current thread cannot access this thread group
*
- * @since JDK1.0
+ * @since 1.0
*/
public int enumerate(Thread list[], boolean recurse) {
checkAccess();
return enumerate(list, 0, recurse);
}
@@ -466,11 +466,11 @@
* debugging and monitoring purposes.
*
* @return the number of active thread groups with this thread group as
* an ancestor
*
- * @since JDK1.0
+ * @since 1.0
*/
public int activeGroupCount() {
int ngroupsSnapshot;
ThreadGroup[] groupsSnapshot;
synchronized (this) {
@@ -509,11 +509,11 @@
*
* @throws SecurityException
* if {@linkplain #checkAccess checkAccess} determines that
* the current thread cannot access this thread group
*
- * @since JDK1.0
+ * @since 1.0
*/
public int enumerate(ThreadGroup list[]) {
checkAccess();
return enumerate(list, 0, true);
}
@@ -547,11 +547,11 @@
*
* @throws SecurityException
* if {@linkplain #checkAccess checkAccess} determines that
* the current thread cannot access this thread group
*
- * @since JDK1.0
+ * @since 1.0
*/
public int enumerate(ThreadGroup list[], boolean recurse) {
checkAccess();
return enumerate(list, 0, recurse);
}
@@ -601,11 +601,11 @@
* to access this thread group or any of the threads in
* the thread group.
* @see java.lang.SecurityException
* @see java.lang.Thread#stop()
* @see java.lang.ThreadGroup#checkAccess()
- * @since JDK1.0
+ * @since 1.0
* @deprecated This method is inherently unsafe. See
* {@link Thread#stop} for details.
*/
@Deprecated
public final void stop() {
@@ -663,11 +663,11 @@
* to access this thread group or any of the threads in
* the thread group.
* @see java.lang.Thread#suspend()
* @see java.lang.SecurityException
* @see java.lang.ThreadGroup#checkAccess()
- * @since JDK1.0
+ * @since 1.0
* @deprecated This method is inherently deadlock-prone. See
* {@link Thread#suspend} for details.
*/
@Deprecated
@SuppressWarnings("deprecation")
@@ -724,11 +724,11 @@
* access this thread group or any of the threads in the
* thread group.
* @see java.lang.SecurityException
* @see java.lang.Thread#resume()
* @see java.lang.ThreadGroup#checkAccess()
- * @since JDK1.0
+ * @since 1.0
* @deprecated This method is used solely in conjunction with
* <tt>Thread.suspend</tt> and <tt>ThreadGroup.suspend</tt>,
* both of which have been deprecated, as they are inherently
* deadlock-prone. See {@link Thread#suspend} for details.
*/
@@ -765,11 +765,11 @@
* @exception IllegalThreadStateException if the thread group is not
* empty or if the thread group has already been destroyed.
* @exception SecurityException if the current thread cannot modify this
* thread group.
* @see java.lang.ThreadGroup#checkAccess()
- * @since JDK1.0
+ * @since 1.0
*/
public final void destroy() {
int ngroupsSnapshot;
ThreadGroup[] groupsSnapshot;
synchronized (this) {
@@ -978,11 +978,11 @@
/**
* Prints information about this thread group to the standard
* output. This method is useful only for debugging.
*
- * @since JDK1.0
+ * @since 1.0
*/
public void list() {
list(System.out, 0);
}
void list(PrintStream out, int indent) {
@@ -1043,11 +1043,11 @@
* <code>ThreadGroup</code> to provide alternative handling of
* uncaught exceptions.
*
* @param t the thread that is about to exit.
* @param e the uncaught exception.
- * @since JDK1.0
+ * @since 1.0
*/
public void uncaughtException(Thread t, Throwable e) {
if (parent != null) {
parent.uncaughtException(t, e);
} else {
@@ -1066,11 +1066,11 @@
/**
* Used by VM to control lowmem implicit suspension.
*
* @param b boolean to allow or disallow suspension
* @return true on success
- * @since JDK1.1
+ * @since 1.1
* @deprecated The definition of this call depends on {@link #suspend},
* which is deprecated. Further, the behavior of this call
* was never specified.
*/
@Deprecated
@@ -1084,11 +1084,11 @@
/**
* Returns a string representation of this Thread group.
*
* @return a string representation of this thread group.
- * @since JDK1.0
+ * @since 1.0
*/
public String toString() {
return getClass().getName() + "[name=" + getName() + ",maxpri=" + maxPriority + "]";
}
}