tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 CoyoteConnector.java
Date Wed, 21 Jan 2004 16:12:45 GMT
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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message