You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2004/12/17 09:31:25 UTC

cvs commit: jakarta-tomcat-connectors/jk/native/common jk_util.c jk_util.h

mturk       2004/12/17 00:31:25

  Modified:    jk/native/common jk_util.c jk_util.h
  Log:
  Add setter and getter for default cache size.
  It is implemented on Apache2 for now, and will set default cache size
  acording to number of thread per child
  
  Revision  Changes    Path
  1.50      +18 -1     jakarta-tomcat-connectors/jk/native/common/jk_util.c
  
  Index: jk_util.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_util.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- jk_util.c	13 Dec 2004 07:51:28 -0000	1.49
  +++ jk_util.c	17 Dec 2004 08:31:25 -0000	1.50
  @@ -438,6 +438,23 @@
       return jk_map_get_int(m, buf, def);
   }
   
  +static int def_cache_size = -1;
  +int jk_get_worker_def_cache_size(int protocol)
  +{
  +    if (def_cache_size < 0) {
  +        if (protocol == AJP14_PROTO)
  +            def_cache_size = AJP14_DEF_CACHE_SZ;
  +        else 
  +            def_cache_size = AJP13_DEF_CACHE_SZ;
  +    }
  +    return def_cache_size;
  +}
  +
  +void jk_set_worker_def_cache_size(int sz)
  +{
  +    def_cache_size = sz;
  +}
  +
   int jk_get_worker_cache_size(jk_map_t *m, const char *wname, int def)
   {
       char buf[1024];
  
  
  
  1.23      +5 -1      jakarta-tomcat-connectors/jk/native/common/jk_util.h
  
  Index: jk_util.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_util.h,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- jk_util.h	7 Dec 2004 12:24:53 -0000	1.22
  +++ jk_util.h	17 Dec 2004 08:31:25 -0000	1.23
  @@ -131,6 +131,10 @@
   
   void jk_init_ws_service(jk_ws_service_t *s);
   
  +void jk_set_worker_def_cache_size(int sz);
  +
  +int jk_get_worker_def_cache_size(int protocol);
  +
   
   #define TC32_BRIDGE_TYPE    32
   #define TC33_BRIDGE_TYPE    33
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org