tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r414109 - in /tomcat/container/tc5.5.x/modules/groupcom: src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java test/java/org/apache/catalina/tribes/demos/CoordinationDemo.java
Date Wed, 14 Jun 2006 06:27:50 GMT
Author: fhanik
Date: Tue Jun 13 23:27:49 2006
New Revision: 414109

URL: http://svn.apache.org/viewvc?rev=414109&view=rev
Log:
More demo modifications

Modified:
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
    tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/CoordinationDemo.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java?rev=414109&r1=414108&r2=414109&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
Tue Jun 13 23:27:49 2006
@@ -502,7 +502,6 @@
     }
 
     public void memberAdded(Member member) {
-        System.out.println("MBR ADD THREAD:"+Thread.currentThread().getName());
         memberAdded(member,true);
     }
 
@@ -734,19 +733,19 @@
     }
     
     public static class CoordinationEvent implements InterceptorEvent {
-        static final int EVT_START = 1;
-        static final int EVT_MBR_ADD = 2;
-        static final int EVT_MBR_DEL = 3;
-        static final int EVT_START_ELECT = 4;
-        static final int EVT_PROCESS_ELECT = 5;
-        static final int EVT_MSG_ARRIVE = 6;
-        static final int EVT_PRE_MERGE = 7;
-        static final int EVT_POST_MERGE = 8;
-        static final int EVT_WAIT_FOR_MSG = 9;
-        static final int EVT_SEND_MSG = 10;
-        static final int EVT_STOP = 11;
-        static final int EVT_CONF_RX = 12;
-        static final int EVT_ELECT_ABANDONED = 13;
+        public static final int EVT_START = 1;
+        public static final int EVT_MBR_ADD = 2;
+        public static final int EVT_MBR_DEL = 3;
+        public static final int EVT_START_ELECT = 4;
+        public static final int EVT_PROCESS_ELECT = 5;
+        public static final int EVT_MSG_ARRIVE = 6;
+        public static final int EVT_PRE_MERGE = 7;
+        public static final int EVT_POST_MERGE = 8;
+        public static final int EVT_WAIT_FOR_MSG = 9;
+        public static final int EVT_SEND_MSG = 10;
+        public static final int EVT_STOP = 11;
+        public static final int EVT_CONF_RX = 12;
+        public static final int EVT_ELECT_ABANDONED = 13;
         
         int type;
         ChannelInterceptor interceptor;

Modified: tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/CoordinationDemo.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/CoordinationDemo.java?rev=414109&r1=414108&r2=414109&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/CoordinationDemo.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/test/java/org/apache/catalina/tribes/demos/CoordinationDemo.java
Tue Jun 13 23:27:49 2006
@@ -226,7 +226,7 @@
             if ( channel != null ) {
                 Member lm = channel.getLocalMember(false);
                 local = lm!=null?lm.getName():"";
-                coord = interceptor.getCoordinator()!=null?interceptor.getCoordinator().getName():"";
+                coord = interceptor!=null && interceptor.getCoordinator()!=null?interceptor.getCoordinator().getName():"";
                 viewId = getByteString(interceptor.getViewId()!=null?interceptor.getViewId().getBytes():new
byte[0]);
                 count = String.valueOf(interceptor.getView().length);
             }
@@ -298,7 +298,9 @@
             interceptor = new NonBlockingCoordinator() {
                 public void fireInterceptorEvent(InterceptorEvent event) {
                     status = event.getEventTypeDesc();
-                    parent.printScreen();
+//                    if ( event instanceof NonBlockingCoordinator.CoordinationEvent &&
+//                         ((NonBlockingCoordinator.CoordinationEvent)event).getEventType()
== NonBlockingCoordinator.CoordinationEvent.EVT_CONF_RX)
+                        parent.printScreen();
                     try { Thread.sleep(SLEEP_TIME); }catch ( Exception x){}
                     
                 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message