qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tr...@apache.org
Subject [2/4] qpid-dispatch git commit: DISPATCH-179 - Bulk rename of "semantics" -> "treatment"
Date Wed, 02 Mar 2016 17:20:40 GMT
DISPATCH-179 - Bulk rename of "semantics" -> "treatment"


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/1dffeb6a
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/1dffeb6a
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/1dffeb6a

Branch: refs/heads/tross-DISPATCH-179-1
Commit: 1dffeb6a7e3e6139d56fb88f7c34abfbff9c7635
Parents: 43e3a49
Author: Ted Ross <tross@redhat.com>
Authored: Mon Feb 29 11:45:44 2016 -0500
Committer: Ted Ross <tross@redhat.com>
Committed: Mon Feb 29 11:45:44 2016 -0500

----------------------------------------------------------------------
 include/qpid/dispatch/router.h                  | 20 ++++----
 include/qpid/dispatch/router_core.h             |  2 +-
 python/qpid_dispatch/management/qdrouter.json   |  6 +--
 .../qpid_dispatch_internal/management/agent.py  |  4 +-
 python/qpid_dispatch_internal/router/engine.py  | 12 ++---
 src/python_embedded.c                           | 14 +++---
 src/router_config.c                             |  2 +-
 src/router_core/DESIGN                          |  4 +-
 src/router_core/agent_address.c                 | 18 +++----
 src/router_core/agent_route.c                   | 50 ++++++++++----------
 src/router_core/connections.c                   |  8 ++--
 src/router_core/forwarder.c                     | 16 +++----
 src/router_core/route_tables.c                  | 20 ++++----
 src/router_core/router_core.c                   | 14 +++---
 src/router_core/router_core_private.h           | 20 ++++----
 src/router_forwarders.c                         | 16 +++----
 tools/qdstat                                    | 12 ++---
 17 files changed, 119 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/include/qpid/dispatch/router.h
----------------------------------------------------------------------
diff --git a/include/qpid/dispatch/router.h b/include/qpid/dispatch/router.h
index 499e808..f050775 100644
--- a/include/qpid/dispatch/router.h
+++ b/include/qpid/dispatch/router.h
@@ -37,12 +37,12 @@ typedef struct qd_address_t qd_address_t;
 typedef struct qd_router_delivery_t qd_router_delivery_t;
 
 typedef enum {
-    QD_SEMANTICS_MULTICAST_FLOOD  = 0,
-    QD_SEMANTICS_MULTICAST_ONCE   = 1,
-    QD_SEMANTICS_ANYCAST_CLOSEST  = 2,
-    QD_SEMANTICS_ANYCAST_BALANCED = 3,
-    QD_SEMANTICS_LINK_BALANCED    = 4
-} qd_address_semantics_t;
+    QD_TREATMENT_MULTICAST_FLOOD  = 0,
+    QD_TREATMENT_MULTICAST_ONCE   = 1,
+    QD_TREATMENT_ANYCAST_CLOSEST  = 2,
+    QD_TREATMENT_ANYCAST_BALANCED = 3,
+    QD_TREATMENT_LINK_BALANCED    = 4
+} qd_address_treatment_t;
 
 #include <qpid/dispatch/router_core.h>
 
@@ -96,17 +96,17 @@ qdr_core_t *qd_router_core(qd_dispatch_t *qd);
  * @param on_message Optional callback to be called when a message is received
  * for the address.
  * @param context Context to be passed to the on_message handler.
- * @param semantics Semantics for the address.
+ * @param treatment Treatment for the address.
  * @param global True if the address is global.
  * @param forwarder Optional custom forwarder to use when a message is received
- * for the address.  If null, a default forwarder based on the semantics will
+ * for the address.  If null, a default forwarder based on the treatment will
  * be used.
  */
 qd_address_t *qd_router_register_address(qd_dispatch_t          *qd,
                                          const char             *address,
                                          qd_router_message_cb_t  on_message,
                                          void                   *context,
-                                         qd_address_semantics_t  semantics,
+                                         qd_address_treatment_t  treatment,
                                          bool                    global,
                                          qd_router_forwarder_t  *forwarder);
 
@@ -134,7 +134,7 @@ void qd_router_build_node_list(qd_dispatch_t *qd, qd_composed_field_t
*field);
 const char* qd_address_logstr(qd_address_t* address);
 
 /** Retrieve the proper forwarder for a given semantic */
