public class SEPExecutor extends AbstractLocalAwareExecutorService implements SEPExecutorMBean
| Modifier and Type | Class and Description |
|---|---|
static class |
SEPExecutor.TakeTaskPermitResult |
LocalAwareExecutorService.MaximumPoolSizeListener| Modifier and Type | Field and Description |
|---|---|
ThreadPoolMetrics |
metrics |
java.lang.String |
name |
protected java.util.concurrent.ConcurrentLinkedQueue<org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService.FutureTask<?>> |
tasks |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTask(org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService.FutureTask<?> task) |
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit) |
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 |
getMaxTasksQueued() |
int |
getPendingTaskCount()
Returns the approximate total of tasks waiting to be executed.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
maybeExecuteImmediately(java.lang.Runnable command) |
protected void |
onCompletion() |
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() |
execute, execute, invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, newTaskFor, submit, submit, submitpublic final java.lang.String name
public final ThreadPoolMetrics metrics
protected final java.util.concurrent.ConcurrentLinkedQueue<org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService.FutureTask<?>> tasks
protected void onCompletion()
onCompletion in class AbstractLocalAwareExecutorServicepublic int getMaxTasksQueued()
getMaxTasksQueued in interface LocalAwareExecutorServiceprotected void addTask(org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService.FutureTask<?> task)
addTask in class AbstractLocalAwareExecutorServicepublic void maybeExecuteImmediately(java.lang.Runnable command)
maybeExecuteImmediately in interface LocalAwareExecutorServicepublic 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)
throws java.lang.InterruptedException
awaitTermination in interface java.util.concurrent.ExecutorServicejava.lang.InterruptedExceptionpublic int getPendingTaskCount()
LocalAwareExecutorServicegetPendingTaskCount in interface LocalAwareExecutorServicepublic long getCompletedTaskCount()
LocalAwareExecutorServicegetCompletedTaskCount in interface LocalAwareExecutorServicepublic int getActiveTaskCount()
LocalAwareExecutorServicegetActiveTaskCount in interface LocalAwareExecutorServicepublic int getCorePoolSize()
ResizableThreadPoolgetCorePoolSize in interface ResizableThreadPoolpublic void setCorePoolSize(int newCorePoolSize)
ResizableThreadPoolsetCorePoolSize in interface ResizableThreadPoolpublic int getMaximumPoolSize()
ResizableThreadPoolgetMaximumPoolSize in interface ResizableThreadPoolpublic void setMaximumPoolSize(int newMaximumPoolSize)
ResizableThreadPoolsetMaximumPoolSize in interface ResizableThreadPoolCopyright © 2009-2020 The Apache Software Foundation