Uses of Class
java.lang.Thread
-
Packages that use Thread 软件包 描述 java.lang 提供对Java编程语言设计至关重要的类。java.util.concurrent 实用类通常在并发编程中有用。java.util.concurrent.locks 接口和类,提供用于锁定和等待与内置同步和监视器不同的条件的框架。javax.swing.text 提供处理可编辑和不可编辑文本组件的类和接口。 -
-
Uses of Thread in java.lang
Methods in java.lang that return Thread 变量和类型 方法 描述 static ThreadThread. currentThread()返回对当前正在执行的线程对象的引用。Methods in java.lang that return types with arguments of type Thread 变量和类型 方法 描述 static Map<Thread,StackTraceElement[]>Thread. getAllStackTraces()返回所有活动线程的堆栈跟踪映射。Methods in java.lang with parameters of type Thread 变量和类型 方法 描述 voidRuntime. addShutdownHook(Thread hook)注册新的虚拟机关闭挂钩。voidSecurityManager. checkAccess(Thread t)如果不允许调用线程修改线程参数,则抛出SecurityException。static intThread. enumerate(Thread[] tarray)将当前线程的线程组及其子组中的每个活动线程复制到指定的数组中。intThreadGroup. enumerate(Thread[] list)将此线程组及其子组中的每个活动线程复制到指定的数组中。intThreadGroup. enumerate(Thread[] list, boolean recurse)将此线程组中的每个活动线程复制到指定的数组中。booleanRuntime. removeShutdownHook(Thread hook)取消注册先前注册的虚拟机关闭挂钩。voidThread.UncaughtExceptionHandler. uncaughtException(Thread t, Throwable e)当给定线程由于给定的未捕获异常而终止时调用的方法。voidThreadGroup. uncaughtException(Thread t, Throwable e)当此线程组中的线程因未捕获的异常而停止时,由Java虚拟机调用,并且该线程没有安装特定的Thread.UncaughtExceptionHandler。 -
Uses of Thread in java.util.concurrent
Subclasses of Thread in java.util.concurrent 变量和类型 类 描述 classForkJoinWorkerThread由ForkJoinPool管理的线程,执行ForkJoinTask。Methods in java.util.concurrent that return Thread 变量和类型 方法 描述 ThreadThreadFactory. newThread(Runnable r)构造一个新的Thread。Methods in java.util.concurrent that return types with arguments of type Thread 变量和类型 方法 描述 protected Collection<Thread>Semaphore. getQueuedThreads()返回包含可能正在等待获取的线程的集合。Methods in java.util.concurrent with parameters of type Thread 变量和类型 方法 描述 protected voidThreadPoolExecutor. beforeExecute(Thread t, Runnable r)在给定线程中执行给定Runnable之前调用的方法。voidTimeUnit. timedJoin(Thread thread, long timeout)使用此时间单位执行定时Thread.join。 -
Uses of Thread in java.util.concurrent.locks
Methods in java.util.concurrent.locks that return Thread 变量和类型 方法 描述 protected ThreadAbstractOwnableSynchronizer. getExclusiveOwnerThread()返回最后由setExclusiveOwnerThread设置的线程,如果从未设置,则返回null。ThreadAbstractQueuedLongSynchronizer. getFirstQueuedThread()返回队列中的第一个(等待时间最长的)线程,如果当前没有线程排队,则null。ThreadAbstractQueuedSynchronizer. getFirstQueuedThread()返回队列中的第一个(等待时间最长的)线程,如果当前没有线程排队,则null。protected ThreadReentrantLock. getOwner()返回当前拥有此锁的线程,如果不拥有,则返回null。protected ThreadReentrantReadWriteLock. getOwner()返回当前拥有写锁定的线程,如果不拥有,则返回null。Methods in java.util.concurrent.locks that return types with arguments of type Thread 变量和类型 方法 描述 Collection<Thread>AbstractQueuedLongSynchronizer. getExclusiveQueuedThreads()返回包含可能等待以独占模式获取的线程的集合。Collection<Thread>AbstractQueuedSynchronizer. getExclusiveQueuedThreads()返回包含可能等待以独占模式获取的线程的集合。protected Collection<Thread>ReentrantReadWriteLock. getQueuedReaderThreads()返回包含可能正在等待获取读锁定的线程的集合。Collection<Thread>AbstractQueuedLongSynchronizer. getQueuedThreads()返回包含可能正在等待获取的线程的集合。Collection<Thread>AbstractQueuedSynchronizer. getQueuedThreads()返回包含可能正在等待获取的线程的集合。protected Collection<Thread>ReentrantLock. getQueuedThreads()返回包含可能正在等待获取此锁的线程的集合。protected Collection<Thread>ReentrantReadWriteLock. getQueuedThreads()返回包含可能正在等待获取读取或写入锁定的线程的集合。protected Collection<Thread>ReentrantReadWriteLock. getQueuedWriterThreads()返回包含可能正在等待获取写锁定的线程的集合。Collection<Thread>AbstractQueuedLongSynchronizer. getSharedQueuedThreads()返回包含可能正在等待以共享模式获取的线程的集合。Collection<Thread>AbstractQueuedSynchronizer. getSharedQueuedThreads()返回包含可能正在等待以共享模式获取的线程的集合。protected Collection<Thread>AbstractQueuedLongSynchronizer.ConditionObject. getWaitingThreads()返回包含可能在此条件上等待的那些线程的集合。Collection<Thread>AbstractQueuedLongSynchronizer. getWaitingThreads(AbstractQueuedLongSynchronizer.ConditionObject condition)返回一个集合,其中包含可能正在等待与此同步器关联的给定条件的那些线程。protected Collection<Thread>AbstractQueuedSynchronizer.ConditionObject. getWaitingThreads()返回包含可能在此条件上等待的那些线程的集合。Collection<Thread>AbstractQueuedSynchronizer. getWaitingThreads(AbstractQueuedSynchronizer.ConditionObject condition)返回一个集合,其中包含可能正在等待与此同步器关联的给定条件的那些线程。protected Collection<Thread>ReentrantLock. getWaitingThreads(Condition condition)返回一个集合,其中包含可能正在等待与此锁定关联的给定条件的那些线程。protected Collection<Thread>ReentrantReadWriteLock. getWaitingThreads(Condition condition)返回一个集合,其中包含可能正在等待与写入锁定关联的给定条件的那些线程。Methods in java.util.concurrent.locks with parameters of type Thread 变量和类型 方法 描述 static ObjectLockSupport. getBlocker(Thread t)返回提供给尚未解除阻塞的park方法的最新调用的阻止程序对象,如果未阻止,则返回null。booleanReentrantLock. hasQueuedThread(Thread thread)查询给定线程是否正在等待获取此锁定。booleanReentrantReadWriteLock. hasQueuedThread(Thread thread)查询给定线程是否正在等待获取读或写锁。booleanAbstractQueuedLongSynchronizer. isQueued(Thread thread)如果给定线程当前已排队,则返回true。booleanAbstractQueuedSynchronizer. isQueued(Thread thread)如果给定线程当前已排队,则返回true。protected voidAbstractOwnableSynchronizer. setExclusiveOwnerThread(Thread thread)设置当前拥有独占访问权限的线程。static voidLockSupport. unpark(Thread thread)如果给定线程尚不可用,则为其提供许可。 -
Uses of Thread in javax.swing.text
Methods in javax.swing.text that return Thread 变量和类型 方法 描述 protected ThreadAbstractDocument. getCurrentWriter()获取当前写入线程(如果有)。
-