public class TimingOutFixedThreadPoolExecutorServices extends AbstractExecutorServices
ExtendedExecutorServices
that uses a fixed thread pool. However threads are terminated if no new tasks arrive within the keep-alive time.Constructor and Description |
---|
TimingOutFixedThreadPoolExecutorServices(int threadPoolSize,
long keepAliveTime) |
Modifier and Type | Method and Description |
---|---|
long |
getKeepAliveTime() |
int |
getPoolSize() |
ExecutorService |
getTaskExecutor() |
protected int |
getThreadPoolSize()
Indicates the maximum number of threads in this thread pool.
|
String |
toString() |
checkForExceptions, cleanup, invokeAllAndCheckForExceptions, invokeAllAndCheckForExceptions, shutdown
public TimingOutFixedThreadPoolExecutorServices(int threadPoolSize, long keepAliveTime)
public int getPoolSize()
public ExecutorService getTaskExecutor()
protected int getThreadPoolSize()
AbstractExecutorServices
getThreadPoolSize
in class AbstractExecutorServices
public long getKeepAliveTime()
Copyright © 2017. All rights reserved.