| Package | Description |
|---|---|
| java.lang |
Provides classes that are fundamental to the design of the Java programming language.
|
| java.util.concurrent |
Utility classes commonly useful in concurrent programming.
|
| java.util.concurrent.locks |
Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors.
|
| javax.swing.text |
Provides classes and interfaces that deal with editable and noneditable text components.
|
| Modifier and Type | Method and Description |
|---|---|
static Thread |
Thread.currentThread()
Returns a reference to the currently executing thread object.
|
| Modifier and Type | Method and Description |
|---|---|
static Map |
Thread.getAllStackTraces()
Returns a map of stack traces for all live threads.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Runtime.addShutdownHook(Thread
Registers a new virtual-machine shutdown hook.
|
void |
SecurityManager.checkAccess(Thread
Throws a
SecurityException if the calling thread is not allowed to modify the thread argument.
|
static int |
Thread.enumerate(Thread
Copies into the specified array every active thread in the current thread's thread group and its subgroups.
|
int |
ThreadGroup.enumerate(Thread
Copies into the specified array every active thread in this thread group and its subgroups.
|
int |
ThreadGroup.enumerate(Thread
Copies into the specified array every active thread in this thread group.
|
boolean |
Runtime.removeShutdownHook(Thread
De-registers a previously-registered virtual-machine shutdown hook.
|
void |
Thread.UncaughtExceptionHandler.uncaughtException(Thread
Method invoked when the given thread terminates due to the given uncaught exception.
|
void |
ThreadGroup.uncaughtException(Thread
Called 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.UncaughtExceptionHandler installed.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ForkJoinWorkerThread
A thread managed by a
ForkJoinPool, which executes
ForkJoinTasks.
|
| Modifier and Type | Method and Description |
|---|---|
Thread |
ThreadFactory.newThread(Runnable
Constructs a new
Thread.
|
| Modifier and Type | Method and Description |
|---|---|
protected Collection |
Semaphore.getQueuedThreads()
Returns a collection containing threads that may be waiting to acquire.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
ThreadPoolExecutor.beforeExecute(Thread
Method invoked prior to executing the given Runnable in the given thread.
|
void |
TimeUnit.timedJoin(Thread
Performs a timed
Thread.join using this time unit.
|
| Modifier and Type | Method and Description |
|---|---|
protected Thread |
AbstractOwnableSynchronizer.getExclusiveOwnerThread()
Returns the thread last set by
setExclusiveOwnerThread, or
null if never set.
|
Thread |
AbstractQueuedSynchronizer.getFirstQueuedThread()
Returns the first (longest-waiting) thread in the queue, or
null if no threads are currently queued.
|
Thread |
AbstractQueuedLongSynchronizer.getFirstQueuedThread()
Returns the first (longest-waiting) thread in the queue, or
null if no threads are currently queued.
|
protected Thread |
ReentrantLock.getOwner()
Returns the thread that currently owns this lock, or
null if not owned.
|
protected Thread |
ReentrantReadWriteLock.getOwner()
Returns the thread that currently owns the write lock, or
null if not owned.
|
| Modifier and Type | Method and Description |
|---|---|
Collection |
AbstractQueuedSynchronizer.getExclusiveQueuedThreads()
Returns a collection containing threads that may be waiting to acquire in exclusive mode.
|
Collection |
AbstractQueuedLongSynchronizer.getExclusiveQueuedThreads()
Returns a collection containing threads that may be waiting to acquire in exclusive mode.
|
protected Collection |
ReentrantReadWriteLock.getQueuedReaderThreads()
Returns a collection containing threads that may be waiting to acquire the read lock.
|
protected Collection |
ReentrantLock.getQueuedThreads()
Returns a collection containing threads that may be waiting to acquire this lock.
|
Collection |
AbstractQueuedSynchronizer.getQueuedThreads()
Returns a collection containing threads that may be waiting to acquire.
|
protected Collection |
ReentrantReadWriteLock.getQueuedThreads()
Returns a collection containing threads that may be waiting to acquire either the read or write lock.
|
Collection |
AbstractQueuedLongSynchronizer.getQueuedThreads()
Returns a collection containing threads that may be waiting to acquire.
|
protected Collection |
ReentrantReadWriteLock.getQueuedWriterThreads()
Returns a collection containing threads that may be waiting to acquire the write lock.
|
Collection |
AbstractQueuedSynchronizer.getSharedQueuedThreads()
Returns a collection containing threads that may be waiting to acquire in shared mode.
|
Collection |
AbstractQueuedLongSynchronizer.getSharedQueuedThreads()
Returns a collection containing threads that may be waiting to acquire in shared mode.
|
protected Collection |
AbstractQueuedSynchronizer.ConditionObject.getWaitingThreads()
Returns a collection containing those threads that may be waiting on this Condition.
|
protected Collection |
AbstractQueuedLongSynchronizer.ConditionObject.getWaitingThreads()
Returns a collection containing those threads that may be waiting on this Condition.
|
Collection |
AbstractQueuedLongSynchronizer.getWaitingThreads(AbstractQueuedLongSynchronizer
Returns a collection containing those threads that may be waiting on the given condition associated with this synchronizer.
|
Collection |
AbstractQueuedSynchronizer.getWaitingThreads(AbstractQueuedSynchronizer
Returns a collection containing those threads that may be waiting on the given condition associated with this synchronizer.
|
protected Collection |
ReentrantLock.getWaitingThreads(Condition
Returns a collection containing those threads that may be waiting on the given condition associated with this lock.
|
protected Collection |
ReentrantReadWriteLock.getWaitingThreads(Condition
Returns a collection containing those threads that may be waiting on the given condition associated with the write lock.
|
| Modifier and Type | Method and Description |
|---|---|
static Object |
LockSupport.getBlocker(Thread
Returns the blocker object supplied to the most recent invocation of a park method that has not yet unblocked, or null if not blocked.
|
boolean |
ReentrantLock.hasQueuedThread(Thread
Queries whether the given thread is waiting to acquire this lock.
|
boolean |
ReentrantReadWriteLock.hasQueuedThread(Thread
Queries whether the given thread is waiting to acquire either the read or write lock.
|
boolean |
AbstractQueuedSynchronizer.isQueued(Thread
Returns true if the given thread is currently queued.
|
boolean |
AbstractQueuedLongSynchronizer.isQueued(Thread
Returns true if the given thread is currently queued.
|
protected void |
AbstractOwnableSynchronizer.setExclusiveOwnerThread(Thread
Sets the thread that currently owns exclusive access.
|
static void |
LockSupport.unpark(Thread
Makes available the permit for the given thread, if it was not already available.
|
| Modifier and Type | Method and Description |
|---|---|
protected Thread |
AbstractDocument.getCurrentWriter()
Fetches the current writing thread if there is one.
|