net.therore.concurrent
Class SelfTuningExecutorService
java.lang.Object
java.util.concurrent.AbstractExecutorService
net.therore.concurrent.SelfTuningExecutorService
- All Implemented Interfaces:
- Executor, ExecutorService, SelfTuningExecutorServiceMBean
public class SelfTuningExecutorService
- extends AbstractExecutorService
- implements ExecutorService, SelfTuningExecutorServiceMBean
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
POLL_MSECS
public static final long POLL_MSECS
- See Also:
- Constant Field Values
DEFAULT_POOLSIZE
public static final int DEFAULT_POOLSIZE
- See Also:
- Constant Field Values
SelfTuningExecutorService
public SelfTuningExecutorService(SelfTuningExecutors executors,
ThreadPoolExecutor coreExecutorService,
String name,
int corePoolSize,
int initPoolSize,
int maximumPoolSize,
int priority,
int queueSize)
getName
public String getName()
- Specified by:
getName in interface SelfTuningExecutorServiceMBean
getQueueSize
public int getQueueSize()
- Specified by:
getQueueSize in interface SelfTuningExecutorServiceMBean
getInitPoolSize
public int getInitPoolSize()
- Specified by:
getInitPoolSize in interface SelfTuningExecutorServiceMBean
getCorePoolSize
public int getCorePoolSize()
- Specified by:
getCorePoolSize in interface SelfTuningExecutorServiceMBean
getMaximumPoolSize
public int getMaximumPoolSize()
- Specified by:
getMaximumPoolSize in interface SelfTuningExecutorServiceMBean
getPriority
public int getPriority()
- Specified by:
getPriority in interface SelfTuningExecutorServiceMBean
getPoolSize
public int getPoolSize()
- Specified by:
getPoolSize in interface SelfTuningExecutorServiceMBean
getThroughput
public double getThroughput()
- Specified by:
getThroughput in interface SelfTuningExecutorServiceMBean
getActiveCount
public int getActiveCount()
- Specified by:
getActiveCount in interface SelfTuningExecutorServiceMBean
getTotalExecutions
public int getTotalExecutions()
- Specified by:
getTotalExecutions in interface SelfTuningExecutorServiceMBean
getRunState
public int getRunState()
shutdown
public void shutdown()
- Specified by:
shutdown in interface ExecutorService- Specified by:
shutdown in interface SelfTuningExecutorServiceMBean
shutdownNow
public List<Runnable> shutdownNow()
- Specified by:
shutdownNow in interface ExecutorService- Specified by:
shutdownNow in interface SelfTuningExecutorServiceMBean
isShutdown
public boolean isShutdown()
- Specified by:
isShutdown in interface ExecutorService- Specified by:
isShutdown in interface SelfTuningExecutorServiceMBean
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated in interface ExecutorService- Specified by:
isTerminated in interface SelfTuningExecutorServiceMBean
isTerminating
public boolean isTerminating()
- Specified by:
isTerminating in interface SelfTuningExecutorServiceMBean
awaitTermination
public boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
- Specified by:
awaitTermination in interface ExecutorService
- Throws:
InterruptedException
execute
public void execute(Runnable command)
- Specified by:
execute in interface Executor
getTask
protected Runnable getTask()
Copyright © 2014. All rights reserved.