tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r418883 - in /tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes: io/XByteBuffer.java membership/Membership.java transport/nio/NioReceiver.java transport/nio/NioReplicationThread.java
Date Tue, 04 Jul 2006 00:25:25 GMT
Author: fhanik
Date: Mon Jul  3 17:25:25 2006
New Revision: 418883

URL: http://svn.apache.org/viewvc?rev=418883&view=rev
Log:
Update member data on each transmission
Don't reregister the socket out of sync

Modified:
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/Membership.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReceiver.java
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReplicationThread.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java?rev=418883&r1=418882&r2=418883&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/io/XByteBuffer.java
Mon Jul  3 17:25:25 2006
@@ -314,7 +314,9 @@
      */
     public XByteBuffer extractDataPackage(boolean clearFromBuffer) {
         int psize = countPackages(true);
-        if (psize == 0) throw new java.lang.IllegalStateException("No package exists in XByteBuffer");
+        if (psize == 0) {
+            throw new java.lang.IllegalStateException("No package exists in XByteBuffer");
+        }
         int size = toInt(buf, START_DATA.length);
         XByteBuffer xbuf = BufferPool.getBufferPool().getBuffer(size,false);
         xbuf.setLength(size);

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/Membership.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/Membership.java?rev=418883&r1=418882&r2=418883&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/Membership.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/membership/Membership.java
Mon Jul  3 17:25:25 2006
@@ -122,12 +122,14 @@
             //update the member alive time
             MemberImpl updateMember = entry.getMember() ;
             if(updateMember.getMemberAliveTime() != member.getMemberAliveTime()) {
+                //update fields that can change
                 updateMember.setMemberAliveTime(member.getMemberAliveTime());
+                updateMember.setPayload(member.getPayload());
+                updateMember.setCommand(member.getCommand());
                 Arrays.sort(members, memberComparator);
             }
         }
         entry.accessed();
- 
         return result;
     }
 

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReceiver.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReceiver.java?rev=418883&r1=418882&r2=418883&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReceiver.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReceiver.java
Mon Jul  3 17:25:25 2006
@@ -196,7 +196,7 @@
                         if (delta > (long) getTimeout() && (!ka.isAccessed()))
{
                             log.warn("Channel key is registered, but has had no interest
ops for the last "+getTimeout()+" ms.");
                             ka.setLastAccess(now);
-                            key.interestOps(SelectionKey.OP_READ);
+                            //key.interestOps(SelectionKey.OP_READ);
                         }//end if
                     } else {
                         cancelledKey(key);

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReplicationThread.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReplicationThread.java?rev=418883&r1=418882&r2=418883&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReplicationThread.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/transport/nio/NioReplicationThread.java
Mon Jul  3 17:25:25 2006
@@ -69,8 +69,7 @@
                 // sleep and release object lock
                 this.wait();
             } catch (InterruptedException e) {
-                if(log.isInfoEnabled())
-                    log.info("TCP worker thread interrupted in cluster",e);
+                if(log.isInfoEnabled()) log.info("TCP worker thread interrupted in cluster",e);
                 // clear interrupt status
                 Thread.interrupted();
             }



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


Mime
View raw message