axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From az...@apache.org
Subject svn commit: r658002 - in /webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes: MembershipManager.java TribesMembershipListener.java
Date Mon, 19 May 2008 21:59:49 GMT
Author: azeez
Date: Mon May 19 14:59:49 2008
New Revision: 658002

URL: http://svn.apache.org/viewvc?rev=658002&view=rev
Log:
Print "member added" message only if the member was actually added to the system


Modified:
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/MembershipManager.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesMembershipListener.java

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/MembershipManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/MembershipManager.java?rev=658002&r1=658001&r2=658002&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/MembershipManager.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/MembershipManager.java
Mon May 19 14:59:49 2008
@@ -52,11 +52,14 @@
      * A new member is added
      *
      * @param member The new member that joined the cluster
+     * @return true - if the member was added to the <code>members</code> array;
false, otherwise.
      */
-    public synchronized void memberAdded(Member member) {
+    public synchronized boolean memberAdded(Member member) {
         if (!members.contains(member)) {
             members.add(member);
+            return true;
         }
+        return false;
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesMembershipListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesMembershipListener.java?rev=658002&r1=658001&r2=658002&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesMembershipListener.java
(original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/clustering/tribes/TribesMembershipListener.java
Mon May 19 14:59:49 2008
@@ -37,8 +37,10 @@
     }
 
     public void memberAdded(Member member) {
-        log.info("New member " + TribesUtil.getHost(member) + " joined cluster.");
-        membershipManager.memberAdded(member);
+
+        if (membershipManager.memberAdded(member)) {
+            log.info("New member " + TribesUtil.getHost(member) + " joined cluster.");
+        }
        //        System.err.println("++++++ IS COORD="+TribesClusterManager.nbc.isCoordinator());
     }
 



Mime
View raw message