public class ImmediateExecutor extends java.util.concurrent.AbstractExecutorService implements LocalAwareExecutorService
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 |
getMaximumPoolSize()
Returns the maximum allowed number of threads.
|
int |
getPendingTaskCount()
Returns the approximate total of tasks waiting to be executed.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
maybeExecuteImmediately(java.lang.Runnable command) |
void |
shutdown() |
java.util.List<java.lang.Runnable> |
shutdownNow() |
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMaxTasksQueued
public static final ImmediateExecutor INSTANCE
public void execute(java.lang.Runnable command, ExecutorLocals locals)
execute
in interface LocalAwareExecutorService
public void maybeExecuteImmediately(java.lang.Runnable command)
maybeExecuteImmediately
in interface LocalAwareExecutorService
public void execute(java.lang.Runnable command)
execute
in interface java.util.concurrent.Executor
public int getActiveTaskCount()
LocalAwareExecutorService
getActiveTaskCount
in interface LocalAwareExecutorService
public long getCompletedTaskCount()
LocalAwareExecutorService
getCompletedTaskCount
in interface LocalAwareExecutorService
public int getPendingTaskCount()
LocalAwareExecutorService
getPendingTaskCount
in interface LocalAwareExecutorService
public int getMaximumPoolSize()
LocalAwareExecutorService
getMaximumPoolSize
in interface LocalAwareExecutorService
public void shutdown()
shutdown
in interface java.util.concurrent.ExecutorService
public java.util.List<java.lang.Runnable> shutdownNow()
shutdownNow
in interface java.util.concurrent.ExecutorService
public boolean isShutdown()
isShutdown
in interface java.util.concurrent.ExecutorService
public boolean isTerminated()
isTerminated
in interface java.util.concurrent.ExecutorService
public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
awaitTermination
in interface java.util.concurrent.ExecutorService
Copyright © 2009-2019 The Apache Software Foundation