remm 2004/01/21 08:12:45
Modified: coyote/src/java/org/apache/coyote/tomcat4
CoyoteConnector.java
Log:
- Add some thread pool related fields.
Revision Changes Path
1.30 +36 -4
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java
Index: CoyoteConnector.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteConnector.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- CoyoteConnector.java 8 Jan 2004 22:50:32 -0000 1.29
+++ CoyoteConnector.java 21 Jan 2004 16:12:45 -0000 1.30
@@ -187,6 +187,12 @@
/**
+ * The maximum amount of spare processors.
+ */
+ protected int maxSpareProcessors = 5;
+
+
+ /**
* The maximum number of processors allowed, or <0 for unlimited.
*/
private int maxProcessors = 20;
@@ -735,6 +741,28 @@
/**
+ * Return the maximum number of spare processors allowed.
+ */
+ public int getMaxSpareProcessors() {
+
+ return (maxSpareProcessors);
+
+ }
+
+
+ /**
+ * Set the maximum number of spare processors allowed.
+ *
+ * @param maxSpareProcessors The new maximum of spare processors
+ */
+ public void setMaxProcessors(int maxSpareProcessors) {
+
+ this.maxSpareProcessors = maxSpareProcessors;
+
+ }
+
+
+ /**
* Return the port number on which we listen for requests.
*/
public int getPort() {
@@ -1167,6 +1195,10 @@
IntrospectionUtils.setProperty(protocolHandler, "port", "" + port);
IntrospectionUtils.setProperty(protocolHandler, "maxThreads",
"" + maxProcessors);
+ IntrospectionUtils.setProperty(protocolHandler, "minSpareThreads",
+ "" + minProcessors);
+ IntrospectionUtils.setProperty(protocolHandler, "maxSpareThreads",
+ "" + maxSpareProcessors);
IntrospectionUtils.setProperty(protocolHandler, "backlog",
"" + acceptCount);
IntrospectionUtils.setProperty(protocolHandler, "tcpNoDelay",
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]