-qd_router_forwarder_t *qd_router_get_forwarder(qd_address_semantics_t s);
+qd_router_forwarder_t *qd_router_get_forwarder(qd_address_treatment_t t);
 
 ///@}
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/include/qpid/dispatch/router_core.h
----------------------------------------------------------------------
diff --git a/include/qpid/dispatch/router_core.h b/include/qpid/dispatch/router_core.h
index 602e67c..b38022f 100644
--- a/include/qpid/dispatch/router_core.h
+++ b/include/qpid/dispatch/router_core.h
@@ -94,7 +94,7 @@ qdr_subscription_t *qdr_core_subscribe(qdr_core_t             *core,
                                        const char             *address,
                                        char                    aclass,
                                        char                    phase,
-                                       qd_address_semantics_t  semantics,
+                                       qd_address_treatment_t  treatment,
                                        qdr_receive_t           on_message,
                                        void                   *context);
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/python/qpid_dispatch/management/qdrouter.json
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch/management/qdrouter.json b/python/qpid_dispatch/management/qdrouter.json
index dec2d82..e1ee1b7 100644
--- a/python/qpid_dispatch/management/qdrouter.json
+++ b/python/qpid_dispatch/management/qdrouter.json
@@ -732,7 +732,7 @@
         },
 
         "fixedAddress": {
-            "description":"(DEPRECATED) Establishes semantics for addresses starting with
a prefix.",
+            "description":"(DEPRECATED) Establishes treatment for addresses starting with
a prefix.",
             "extends": "configurationEntity",
             "operations": ["CREATE"],
             "attributes": {
@@ -928,9 +928,9 @@
             "description": "AMQP address managed by the router.",
             "extends": "operationalEntity",
             "attributes": {
-                "semantics": {
+                "treatment": {
                     "type": ["flood", "multi", "anyClosest", "anyBalanced", "linkBalanced"],
-                    "description": "Forwarding semantics for the address: flood - messages
delivered to all subscribers along all available paths (this will cause duplicate deliveries
if there are redundant paths); multi - one copy of each message delivered to all subscribers;
anyClosest - messages delivered to only the closest subscriber; anyBalanced - messages delivered
to one subscriber with load balanced across subscribers; linkBalanced - for link-routing,
link attaches balanced across destinations."
+                    "description": "Forwarding treatment for the address: flood - messages
delivered to all subscribers along all available paths (this will cause duplicate deliveries
if there are redundant paths); multi - one copy of each message delivered to all subscribers;
anyClosest - messages delivered to only the closest subscriber; anyBalanced - messages delivered
to one subscriber with load balanced across subscribers; linkBalanced - for link-routing,
link attaches balanced across destinations."
                 },
                 "inProcess": {
                     "type": "integer",

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/python/qpid_dispatch_internal/management/agent.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/management/agent.py b/python/qpid_dispatch_internal/management/agent.py
index 4d75f8b..886157d 100644
--- a/python/qpid_dispatch_internal/management/agent.py
+++ b/python/qpid_dispatch_internal/management/agent.py
@@ -73,7 +73,7 @@ from cProfile import Profile
 from cStringIO import StringIO
 from ctypes import c_void_p, py_object, c_long
 from subprocess import Popen
-from ..dispatch import IoAdapter, LogAdapter, LOG_INFO, LOG_DEBUG, LOG_ERROR, SEMANTICS_ANYCAST_CLOSEST
+from ..dispatch import IoAdapter, LogAdapter, LOG_INFO, LOG_DEBUG, LOG_ERROR, TREATMENT_ANYCAST_CLOSEST
 from qpid_dispatch.management.error import ManagementError, OK, CREATED, NO_CONTENT, STATUS_TEXT,
\
     BadRequestStatus, InternalServerErrorStatus, NotImplementedStatus, NotFoundStatus
 from qpid_dispatch.management.entity import camelcase
@@ -603,7 +603,7 @@ class Agent(object):
         """Register the management address to receive management requests"""
         self.entities.refresh_from_c()
         self.log(LOG_INFO, "Activating management agent on %s" % address)
-        self.io = IoAdapter(self.receive, address, 'L', '0', SEMANTICS_ANYCAST_CLOSEST)
+        self.io = IoAdapter(self.receive, address, 'L', '0', TREATMENT_ANYCAST_CLOSEST)
 
     def entity_class(self, entity_type):
         """Return the class that implements entity_type"""

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/python/qpid_dispatch_internal/router/engine.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/router/engine.py b/python/qpid_dispatch_internal/router/engine.py
index b3fa1a1..8905bac 100644
--- a/python/qpid_dispatch_internal/router/engine.py
+++ b/python/qpid_dispatch_internal/router/engine.py
@@ -33,7 +33,7 @@ import time
 ## (i.e. we are in a test bench, etc.), load the stub versions.
 ##
 from ..dispatch import IoAdapter, LogAdapter, LOG_TRACE, LOG_INFO, LOG_ERROR, LOG_STACK_LIMIT
-from ..dispatch import SEMANTICS_MULTICAST_FLOOD, SEMANTICS_MULTICAST_ONCE
+from ..dispatch import TREATMENT_MULTICAST_FLOOD, TREATMENT_MULTICAST_ONCE
 
 class RouterEngine:
     """
@@ -53,11 +53,11 @@ class RouterEngine:
         self._log_ls        = LogAdapter("ROUTER_LS")
         self._log_ma        = LogAdapter("ROUTER_MA")
         self._log_general   = LogAdapter("ROUTER")
-        self.io_adapter     = [IoAdapter(self.receive, "qdrouter",    'L', '0', SEMANTICS_MULTICAST_FLOOD),
-                               IoAdapter(self.receive, "qdrouter.ma", 'L', '0', SEMANTICS_MULTICAST_ONCE),
-                               IoAdapter(self.receive, "qdrouter",    'T', '0', SEMANTICS_MULTICAST_FLOOD),
-                               IoAdapter(self.receive, "qdrouter.ma", 'T', '0', SEMANTICS_MULTICAST_ONCE),
-                               IoAdapter(self.receive, "qdhello",     'L', '0', SEMANTICS_MULTICAST_FLOOD)]
+        self.io_adapter     = [IoAdapter(self.receive, "qdrouter",    'L', '0', TREATMENT_MULTICAST_FLOOD),
+                               IoAdapter(self.receive, "qdrouter.ma", 'L', '0', TREATMENT_MULTICAST_ONCE),
+                               IoAdapter(self.receive, "qdrouter",    'T', '0', TREATMENT_MULTICAST_FLOOD),
+                               IoAdapter(self.receive, "qdrouter.ma", 'T', '0', TREATMENT_MULTICAST_ONCE),
+                               IoAdapter(self.receive, "qdhello",     'L', '0', TREATMENT_MULTICAST_FLOOD)]
         self.max_routers    = max_routers
         self.id             = router_id
         self.instance       = long(time.time())

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/src/python_embedded.c
----------------------------------------------------------------------
diff --git a/src/python_embedded.c b/src/python_embedded.c
index 669288a..d9b8069 100644
--- a/src/python_embedded.c
+++ b/src/python_embedded.c
@@ -527,8 +527,8 @@ static int IoAdapter_init(IoAdapter *self, PyObject *args, PyObject *kwds)
     PyObject *addr;
     char aclass    = 'L';
     char phase     = '0';
-    int  semantics = QD_SEMANTICS_ANYCAST_BALANCED;
-    if (!PyArg_ParseTuple(args, "OO|cci", &self->handler, &addr, &aclass,
&phase, &semantics))
+    int  treatment = QD_TREATMENT_ANYCAST_BALANCED;
+    if (!PyArg_ParseTuple(args, "OO|cci", &self->handler, &addr, &aclass,
&phase, &treatment))
         return -1;
     if (!PyCallable_Check(self->handler)) {
         PyErr_SetString(PyExc_TypeError, "IoAdapter.__init__ handler is not callable");
@@ -540,7 +540,7 @@ static int IoAdapter_init(IoAdapter *self, PyObject *args, PyObject *kwds)
     const char *address = PyString_AsString(addr);
     if (!address) return -1;
     qd_error_clear();
-    self->sub = qdr_core_subscribe(self->core, address, aclass, phase, semantics, qd_io_rx_handler,
self);
+    self->sub = qdr_core_subscribe(self->core, address, aclass, phase, treatment, qd_io_rx_handler,
self);
     if (qd_error_code()) {
         PyErr_SetString(PyExc_RuntimeError, qd_error_message());
         return -1;
@@ -732,10 +732,10 @@ static void qd_python_setup(void)
         Py_INCREF(ioaType);
         PyModule_AddObject(m, "IoAdapter", (PyObject*) &IoAdapterType);
 
-        qd_register_constant(m, "SEMANTICS_MULTICAST_FLOOD",  QD_SEMANTICS_MULTICAST_FLOOD);
-        qd_register_constant(m, "SEMANTICS_MULTICAST_ONCE",   QD_SEMANTICS_MULTICAST_ONCE);
-        qd_register_constant(m, "SEMANTICS_ANYCAST_CLOSEST",  QD_SEMANTICS_ANYCAST_CLOSEST);
-        qd_register_constant(m, "SEMANTICS_ANYCAST_BALANCED", QD_SEMANTICS_ANYCAST_BALANCED);
+        qd_register_constant(m, "TREATMENT_MULTICAST_FLOOD",  QD_TREATMENT_MULTICAST_FLOOD);
+        qd_register_constant(m, "TREATMENT_MULTICAST_ONCE",   QD_TREATMENT_MULTICAST_ONCE);
+        qd_register_constant(m, "TREATMENT_ANYCAST_CLOSEST",  QD_TREATMENT_ANYCAST_CLOSEST);
+        qd_register_constant(m, "TREATMENT_ANYCAST_BALANCED", QD_TREATMENT_ANYCAST_BALANCED);
 
         Py_INCREF(m);
         dispatch_module = m;

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/src/router_config.c
----------------------------------------------------------------------
diff --git a/src/router_config.c b/src/router_config.c
index 40453fd..8039efe 100644
--- a/src/router_config.c
+++ b/src/router_config.c
@@ -49,7 +49,7 @@ qd_error_t qd_router_configure_address(qd_router_t *router, qd_entity_t
*entity)
     }
 
     //
-    // Convert fanout + bias to semantics
+    // Convert fanout + bias to treatment
     //
     const char *trt;
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/src/router_core/DESIGN
----------------------------------------------------------------------
diff --git a/src/router_core/DESIGN b/src/router_core/DESIGN
index 5197a2f..dde7cb4 100644
--- a/src/router_core/DESIGN
+++ b/src/router_core/DESIGN
@@ -179,10 +179,10 @@ Core APIs
 
 
 ====================
-Forwarding Semantics
+Forwarding Treatment
 ====================
 
-  Transition from fanout/bias to a one-dimensional list of semantics:
+  Transition from fanout/bias to a one-dimensional list of treatment:
 
     MULTICAST_FLOOD
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/src/router_core/agent_address.c
----------------------------------------------------------------------
diff --git a/src/router_core/agent_address.c b/src/router_core/agent_address.c
index 0256593..bc008ff 100644
--- a/src/router_core/agent_address.c
+++ b/src/router_core/agent_address.c
@@ -24,7 +24,7 @@
 #define QDR_ADDRESS_IDENTITY                  1
 #define QDR_ADDRESS_TYPE                      2
 #define QDR_ADDRESS_KEY                       3
-#define QDR_ADDRESS_SEMANTICS                 4
+#define QDR_ADDRESS_TREATMENT                 4
 #define QDR_ADDRESS_IN_PROCESS                5
 #define QDR_ADDRESS_SUBSCRIBER_COUNT          6
 #define QDR_ADDRESS_REMOTE_COUNT              7
@@ -40,7 +40,7 @@ const char *qdr_address_columns[] =
      "identity",
      "type",
      "key",
-     "semantics",
+     "treatment",
      "inProcess",
      "subscriberCount",
      "remoteCount",
@@ -71,13 +71,13 @@ static void qdr_insert_address_columns_CT(qdr_address_t        *addr,
         qd_compose_insert_string(body, "org.apache.qpid.dispatch.router.address");
         break;
 
-    case QDR_ADDRESS_SEMANTICS: {
-        switch (addr->semantics) {
-        case QD_SEMANTICS_MULTICAST_FLOOD:  qd_compose_insert_string(body, "flood");    
  break;
-        case QD_SEMANTICS_MULTICAST_ONCE:   qd_compose_insert_string(body, "multi");    
  break;
-        case QD_SEMANTICS_ANYCAST_CLOSEST:  qd_compose_insert_string(body, "anyClosest");
 break;
-        case QD_SEMANTICS_ANYCAST_BALANCED: qd_compose_insert_string(body, "anyBalanced");
break;
-        case QD_SEMANTICS_LINK_BALANCED:    qd_compose_insert_string(body, "linkBalanced");
break;
+    case QDR_ADDRESS_TREATMENT: {
+        switch (addr->treatment) {
+        case QD_TREATMENT_MULTICAST_FLOOD:  qd_compose_insert_string(body, "flood");    
  break;
+        case QD_TREATMENT_MULTICAST_ONCE:   qd_compose_insert_string(body, "multi");    
  break;
+        case QD_TREATMENT_ANYCAST_CLOSEST:  qd_compose_insert_string(body, "anyClosest");
 break;
+        case QD_TREATMENT_ANYCAST_BALANCED: qd_compose_insert_string(body, "anyBalanced");
break;
+        case QD_TREATMENT_LINK_BALANCED:    qd_compose_insert_string(body, "linkBalanced");
break;
         }
         break;
     }

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/src/router_core/agent_route.c
----------------------------------------------------------------------
diff --git a/src/router_core/agent_route.c b/src/router_core/agent_route.c
index 3cd9af5..af042cd 100644
--- a/src/router_core/agent_route.c
+++ b/src/router_core/agent_route.c
@@ -27,11 +27,11 @@
 #define QDR_ROUTE_ADDRESS            4
 #define QDR_ROUTE_CONNECTOR          5
 #define QDR_ROUTE_DIRECTION          6
-#define QDR_ROUTE_SEMANTICS          7
+#define QDR_ROUTE_TREATMENT          7
 #define QDR_ROUTE_INGRESS_ADDRESS    8
 #define QDR_ROUTE_EGRESS_ADDRESS     9
-#define QDR_ROUTE_INGRESS_SEMANTICS  10
-#define QDR_ROUTE_EGRESS_SEMANTICS   11
+#define QDR_ROUTE_INGRESS_TREATMENT  10
+#define QDR_ROUTE_EGRESS_TREATMENT   11
 
 const char *qdr_route_columns[] =
     {"name",
@@ -41,11 +41,11 @@ const char *qdr_route_columns[] =
      "address",
      "connector",
      "direction",
-     "semantics",
+     "treatment",
      "ingressAddress",
      "egressAddress",
-     "ingressSemantics",
-     "egressSemantics",
+     "ingressTreatment",
+     "egressTreatment",
      0};
 
 
@@ -72,11 +72,11 @@ static void qdr_route_insert_column_CT(qdr_route_t *route, int col, qd_composed_
     case QDR_ROUTE_ADDRESS:
     case QDR_ROUTE_CONNECTOR:
     case QDR_ROUTE_DIRECTION:
-    case QDR_ROUTE_SEMANTICS:
+    case QDR_ROUTE_TREATMENT:
     case QDR_ROUTE_INGRESS_ADDRESS:
     case QDR_ROUTE_EGRESS_ADDRESS:
-    case QDR_ROUTE_INGRESS_SEMANTICS:
-    case QDR_ROUTE_EGRESS_SEMANTICS:
+    case QDR_ROUTE_INGRESS_TREATMENT:
+    case QDR_ROUTE_EGRESS_TREATMENT:
     default:
         qd_compose_insert_null(body);
         break;
@@ -177,20 +177,20 @@ void qdra_route_get_next_CT(qdr_core_t *core, qdr_query_t *query)
 }
 
 
-static qd_address_semantics_t qdra_semantics(qd_parsed_field_t *field)
+static qd_address_treatment_t qdra_treatment(qd_parsed_field_t *field)
 {
     if (field) {
         qd_field_iterator_t *iter = qd_parse_raw(field);
-        if (qd_field_iterator_equal(iter, (unsigned char*) "multi"))       return QD_SEMANTICS_MULTICAST_ONCE;
-        if (qd_field_iterator_equal(iter, (unsigned char*) "anyClosest"))  return QD_SEMANTICS_ANYCAST_CLOSEST;
-        if (qd_field_iterator_equal(iter, (unsigned char*) "anyBalanced")) return QD_SEMANTICS_ANYCAST_BALANCED;
+        if (qd_field_iterator_equal(iter, (unsigned char*) "multi"))       return QD_TREATMENT_MULTICAST_ONCE;
+        if (qd_field_iterator_equal(iter, (unsigned char*) "anyClosest"))  return QD_TREATMENT_ANYCAST_CLOSEST;
+        if (qd_field_iterator_equal(iter, (unsigned char*) "anyBalanced")) return QD_TREATMENT_ANYCAST_BALANCED;
     }
-    return QD_SEMANTICS_ANYCAST_BALANCED;
+    return QD_TREATMENT_ANYCAST_BALANCED;
 }
 
 
 static qdr_address_config_t *qdra_configure_address_prefix_CT(qdr_core_t *core, qd_parsed_field_t
*addr_field, char cls,
-                                                              qd_address_semantics_t semantics)
+                                                              qd_address_treatment_t treatment)
 {
     if (!addr_field)
         return 0;
@@ -208,7 +208,7 @@ static qdr_address_config_t *qdra_configure_address_prefix_CT(qdr_core_t
*core,
 
     addr = new_qdr_address_config_t();
     DEQ_ITEM_INIT(addr);
-    addr->semantics = semantics;
+    addr->treatment = treatment;
 
     if (!!addr) {
         qd_field_iterator_reset(iter);
@@ -221,7 +221,7 @@ static qdr_address_config_t *qdra_configure_address_prefix_CT(qdr_core_t
*core,
 
 
 static qdr_address_t *qdra_configure_address_CT(qdr_core_t *core, qd_parsed_field_t *addr_field,
char cls,
-                                                qd_address_semantics_t semantics)
+                                                qd_address_treatment_t treatment)
 {
     if (!addr_field)
         return 0;
@@ -237,7 +237,7 @@ static qdr_address_t *qdra_configure_address_CT(qdr_core_t *core, qd_parsed_fiel
         return 0;
     }
 
-    addr = qdr_address_CT(core, semantics);
+    addr = qdr_address_CT(core, treatment);
 
     if (!!addr) {
         qd_field_iterator_reset(iter);
@@ -259,11 +259,11 @@ void qdra_route_create_CT(qdr_core_t *core, qd_field_iterator_t *name,
         qd_parsed_field_t *addr_field     = qd_parse_value_by_key(in_body, qdr_route_columns[QDR_ROUTE_ADDRESS]);
         qd_parsed_field_t *conn_field     = qd_parse_value_by_key(in_body, qdr_route_columns[QDR_ROUTE_CONNECTOR]);
         qd_parsed_field_t *dir_field      = qd_parse_value_by_key(in_body, qdr_route_columns[QDR_ROUTE_DIRECTION]);
-        qd_parsed_field_t *sem_field      = qd_parse_value_by_key(in_body, qdr_route_columns[QDR_ROUTE_SEMANTICS]);
+        qd_parsed_field_t *sem_field      = qd_parse_value_by_key(in_body, qdr_route_columns[QDR_ROUTE_TREATMENT]);
         //qd_parsed_field_t *in_addr_field  = qd_parse_value_by_key(in_body, qdr_route_columns[QDR_ROUTE_INGRESS_ADDRESS]);
         //qd_parsed_field_t *out_addr_field = qd_parse_value_by_key(in_body, qdr_route_columns[QDR_ROUTE_EGRESS_ADDRESS]);
-        //qd_parsed_field_t *in_sem_field   = qd_parse_value_by_key(in_body, qdr_route_columns[QDR_ROUTE_INGRESS_SEMANTICS]);
-        //qd_parsed_field_t *out_sem_field  = qd_parse_value_by_key(in_body, qdr_route_columns[QDR_ROUTE_EGRESS_SEMANTICS]);
+        //qd_parsed_field_t *in_sem_field   = qd_parse_value_by_key(in_body, qdr_route_columns[QDR_ROUTE_INGRESS_TREATMENT]);
+        //qd_parsed_field_t *out_sem_field  = qd_parse_value_by_key(in_body, qdr_route_columns[QDR_ROUTE_EGRESS_TREATMENT]);
 
         bool still_good = true;
         qdr_route_t *route = new_qdr_route_t();
@@ -287,7 +287,7 @@ void qdra_route_create_CT(qdr_core_t *core, qd_field_iterator_t *name,
                 still_good = false;
         }
 
-        route->semantics = qdra_semantics(sem_field);
+        route->treatment = qdra_treatment(sem_field);
 
         route->direction_in  = true;
         route->direction_out = true;
@@ -306,14 +306,14 @@ void qdra_route_create_CT(qdr_core_t *core, qd_field_iterator_t *name,
 
         switch (route->object_type) {
         case QDR_ROUTE_TYPE_ADDRESS:
-            route->addr_config = qdra_configure_address_prefix_CT(core, addr_field, 'Z',
route->semantics);
+            route->addr_config = qdra_configure_address_prefix_CT(core, addr_field, 'Z',
route->treatment);
             break;
 
         case QDR_ROUTE_TYPE_LINK_DEST:
             if (route->direction_in)
-                route->ingress_addr = qdra_configure_address_CT(core, addr_field, 'C',
route->semantics);
+                route->ingress_addr = qdra_configure_address_CT(core, addr_field, 'C',
route->treatment);
             if (route->direction_out)
-                route->egress_addr  = qdra_configure_address_CT(core, addr_field, 'D',
route->semantics);
+                route->egress_addr  = qdra_configure_address_CT(core, addr_field, 'D',
route->treatment);
             break;
 
         case QDR_ROUTE_TYPE_WAYPOINT:

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/src/router_core/connections.c
----------------------------------------------------------------------
diff --git a/src/router_core/connections.c b/src/router_core/connections.c
index ab9f545..40e2aaf 100644
--- a/src/router_core/connections.c
+++ b/src/router_core/connections.c
@@ -525,7 +525,7 @@ static char qdr_prefix_for_dir(qd_direction_t dir)
 }
 
 
-static qd_address_semantics_t qdr_semantics_for_address(qdr_core_t *core, qd_field_iterator_t
*iter)
+static qd_address_treatment_t qdr_treatment_for_address(qdr_core_t *core, qd_field_iterator_t
*iter)
 {
     qdr_address_config_t *addr = 0;
 
@@ -536,7 +536,7 @@ static qd_address_semantics_t qdr_semantics_for_address(qdr_core_t *core,
qd_fie
     qd_address_iterator_override_prefix(iter, 'Z');
     qd_hash_retrieve_prefix(core->addr_hash, iter, (void**) &addr);
     qd_address_iterator_override_prefix(iter, '\0');
-    return addr ? addr->semantics : QD_SEMANTICS_ANYCAST_CLOSEST;
+    return addr ? addr->treatment : QD_TREATMENT_ANYCAST_CLOSEST;
 }
 
 
@@ -639,7 +639,7 @@ static qdr_address_t *qdr_lookup_terminus_address_CT(qdr_core_t     *core,
             qd_field_iterator_t *temp_iter = qd_address_iterator_string(temp_addr, ITER_VIEW_ADDRESS_HASH);
             qd_hash_retrieve(core->addr_hash, temp_iter, (void**) &addr);
             if (!addr) {
-                addr = qdr_address_CT(core, QD_SEMANTICS_ANYCAST_CLOSEST);
+                addr = qdr_address_CT(core, QD_TREATMENT_ANYCAST_CLOSEST);
                 qd_hash_insert(core->addr_hash, temp_iter, addr, &addr->hash_handle);
                 DEQ_INSERT_TAIL(core->addrs, addr);
                 qdr_terminus_set_address(terminus, temp_addr);
@@ -675,7 +675,7 @@ static qdr_address_t *qdr_lookup_terminus_address_CT(qdr_core_t     *core,
     qd_address_iterator_override_prefix(iter, '\0'); // Cancel previous override
     qd_hash_retrieve(core->addr_hash, iter, (void**) &addr);
     if (!addr && create_if_not_found) {
-        qd_address_semantics_t sem = qdr_semantics_for_address(core, iter);
+        qd_address_treatment_t sem = qdr_treatment_for_address(core, iter);
         addr = qdr_address_CT(core, sem);
         qd_hash_insert(core->addr_hash, iter, addr, &addr->hash_handle);
         DEQ_INSERT_TAIL(core->addrs, addr);

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/src/router_core/forwarder.c
----------------------------------------------------------------------
diff --git a/src/router_core/forwarder.c b/src/router_core/forwarder.c
index fc3f4c1..678fc5d 100644
--- a/src/router_core/forwarder.c
+++ b/src/router_core/forwarder.c
@@ -367,22 +367,22 @@ void qdr_forwarder_setup_CT(qdr_core_t *core)
     //
     // Create message forwarders
     //
-    core->forwarders[QD_SEMANTICS_MULTICAST_FLOOD]  = qdr_new_forwarder(qdr_forward_multicast_CT,
0, true);
-    core->forwarders[QD_SEMANTICS_MULTICAST_ONCE]   = qdr_new_forwarder(qdr_forward_multicast_CT,
0, false);
-    core->forwarders[QD_SEMANTICS_ANYCAST_CLOSEST]  = qdr_new_forwarder(qdr_forward_closest_CT,
  0, false);
-    core->forwarders[QD_SEMANTICS_ANYCAST_BALANCED] = qdr_new_forwarder(qdr_forward_balanced_CT,
 0, false);
+    core->forwarders[QD_TREATMENT_MULTICAST_FLOOD]  = qdr_new_forwarder(qdr_forward_multicast_CT,
0, true);
+    core->forwarders[QD_TREATMENT_MULTICAST_ONCE]   = qdr_new_forwarder(qdr_forward_multicast_CT,
0, false);
+    core->forwarders[QD_TREATMENT_ANYCAST_CLOSEST]  = qdr_new_forwarder(qdr_forward_closest_CT,
  0, false);
+    core->forwarders[QD_TREATMENT_ANYCAST_BALANCED] = qdr_new_forwarder(qdr_forward_balanced_CT,
 0, false);
 
     //
     // Create link forwarders
     //
-    core->forwarders[QD_SEMANTICS_LINK_BALANCED] = qdr_new_forwarder(0, qdr_forward_link_balanced_CT,
false);
+    core->forwarders[QD_TREATMENT_LINK_BALANCED] = qdr_new_forwarder(0, qdr_forward_link_balanced_CT,
false);
 }
 
 
-qdr_forwarder_t *qdr_forwarder_CT(qdr_core_t *core, qd_address_semantics_t semantics)
+qdr_forwarder_t *qdr_forwarder_CT(qdr_core_t *core, qd_address_treatment_t treatment)
 {
-    if (semantics <= QD_SEMANTICS_LINK_BALANCED)
-        return core->forwarders[semantics];
+    if (treatment <= QD_TREATMENT_LINK_BALANCED)
+        return core->forwarders[treatment];
     return 0;
 }
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/src/router_core/route_tables.c
----------------------------------------------------------------------
diff --git a/src/router_core/route_tables.c b/src/router_core/route_tables.c
index cbd0a11..db139a9 100644
--- a/src/router_core/route_tables.c
+++ b/src/router_core/route_tables.c
@@ -131,7 +131,7 @@ qdr_subscription_t *qdr_core_subscribe(qdr_core_t             *core,
                                        const char             *address,
                                        char                    aclass,
                                        char                    phase,
-                                       qd_address_semantics_t  semantics,
+                                       qd_address_treatment_t  treatment,
                                        qdr_receive_t           on_message,
                                        void                   *context)
 {
@@ -146,7 +146,7 @@ qdr_subscription_t *qdr_core_subscribe(qdr_core_t             *core,
     action->args.io.address_class = aclass;
     action->args.io.address_phase = phase;
     action->args.io.subscription  = sub;
-    action->args.io.semantics     = semantics;
+    action->args.io.treatment     = treatment;
     qdr_action_enqueue(core, action);
 
     return sub;
@@ -174,11 +174,11 @@ void qdr_route_table_setup_CT(qdr_core_t *core)
     core->addr_hash = qd_hash(10, 32, 0);
 
     if (core->router_mode == QD_ROUTER_MODE_INTERIOR) {
-        core->hello_addr      = qdr_add_local_address_CT(core, 'L', "qdhello",     QD_SEMANTICS_MULTICAST_FLOOD);
-        core->router_addr_L   = qdr_add_local_address_CT(core, 'L', "qdrouter",    QD_SEMANTICS_MULTICAST_FLOOD);
-        core->routerma_addr_L = qdr_add_local_address_CT(core, 'L', "qdrouter.ma", QD_SEMANTICS_MULTICAST_ONCE);
-        core->router_addr_T   = qdr_add_local_address_CT(core, 'T', "qdrouter",    QD_SEMANTICS_MULTICAST_FLOOD);
-        core->routerma_addr_T = qdr_add_local_address_CT(core, 'T', "qdrouter.ma", QD_SEMANTICS_MULTICAST_ONCE);
+        core->hello_addr      = qdr_add_local_address_CT(core, 'L', "qdhello",     QD_TREATMENT_MULTICAST_FLOOD);
+        core->router_addr_L   = qdr_add_local_address_CT(core, 'L', "qdrouter",    QD_TREATMENT_MULTICAST_FLOOD);
+        core->routerma_addr_L = qdr_add_local_address_CT(core, 'L', "qdrouter.ma", QD_TREATMENT_MULTICAST_ONCE);
+        core->router_addr_T   = qdr_add_local_address_CT(core, 'T', "qdrouter",    QD_TREATMENT_MULTICAST_FLOOD);
+        core->routerma_addr_T = qdr_add_local_address_CT(core, 'T', "qdrouter.ma", QD_TREATMENT_MULTICAST_ONCE);
 
         core->neighbor_free_mask = qd_bitmask(1);
 
@@ -235,7 +235,7 @@ static void qdr_add_router_CT(qdr_core_t *core, qdr_action_t *action,
bool disca
         // This record will be found whenever a "foreign" topological address to this
         // remote router is looked up.
         //
-        addr = qdr_address_CT(core, QD_SEMANTICS_ANYCAST_CLOSEST);
+        addr = qdr_address_CT(core, QD_TREATMENT_ANYCAST_CLOSEST);
         qd_hash_insert(core->addr_hash, iter, addr, &addr->hash_handle);
         DEQ_INSERT_TAIL(core->addrs, addr);
 
@@ -500,7 +500,7 @@ static void qdr_map_destination_CT(qdr_core_t *core, qdr_action_t *action,
bool
 
         qd_hash_retrieve(core->addr_hash, iter, (void**) &addr);
         if (!addr) {
-            addr = qdr_address_CT(core, 0); // FIXME - Semantics
+            addr = qdr_address_CT(core, 0); // FIXME - Treatment
             qd_hash_insert(core->addr_hash, iter, addr, &addr->hash_handle);
             DEQ_ITEM_INIT(addr);
             DEQ_INSERT_TAIL(core->addrs, addr);
@@ -586,7 +586,7 @@ static void qdr_subscribe_CT(qdr_core_t *core, qdr_action_t *action, bool
discar
 
         qd_hash_retrieve(core->addr_hash, address->iterator, (void**) &addr);
         if (!addr) {
-            addr = qdr_address_CT(core, action->args.io.semantics);
+            addr = qdr_address_CT(core, action->args.io.treatment);
             qd_hash_insert(core->addr_hash, address->iterator, addr, &addr->hash_handle);
             DEQ_ITEM_INIT(addr);
             DEQ_INSERT_TAIL(core->addrs, addr);

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/src/router_core/router_core.c
----------------------------------------------------------------------
diff --git a/src/router_core/router_core.c b/src/router_core/router_core.c
index 82f3408..d4a937d 100644
--- a/src/router_core/router_core.c
+++ b/src/router_core/router_core.c
@@ -76,10 +76,10 @@ qdr_core_t *qdr_core(qd_dispatch_t *qd, qd_router_mode_t mode, const char
*area,
     // Perform outside-of-thread setup for the management agent
     //
     core->agent_subscription_mobile = qdr_core_subscribe(core, "$management", 'M', '0',
-                                                         QD_SEMANTICS_ANYCAST_CLOSEST,
+                                                         QD_TREATMENT_ANYCAST_CLOSEST,
                                                          qdr_management_agent_on_message,
core);
     core->agent_subscription_local = qdr_core_subscribe(core, "$management", 'L', '0',
-                                                        QD_SEMANTICS_ANYCAST_CLOSEST,
+                                                        QD_TREATMENT_ANYCAST_CLOSEST,
                                                         qdr_management_agent_on_message,
core);
 
     return core;
@@ -206,18 +206,18 @@ void qdr_action_enqueue(qdr_core_t *core, qdr_action_t *action)
 }
 
 
-qdr_address_t *qdr_address_CT(qdr_core_t *core, qd_address_semantics_t semantics)
+qdr_address_t *qdr_address_CT(qdr_core_t *core, qd_address_treatment_t treatment)
 {
     qdr_address_t *addr = new_qdr_address_t();
     ZERO(addr);
-    addr->semantics = semantics;
-    addr->forwarder = qdr_forwarder_CT(core, semantics);
+    addr->treatment = treatment;
+    addr->forwarder = qdr_forwarder_CT(core, treatment);
     addr->rnodes    = qd_bitmask(0);
     return addr;
 }
 
 
-qdr_address_t *qdr_add_local_address_CT(qdr_core_t *core, char aclass, const char *address,
qd_address_semantics_t semantics)
+qdr_address_t *qdr_add_local_address_CT(qdr_core_t *core, char aclass, const char *address,
qd_address_treatment_t treatment)
 {
     char                 addr_string[1000];
     qdr_address_t       *addr = 0;
@@ -228,7 +228,7 @@ qdr_address_t *qdr_add_local_address_CT(qdr_core_t *core, char aclass,
const cha
 
     qd_hash_retrieve(core->addr_hash, iter, (void**) &addr);
     if (!addr) {
-        addr = qdr_address_CT(core, semantics);
+        addr = qdr_address_CT(core, treatment);
         qd_hash_insert(core->addr_hash, iter, addr, &addr->hash_handle);
         DEQ_ITEM_INIT(addr);
         DEQ_INSERT_TAIL(core->addrs, addr);

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/src/router_core/router_core_private.h
----------------------------------------------------------------------
diff --git a/src/router_core/router_core_private.h b/src/router_core/router_core_private.h
index c6307d3..8dc2fac 100644
--- a/src/router_core/router_core_private.h
+++ b/src/router_core/router_core_private.h
@@ -35,7 +35,7 @@ typedef struct qdr_lrp_ref_t         qdr_lrp_ref_t;
 typedef struct qdr_forwarder_t       qdr_forwarder_t;
 typedef struct qdr_route_t           qdr_route_t;
 
-qdr_forwarder_t *qdr_forwarder_CT(qdr_core_t *core, qd_address_semantics_t semantics);
+qdr_forwarder_t *qdr_forwarder_CT(qdr_core_t *core, qd_address_treatment_t treatment);
 int qdr_forward_message_CT(qdr_core_t *core, qdr_address_t *addr, qd_message_t *msg, qdr_delivery_t
*in_delivery,
                            bool exclude_inprocess, bool control, qd_bitmask_t *link_exclusion);
 void qdr_forward_attach_CT(qdr_core_t *core, qdr_forwarder_t *forwarder, qdr_link_t *in_link);
@@ -110,7 +110,7 @@ struct qdr_action_t {
             qdr_field_t            *address;
             char                    address_class;
             char                    address_phase;
-            qd_address_semantics_t  semantics;
+            qd_address_treatment_t  treatment;
             qdr_subscription_t     *subscription;
             qd_message_t           *message;
             bool                    exclude_inprocess;
@@ -287,7 +287,7 @@ struct qdr_address_t {
     qdr_link_ref_list_t      inlinks;       ///< Locally-Connected Producers
     qd_bitmask_t            *rnodes;        ///< Bitmask of remote routers with connected
consumers
     qd_hash_handle_t        *hash_handle;   ///< Linkage back to the hash table entry
-    qd_address_semantics_t   semantics;
+    qd_address_treatment_t   treatment;
     qdr_forwarder_t         *forwarder;
     bool                     toggle;
     bool                     waypoint;
@@ -307,8 +307,8 @@ struct qdr_address_t {
 ALLOC_DECLARE(qdr_address_t);
 DEQ_DECLARE(qdr_address_t, qdr_address_list_t);
 
-qdr_address_t *qdr_address_CT(qdr_core_t *core, qd_address_semantics_t semantics);
-qdr_address_t *qdr_add_local_address_CT(qdr_core_t *core, char aclass, const char *addr,
qd_address_semantics_t semantics);
+qdr_address_t *qdr_address_CT(qdr_core_t *core, qd_address_treatment_t treatment);
+qdr_address_t *qdr_add_local_address_CT(qdr_core_t *core, char aclass, const char *addr,
qd_address_treatment_t treatment);
 
 void qdr_add_node_ref(qdr_router_ref_list_t *ref_list, qdr_node_t *rnode);
 void qdr_del_node_ref(qdr_router_ref_list_t *ref_list, qdr_node_t *rnode);
@@ -316,7 +316,7 @@ void qdr_del_node_ref(qdr_router_ref_list_t *ref_list, qdr_node_t *rnode);
 struct qdr_address_config_t {
     DEQ_LINKS(qdr_address_config_t);
     qd_hash_handle_t       *hash_handle;
-    qd_address_semantics_t  semantics;
+    qd_address_treatment_t  treatment;
 };
 
 ALLOC_DECLARE(qdr_address_config_t);
@@ -414,9 +414,9 @@ struct qdr_route_t {
     qdr_address_t          *egress_addr;
     bool                    direction_in;
     bool                    direction_out;
-    qd_address_semantics_t  semantics;
-    qd_address_semantics_t  ingress_semantics;
-    qd_address_semantics_t  egress_semantics;
+    qd_address_treatment_t  treatment;
+    qd_address_treatment_t  ingress_treatment;
+    qd_address_treatment_t  egress_treatment;
     char                   *connector_label;
 };
 
@@ -498,7 +498,7 @@ struct qdr_core_t {
     uint64_t              next_identifier;
     sys_mutex_t          *id_lock;
 
-    qdr_forwarder_t      *forwarders[QD_SEMANTICS_LINK_BALANCED + 1];
+    qdr_forwarder_t      *forwarders[QD_TREATMENT_LINK_BALANCED + 1];
 };
 
 typedef enum {

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/src/router_forwarders.c
----------------------------------------------------------------------
diff --git a/src/router_forwarders.c b/src/router_forwarders.c
index 5c6fe37..db686fe 100644
--- a/src/router_forwarders.c
+++ b/src/router_forwarders.c
@@ -19,7 +19,7 @@
 
 #include "dispatch_private.h"
 
-/** defines a default set of forwarding behaviors based on the semantics of an
+/** defines a default set of forwarding behaviors based on the treatment of an
  * address.
  */
 
@@ -51,7 +51,7 @@ static void forward_to_direct_subscribers_LH(qd_address_t *addr,
         //
         // If the fanout is single, exit the loop here.  We only want to send one message
copy.
         //
-        if (QD_FANOUT(addr->semantics) == QD_FANOUT_SINGLE)
+        if (QD_FANOUT(addr->treatment) == QD_FANOUT_SINGLE)
             break;
 
         dest_link_ref = DEQ_NEXT(dest_link_ref);
@@ -83,7 +83,7 @@ static void forward_to_remote_subscribers_LH(qd_router_t *router,
     // candidate destination router.
     //
     int origin = -1;
-    if (ingress_iter && !(addr->semantics & QD_BYPASS_VALID_ORIGINS)) {
+    if (ingress_iter && !(addr->treatment & QD_BYPASS_VALID_ORIGINS)) {
         qd_address_iterator_reset_view(ingress_iter, ITER_VIEW_NODE_HASH);
         qd_address_t *origin_addr;
         qd_hash_retrieve(router->addr_hash, ingress_iter, (void*) &origin_addr);
@@ -257,22 +257,22 @@ static qd_router_forwarder_t anycast_balanced_forwarder = {
 };
 
 
-/** Get the proper default forwarder for an address of the given semantics:
+/** Get the proper default forwarder for an address of the given treatment:
  */
-qd_router_forwarder_t *qd_router_get_forwarder(qd_address_semantics_t semantics)
+qd_router_forwarder_t *qd_router_get_forwarder(qd_address_treatment_t treatment)
 {
-    switch (QD_FANOUT(semantics)) {
+    switch (QD_FANOUT(treatment)) {
     case QD_FANOUT_MULTIPLE:
         return &multicast_forwarder;
     case QD_FANOUT_SINGLE:
-        switch (QD_BIAS(semantics)) {
+        switch (QD_BIAS(treatment)) {
         case QD_BIAS_CLOSEST:
             return &anycast_closest_forwarder;
         case QD_BIAS_SPREAD:
             return &anycast_balanced_forwarder;
         }
     }
-    assert(false);  // invalid semantics? need new forwarder?
+    assert(false);  // invalid treatment? need new forwarder?
     return 0;
 }
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/1dffeb6a/tools/qdstat
----------------------------------------------------------------------
diff --git a/tools/qdstat b/tools/qdstat
index fc8b32c..fd941cf 100755
--- a/tools/qdstat
+++ b/tools/qdstat
@@ -187,14 +187,14 @@ class BusManager(Node):
             outlist.append(str(i))
         return outlist
 
-    def _sem_text(self, sem):
-        sem_map = {'flood'        : 'flood',
+    def _trt_text(self, trt):
+        trt_map = {'flood'        : 'flood',
                    'multi'        : 'multi',
                    'anyClosest'   : 'closest',
                    'anyBalanced'  : 'balanced',
                    'linkBalanced' : 'linkBalanced'}
-        if sem in sem_map:
-            return sem_map[sem]
+        if trt in trt_map:
+            return trt_map[trt]
         return '-'
 
     def displayGeneral(self):
@@ -289,7 +289,7 @@ class BusManager(Node):
         disp = Display(prefix="  ")
         heads = []
         heads.append(Header("addr"))
-        heads.append(Header("sem"))
+        heads.append(Header("treatment"))
         heads.append(Header("in-proc", Header.COMMAS))
         heads.append(Header("local", Header.COMMAS))
         heads.append(Header("remote", Header.COMMAS))
@@ -305,7 +305,7 @@ class BusManager(Node):
         for addr in objects:
             row = []
             row.append(self._addr_summary(addr.name))
-            row.append(self._sem_text(addr.semantics))
+            row.append(self._trt_text(addr.treatment))
             row.append(addr.inProcess)
             row.append(addr.subscriberCount)
             row.append(addr.remoteCount)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message