protected int getMaxThreadsExecutor(boolean useExecutor) { if (useExecutor && executor != null) { if (executor instanceof java.util.concurrent.ThreadPoolExecutor) { return ((java.util.concurrent.ThreadPoolExecutor)executor).getMaximumPoolSize(); } else if (executor instanceof ResizableExecutor) { return ((ResizableExecutor)executor).getMaxThreads(); } else { return -1; } } else { return maxThreads; } }
public int getMaxThreads() { if (running && executor!=null) { if (executor instanceof java.util.concurrent.ThreadPoolExecutor) { return ((java.util.concurrent.ThreadPoolExecutor)executor).getMaximumPoolSize(); } else if (executor instanceof ResizableExecutor) { return ((ResizableExecutor)executor).getMaxThreads(); } else { return -1; } } else { return maxThreads; } }
protected int getMaxThreadsExecutor(boolean useExecutor) { if (useExecutor && executor != null) { if (executor instanceof java.util.concurrent.ThreadPoolExecutor) { return ((java.util.concurrent.ThreadPoolExecutor)executor).getMaximumPoolSize(); } else if (executor instanceof ResizableExecutor) { return ((ResizableExecutor)executor).getMaxThreads(); } else { return -1; } } else { return maxThreads; } }
public int getMaxThreads() { if (running && executor!=null) { if (executor instanceof java.util.concurrent.ThreadPoolExecutor) { return ((java.util.concurrent.ThreadPoolExecutor)executor).getMaximumPoolSize(); } else if (executor instanceof ResizableExecutor) { return ((ResizableExecutor)executor).getMaxThreads(); } else { return -1; } } else { return maxThreads; } }
@Override public int getMaxThreads() { Executor executor = this.connector.getProtocolHandler().getExecutor(); if (executor != null) { if (executor instanceof ThreadPoolExecutor) { return ((ThreadPoolExecutor) executor).getMaximumPoolSize(); } else if (executor instanceof ResizableExecutor) { return ((ResizableExecutor) executor).getMaxThreads(); } } return 0; }