You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2002/02/06 20:19:16 UTC

cvs commit: jakarta-tomcat-connectors/jk/native2/include jk_objCache.h jk_worker.h jk_workerEnv.h

costin      02/02/06 11:19:16

  Modified:    jk/native2/include jk_objCache.h jk_worker.h jk_workerEnv.h
  Log:
  Fixes/updates.
  
  Removed num_of_workers from workerEnv, it was redundant.
  
  Revision  Changes    Path
  1.5       +16 -3     jakarta-tomcat-connectors/jk/native2/include/jk_objCache.h
  
  Index: jk_objCache.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_objCache.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jk_objCache.h	16 Dec 2001 23:17:23 -0000	1.4
  +++ jk_objCache.h	6 Feb 2002 19:19:16 -0000	1.5
  @@ -105,10 +105,23 @@
   
       int (*destroy)(struct jk_env *env, jk_objCache_t *_this);
   
  -    /* private, move to impl ( if any other impl is available) */
  -    int ep_cache_sz;
  +    /** Cache max size. -1 for unbound ( i.e. growing ). */
  +    int maxSize;
  +
  +    /* Current size of the table */
  +    int size;
  +
  +    /** Number of elements in the cache.
  +     *  Postition where next element will be inserted.
  +     */
  +    int count;
  +
  +    /* Sync.
  +     */
       JK_CRIT_SEC cs;
  -    void **ep_cache;
  +
  +    /** Objects in the cache */
  +    void **data;
       struct jk_pool *pool;
   };
       
  
  
  
  1.11      +17 -30    jakarta-tomcat-connectors/jk/native2/include/jk_worker.h
  
  Index: jk_worker.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_worker.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- jk_worker.h	26 Jan 2002 06:41:51 -0000	1.10
  +++ jk_worker.h	6 Feb 2002 19:19:16 -0000	1.11
  @@ -58,7 +58,7 @@
   /***************************************************************************
    * Description: Workers controller header file                             *
    * Author:      Gal Shachor <sh...@il.ibm.com>                           * 
  - * Version:     $Revision: 1.10 $                                           *
  + * Version:     $Revision: 1.11 $                                           *
    ***************************************************************************/
   
   #ifndef JK_WORKER_H
  @@ -127,13 +127,21 @@
   
       struct jk_workerEnv *workerEnv;
       char *name;
  +    char *type;
  +
  +    /** The id of the tomcat instance we connect to. We may have multiple
  +        workers connecting to a single tomcat. If no route is defined,
  +        the worker name will be the route name. The route can be the
  +        name of another worker. 
  +     */
  +    char *route;
   
       /** Pool for worker specific informations.
           In future we may start/stop/reload workers at runtime, but that's
           far away
       */
       struct jk_pool *pool;
  -    
  +
       /* 
        * A 'this' pointer which is used by the subclasses of this class to
        * point to data/functions which are specific to a given protocol 
  @@ -141,39 +149,19 @@
        */
       void *worker_private;
       
  -    /* XXX Add name and all other common properties !!! 
  -     */
  -
  -    /** Communication channle used by the worker 
  +    /** Communication channel used by the worker 
        */
       struct jk_channel *channel;
   
  -    /* XXX Stuff from ajp, some is generic, some not - need to
  -       sort out after */
  -    struct sockaddr_in worker_inet_addr; /* Contains host and port */
  -    int connect_retry_attempts;
  -
       /** Reuse the endpoint and it's connection
        */
       struct jk_objCache *endpointCache;
   
  -    /** Request pool cache. XXX We may use reqCache.
  +    /** Request pool cache. XXX We may use a pool of requests.
        */
       struct jk_objCache *rPoolCache;
       
  -    /* 
  -     * Open connections cache...
  -     *
  -     * 1. Critical section object to protect the cache.
  -     * 2. Cache size. 
  -     * 3. An array of "open" endpoints.
  -     */
  -    /*     JK_CRIT_SEC cs; */
  -    /*     int ep_cache_sz; */
  -    /*     struct jk_endpoint **ep_cache; */
  -
  -    int proto;
  -    /* Password for ajp14+ connections. If null we default to ajp13.*/
  +    /* Private key used to connect to the remote side2.*/
       char * secret;
   
       /* Each worker can be part of a load-balancer scheme.
  @@ -185,16 +173,15 @@
       int     in_error_state;
       int     in_recovering;
       time_t  error_time;
  +    /** Last exception recorded on this worker, the reason for
  +     *  which this worker is in error state and can't perform.
  +     */
  +    struct jk_exception *lastError;
   
       /** If num_of_workers > 0 this is an load balancing worker
        */
       jk_worker_t **lb_workers;
       int num_of_workers;
  -    
  -    /*
  -     * For all of the below (except destroy), the first argument is
  -     * essentially a 'this' pointer.  
  -     */
   
       /*
        * Given a worker which is in the process of being created, and a list
  
  
  
  1.10      +2 -7      jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h
  
  Index: jk_workerEnv.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_workerEnv.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- jk_workerEnv.h	26 Jan 2002 06:43:11 -0000	1.9
  +++ jk_workerEnv.h	6 Feb 2002 19:19:16 -0000	1.10
  @@ -58,7 +58,7 @@
   /***************************************************************************
    * Description: Workers controller header file                             *
    * Author:      Gal Shachor <sh...@il.ibm.com>                           * 
  - * Version:     $Revision: 1.9 $                                           *
  + * Version:     $Revision: 1.10 $                                           *
    ***************************************************************************/
   
   #ifndef JK_WORKERENV_H
  @@ -107,16 +107,11 @@
        */
       struct jk_pool *pool;
       
  -    /* Workers hashtable. You can also access workers by id
  +    /* Active workers hashtable. 
        */
       struct jk_map *worker_map;
   
       struct jk_env *globalEnv;
  -
  -    /** Number of workers that are configured. XXX same as
  -        size( worker_map )
  -    */
  -    int num_of_workers;
   
       /** Worker that will be used by default, if no other
           worker is specified. Usefull for SetHandler or
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>