costin 02/05/14 13:38:00
Modified: jk/native2/include jk_shm.h jk_worker.h jk_workerEnv.h
Log:
- add a reference to the slot used for endpoint stats
- add 2 more fields to each slot, to support multiple structs.
- add endpointMap to worker - it'll contain all existing endpoints
in use by a worker
- explicit sync on endpoint creation.
- customizable error code and message if no worker is found
Revision Changes Path
1.5 +3 -0 jakarta-tomcat-connectors/jk/native2/include/jk_shm.h
Index: jk_shm.h
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/include/jk_shm.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- jk_shm.h 12 May 2002 01:07:10 -0000 1.4
+++ jk_shm.h 14 May 2002 20:38:00 -0000 1.5
@@ -99,6 +99,9 @@
/** Size of the segment */
int size;
+ int structSize;
+ int structCnt;
+
/** Full name of the segment. type:localName convention.
*/
char name[64];
1.21 +24 -3 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.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- jk_worker.h 14 May 2002 17:07:08 -0000 1.20
+++ jk_worker.h 14 May 2002 20:38:00 -0000 1.21
@@ -58,7 +58,7 @@
/***************************************************************************
* Description: Workers controller header file *
* Author: Gal Shachor <[EMAIL PROTECTED]> *
- * Version: $Revision: 1.20 $ *
+ * Version: $Revision: 1.21 $ *
***************************************************************************/
#ifndef JK_WORKER_H
@@ -94,6 +94,10 @@
#define JK_LB_LEVELS 4
#define JK_LB_MAX_WORKERS 256
+/* XXX Separate this in 2 structures: jk_lb.h and jk_ajp.h.
+ Using 'worker' as a generic term is confusing, the objects are very different.
+ */
+
/*
* The worker 'class', which represents something to which the web server
* can delegate requests.
@@ -147,11 +151,22 @@
struct jk_channel *channel;
char *channelName;
- /** Reuse the endpoint and it's connection
+ /** Reuse the endpoint and it's connection. The cache will contain
+ the 'unused' workers. It's size may be used to select
+ an worker by the lb.
*/
struct jk_objCache *endpointCache;
- int cache_sz;
+
+ /* All endpoints for this worker. Each endpoint is long-lived,
+ the size of the map will represent the maximum number of connections
+ active so far.
+ */
+ struct jk_map *endpointMap;
+ /* Critical section used for creation of the endpoints
+ */
+ JK_CRIT_SEC cs;
+
/** Request pool cache. XXX We may use a pool of requests.
*/
struct jk_objCache *rPoolCache;
@@ -211,6 +226,12 @@
will know this server shouldn't be used for new requests.
*/
int hwBalanceErr;
+
+ /* Message to display when no tomcat instance is available
+ * if status=302, this is a redirect location.
+ */
+ char *noWorkerMsg;
+ int noWorkerCode;
int workerCnt[JK_LB_LEVELS];
jk_worker_t *workerTables[JK_LB_LEVELS][JK_LB_MAX_WORKERS];
1.20 +4 -1 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.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- jk_workerEnv.h 14 May 2002 16:57:37 -0000 1.19
+++ jk_workerEnv.h 14 May 2002 20:38:00 -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_WORKERENV_H
@@ -234,6 +234,9 @@
struct jk_config *config;
struct jk_shm *shm;
+ /* Slot for endpoint stats
+ */
+ struct jk_shm_slot *epStat;
/* Handlers. This is a dispatch table for messages, for
* each message id we have an entry containing the jk_handler_t.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>