mirror of https://github.com/apache/activemq.git
Give the user more rope.
This commit is contained in:
parent
994d9b26a0
commit
1409acb36e
|
@ -43,7 +43,7 @@ public final class SelectorManager {
|
||||||
private int maxChannelsPerWorker = 1024;
|
private int maxChannelsPerWorker = 1024;
|
||||||
|
|
||||||
protected ExecutorService createDefaultExecutor() {
|
protected ExecutorService createDefaultExecutor() {
|
||||||
ThreadPoolExecutor rc = new ThreadPoolExecutor(0, Integer.MAX_VALUE, getDefaultKeepAliveTime(), TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
|
ThreadPoolExecutor rc = new ThreadPoolExecutor(getDefaultCorePoolSize(), getDefaultMaximumPoolSize(), getDefaultKeepAliveTime(), TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
|
||||||
new ThreadFactory() {
|
new ThreadFactory() {
|
||||||
|
|
||||||
private long i = 0;
|
private long i = 0;
|
||||||
|
@ -59,6 +59,14 @@ public final class SelectorManager {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static int getDefaultCorePoolSize() {
|
||||||
|
return Integer.getInteger("org.apache.activemq.transport.nio.SelectorManager.corePoolSize", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int getDefaultMaximumPoolSize() {
|
||||||
|
return Integer.getInteger("org.apache.activemq.transport.nio.SelectorManager.maximumPoolSize", Integer.MAX_VALUE);
|
||||||
|
}
|
||||||
|
|
||||||
private static int getDefaultKeepAliveTime() {
|
private static int getDefaultKeepAliveTime() {
|
||||||
return Integer.getInteger("org.apache.activemq.transport.nio.SelectorManager.keepAliveTime", 30);
|
return Integer.getInteger("org.apache.activemq.transport.nio.SelectorManager.keepAliveTime", 30);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue