View | Details | Raw Unified | Return to bug 47161
Collapse All | Expand All

(-)java/org/apache/tomcat/util/net/AprEndpoint.java (-3 / +8 lines)
Lines 36-42 Link Here
36
import org.apache.tomcat.jni.SSLSocket;
36
import org.apache.tomcat.jni.SSLSocket;
37
import org.apache.tomcat.jni.Socket;
37
import org.apache.tomcat.jni.Socket;
38
import org.apache.tomcat.jni.Status;
38
import org.apache.tomcat.jni.Status;
39
import org.apache.tomcat.util.net.JIoEndpoint.Worker;
40
import org.apache.tomcat.util.res.StringManager;
39
import org.apache.tomcat.util.res.StringManager;
41
40
42
/**
41
/**
Lines 188-194 Link Here
188
            }
187
            }
189
        }
188
        }
190
    }
189
    }
191
    public int getMaxThreads() { return maxThreads; }
190
    public int getMaxThreads() {
191
        if (executor != null) {
192
            return -1;
193
        } else {
194
            return maxThreads;
195
        }
196
    }
192
197
193
198
194
    /**
199
    /**
Lines 539-545 Link Here
539
     * @return the amount of threads that are managed by the pool
544
     * @return the amount of threads that are managed by the pool
540
     */
545
     */
541
    public int getCurrentThreadCount() {
546
    public int getCurrentThreadCount() {
542
        if (executor!=null) {
547
        if (executor != null) {
543
            return -1;
548
            return -1;
544
        } else {
549
        } else {
545
            return curThreads;
550
            return curThreads;
(-)java/org/apache/tomcat/util/net/JIoEndpoint.java (-1 / +7 lines)
Lines 160-166 Link Here
160
            }
160
            }
161
        }
161
        }
162
    }
162
    }
163
    public int getMaxThreads() { return maxThreads; }
163
    public int getMaxThreads() {
164
        if (executor != null) {
165
            return -1;
166
        } else {
167
            return maxThreads;
168
        }
169
    }
164
170
165
171
166
    /**
172
    /**
(-)java/org/apache/tomcat/util/net/NioEndpoint.java (-2 / +11 lines)
Lines 57-63 Link Here
57
import org.apache.juli.logging.Log;
57
import org.apache.juli.logging.Log;
58
import org.apache.juli.logging.LogFactory;
58
import org.apache.juli.logging.LogFactory;
59
import org.apache.tomcat.util.IntrospectionUtils;
59
import org.apache.tomcat.util.IntrospectionUtils;
60
import org.apache.tomcat.util.net.JIoEndpoint.Worker;
61
import org.apache.tomcat.util.net.SecureNioChannel.ApplicationBufferHandler;
60
import org.apache.tomcat.util.net.SecureNioChannel.ApplicationBufferHandler;
62
import org.apache.tomcat.util.net.jsse.NioX509KeyManager;
61
import org.apache.tomcat.util.net.jsse.NioX509KeyManager;
63
import org.apache.tomcat.util.res.StringManager;
62
import org.apache.tomcat.util.res.StringManager;
Lines 371-377 Link Here
371
            }
370
            }
372
        }
371
        }
373
    }
372
    }
374
    public int getMaxThreads() { return maxThreads; }
373
    public int getMaxThreads() {
374
        if (running && getUseExecutor() && executor!=null) {
375
            if (executor instanceof ThreadPoolExecutor) {
376
                return ((ThreadPoolExecutor)executor).getMaximumPoolSize();
377
            } else {
378
                return -1;
379
            }
380
        } else {
381
            return maxThreads;
382
        }
383
    }
375
384
376
385
377
    /**
386
    /**

Return to bug 47161