public class ImmediateExecutor extends java.util.concurrent.AbstractExecutorService implements LocalAwareExecutorService
LocalAwareExecutorService.MaximumPoolSizeListener| Modifier and Type | Field and Description |
|---|---|
static ImmediateExecutor |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
execute(java.lang.Runnable command) |
void |
execute(java.lang.Runnable command,
ExecutorLocals locals) |
int |
getActiveTaskCount()
Returns the approximate number of threads that are actively
executing tasks.
|
long |
getCompletedTaskCount()
Returns the approximate total number of tasks that have
completed execution.
|
int |
getCorePoolSize()
Returns maximum pool size of thread pool.
|
int |
getMaximumPoolSize()
Returns maximum pool size of thread pool.
|
int |
getPendingTaskCount()
Returns the approximate total of tasks waiting to be executed.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
maybeExecuteImmediately(java.lang.Runnable command) |
void |
setCorePoolSize(int newCorePoolSize)
Allows user to resize maximum size of the thread pool.
|
void |
setMaximumPoolSize(int newMaximumPoolSize)
Allows user to resize maximum size of the thread pool.
|
void |
shutdown() |
java.util.List<java.lang.Runnable> |
shutdownNow() |
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMaxTasksQueuedpublic static final ImmediateExecutor INSTANCE
public void execute(java.lang.Runnable command,
ExecutorLocals locals)
execute in interface LocalAwareExecutorServicepublic void maybeExecuteImmediately(java.lang.Runnable command)
maybeExecuteImmediately in interface LocalAwareExecutorServicepublic void execute(java.lang.Runnable command)
execute in interface java.util.concurrent.Executorpublic int getActiveTaskCount()
LocalAwareExecutorServicegetActiveTaskCount in interface LocalAwareExecutorServicepublic long getCompletedTaskCount()
LocalAwareExecutorServicegetCompletedTaskCount in interface LocalAwareExecutorServicepublic int getPendingTaskCount()
LocalAwareExecutorServicegetPendingTaskCount in interface LocalAwareExecutorServicepublic int getCorePoolSize()
ResizableThreadPoolgetCorePoolSize in interface ResizableThreadPoolpublic int getMaximumPoolSize()
ResizableThreadPoolgetMaximumPoolSize in interface ResizableThreadPoolpublic void setCorePoolSize(int newCorePoolSize)
ResizableThreadPoolsetCorePoolSize in interface ResizableThreadPoolpublic void setMaximumPoolSize(int newMaximumPoolSize)
ResizableThreadPoolsetMaximumPoolSize in interface ResizableThreadPoolpublic void shutdown()
shutdown in interface java.util.concurrent.ExecutorServicepublic java.util.List<java.lang.Runnable> shutdownNow()
shutdownNow in interface java.util.concurrent.ExecutorServicepublic boolean isShutdown()
isShutdown in interface java.util.concurrent.ExecutorServicepublic boolean isTerminated()
isTerminated in interface java.util.concurrent.ExecutorServicepublic boolean awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit)
awaitTermination in interface java.util.concurrent.ExecutorServiceCopyright © 2009-2022 The Apache Software Foundation