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, submit
public 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 AbstractLocalAwareExecutorService
public int getMaxTasksQueued()
getMaxTasksQueued
in interface LocalAwareExecutorService
protected void addTask(org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService.FutureTask<?> task)
addTask
in class AbstractLocalAwareExecutorService
public void maybeExecuteImmediately(java.lang.Runnable command)
maybeExecuteImmediately
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) throws java.lang.InterruptedException
awaitTermination
in interface java.util.concurrent.ExecutorService
java.lang.InterruptedException
public int getPendingTaskCount()
LocalAwareExecutorService
getPendingTaskCount
in interface LocalAwareExecutorService
public long getCompletedTaskCount()
LocalAwareExecutorService
getCompletedTaskCount
in interface LocalAwareExecutorService
public int getActiveTaskCount()
LocalAwareExecutorService
getActiveTaskCount
in interface LocalAwareExecutorService
public int getCorePoolSize()
ResizableThreadPool
getCorePoolSize
in interface ResizableThreadPool
public void setCorePoolSize(int newCorePoolSize)
ResizableThreadPool
setCorePoolSize
in interface ResizableThreadPool
public int getMaximumPoolSize()
ResizableThreadPool
getMaximumPoolSize
in interface ResizableThreadPool
public void setMaximumPoolSize(int newMaximumPoolSize)
ResizableThreadPool
setMaximumPoolSize
in interface ResizableThreadPool
Copyright © 2009-2021 The Apache Software Foundation