public class FlexibleThreadPoolWrapper extends Object implements org.opendaylight.controller.config.threadpool.ThreadPool, Closeable
ThreadPool using flexible number of threads wraps
ExecutorService.| Constructor and Description |
|---|
FlexibleThreadPoolWrapper(int minThreadCount,
int maxThreadCount,
long keepAlive,
TimeUnit timeUnit,
ThreadFactory threadFactory) |
FlexibleThreadPoolWrapper(int minThreadCount,
int maxThreadCount,
long keepAlive,
TimeUnit timeUnit,
ThreadFactory threadFactory,
com.google.common.base.Optional<Integer> queueCapacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ExecutorService |
getExecutor() |
long |
getKeepAliveMillis() |
int |
getMaxThreadCount() |
int |
getMinThreadCount() |
void |
prestartAllCoreThreads() |
void |
setKeepAliveMillis(long keepAliveMillis) |
void |
setMaxThreadCount(int maxThreadCount) |
void |
setMinThreadCount(int minThreadCount) |
void |
setThreadFactory(ThreadFactory threadFactory) |
public FlexibleThreadPoolWrapper(int minThreadCount,
int maxThreadCount,
long keepAlive,
TimeUnit timeUnit,
ThreadFactory threadFactory)
public FlexibleThreadPoolWrapper(int minThreadCount,
int maxThreadCount,
long keepAlive,
TimeUnit timeUnit,
ThreadFactory threadFactory,
com.google.common.base.Optional<Integer> queueCapacity)
public ExecutorService getExecutor()
getExecutor in interface org.opendaylight.controller.config.threadpool.ThreadPoolpublic int getMinThreadCount()
public void setMinThreadCount(int minThreadCount)
public int getMaxThreadCount()
getMaxThreadCount in interface org.opendaylight.controller.config.threadpool.ThreadPoolpublic void setMaxThreadCount(int maxThreadCount)
public long getKeepAliveMillis()
public void setKeepAliveMillis(long keepAliveMillis)
public void setThreadFactory(ThreadFactory threadFactory)
public void prestartAllCoreThreads()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2016 OpenDaylight. All rights reserved.