| Method Summary | |
|---|---|
| static Callable<T> |
Returns a Callable object that, when called, runs the given task and returns the given result. |
| static Callable<Object> |
Returns a Callable object that, when called, runs the given task and returns null. |
| static Callable<Object> |
Returns a Callable object that, when called, runs the given privileged action and returns its result. |
| static Callable<Object> |
Returns a Callable object that, when called, runs the given privileged exception action and returns its result. |
| static ThreadFactory |
Returns a default thread factory used to create new threads. |
| static ExecutorService |
Creates a thread pool that creates new threads as needed, but will reuse previously constructed threads when they are available. |
| static ExecutorService |
Creates a thread pool that creates new threads as needed, but will reuse previously constructed threads when they are available, and uses the provided ThreadFactory to create new threads when needed. |
| static ExecutorService |
Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue. |
| static ExecutorService |
Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue, using the provided ThreadFactory to create new threads when needed. |
| static ScheduledExecutorService |
Creates a thread pool that can schedule commands to run after a given delay, or to execute periodically. |
| static ScheduledExecutorService |
Creates a thread pool that can schedule commands to run after a given delay, or to execute periodically. |
| static ExecutorService |
Creates an Executor that uses a single worker thread operating off an unbounded queue. |
| static ExecutorService |
Creates an Executor that uses a single worker thread operating off an unbounded queue, and uses the provided ThreadFactory to create a new thread when needed. |
| static ScheduledExecutorService |
Creates a single-threaded executor that can schedule commands to run after a given delay, or to execute periodically. |
| static ScheduledExecutorService |
Creates a single-threaded executor that can schedule commands to run after a given delay, or to execute periodically. |
| static Callable<T> |
Returns a Callable object that will, when called, execute the given callable under the current access control context. |
| static Callable<T> |
Returns a Callable object that will, when called, execute the given callable under the current access control context, with the current context class loader as the context class loader. |
| static ThreadFactory |
Returns a thread factory used to create new threads that have the same permissions as the current thread. |
| static ExecutorService |
Returns an object that delegates all defined ExecutorService methods to the given executor, but not any other methods that might otherwise be accessible using casts. |
| static ScheduledExecutorService |
Returns an object that delegates all defined ScheduledExecutorService methods to the given executor, but not any other methods that might otherwise be accessible using casts. |
| Methods inherited from java.langObject |
|---|
public static
ScheduledExecutorService
newScheduledThreadPool
(
int
corePoolSize,
ThreadFactory
threadFactory
)
public static
ScheduledExecutorService
newSingleThreadScheduledExecutor
(
ThreadFactory
threadFactory
)
Note that while tasks running within such threads will have the same access control and class loader settings as the current thread, they need not have the same ThreadLocal or InheritableThreadLocal values. If necessary, particular values of thread locals can be set or reset before any task runs in ThreadPoolExecutor subclasses using beforeExecute(Thread, Runnable) . Also, if it is necessary to initialize worker threads to have the same InheritableThreadLocal settings as some other designated thread, you can create a custom ThreadFactory in which that thread waits for and services requests to create others that will inherit its values.
public static
ScheduledExecutorService
unconfigurableScheduledExecutorService
(
ScheduledExecutorService
executor
)