costin 02/05/14 10:07:08
Modified: jk/native2/include jk_worker.h
Log:
Few changes:
- removed the statistics, too dangerous in a MT env.
- remove the config stuff, it's now implemented in a generic way in jkconfig.
- remove the init/destroy methods - that duplicate the init/destroy in bean.
It is much cleaner to use the same lifecycle API for all components.
( it's mostly cosmetic, the behavior is the same ).
- Added a 'hwBalanceErr' to support Bernd's use case - if set we check
only local workers for requests without a session, and if all are down
we return the given error code ( to be used by a front balancer )
Revision Changes Path
1.20 +12 -36 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.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- jk_worker.h 9 May 2002 20:58:13 -0000 1.19
+++ jk_worker.h 14 May 2002 17:07:08 -0000 1.20
@@ -58,7 +58,7 @@
/***************************************************************************
* Description: Workers controller header file *
* Author: Gal Shachor <[EMAIL PROTECTED]> *
- * Version: $Revision: 1.19 $ *
+ * Version: $Revision: 1.20 $ *
***************************************************************************/
#ifndef JK_WORKER_H
@@ -135,10 +135,6 @@
struct jk_workerEnv *workerEnv;
- /** Pool for worker specific informations. XXX to be removed, is duplicated
- */
- 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
@@ -172,15 +168,6 @@
*/
char *route;
- /* Number of requests served by this worker and the number of errors */
- int reqCnt;
- int errCnt;
-
- /* Total time ( for average - divide by reqCnt ) and maxTime */
- /* XXX Not used curently. XXX Mutex for mt access */
- long time;
- long maxTime;
-
/** lb groups in which this worker belongs */
struct jk_map *groups;
@@ -206,15 +193,6 @@
*/
int level;
- /* -------------------- Information for reconfiguration -------------------- */
-
- /* Only one thread can update the config
- */
- JK_CRIT_SEC cs;
- /* 'Version' or generation. Used to update the workers dynamically
- at runtime */
- int ver;
-
/* -------------------- Information specific to the lb worker
-------------------- */
/** Load balanced workers. Maps name->worker, used at config time.
@@ -223,23 +201,21 @@
*/
struct jk_map *lbWorkerMap;
+ /** Support for some hardware load-balancing schemes.
+ If this is set, jk2 will only forward new requests to local
+ workers ( level=0 ). All other workers will get requests
+ with a session id.
+
+ The value of this field will be used as a status code if
+ all local workers are down. This way the front load-balancers
+ will know this server shouldn't be used for new requests.
+ */
+ int hwBalanceErr;
+
int workerCnt[JK_LB_LEVELS];
jk_worker_t *workerTables[JK_LB_LEVELS][JK_LB_MAX_WORKERS];
/* -------------------- Methods supported by all workers -------------------- */
- /*
- * Do whatever initialization needs to be done to start this worker up.
- * Configuration options are passed in via the props parameter.
- *
- * You can skip this by setting it to NULL.
- */
- int (JK_METHOD *init)(struct jk_env *env, jk_worker_t *_this);
-
- /*
- * Shutdown this worker. XXX Some cleanup must be made by default
- * by workerEnv, so we don't need to duplicate the code.
- */
- int (JK_METHOD *destroy)(struct jk_env *env, jk_worker_t *_thisP );
/*
* Forward a request to the servlet engine. The request is described
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>