tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r407805 - in /tomcat/container/tc5.5.x/modules: groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java groupcom/to-do.txt ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
Date Fri, 19 May 2006 14:27:25 GMT
Author: fhanik
Date: Fri May 19 07:27:25 2006
New Revision: 407805

URL: http://svn.apache.org/viewvc?rev=407805&view=rev
Log:
Added in skeleton support for versioning, this will help the maps keep in sync

Modified:
    tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java
    tomcat/container/tc5.5.x/modules/groupcom/to-do.txt
    tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java

Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java?rev=407805&r1=407804&r2=407805&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java
(original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/tipis/ReplicatedMapEntry.java
Fri May 19 07:27:25 2006
@@ -103,6 +103,20 @@
      */
     public void setOwner(Object owner);
     
+    /**
+     * For accuracy checking, a serialized attribute can contain a version number
+     * This number increases as modifications are made to the data.
+     * The replicated map can use this to ensure accuracy on a periodic basis
+     * @return long - the version number or -1 if the data is not versioned
+     */
+    public long getVersion();
+    
+    /**
+     * Forces a certain version to a replicated map entry<br>
+     * @param version long
+     */
+    public void setVersion(long version);
+    
     
     
     

Modified: tomcat/container/tc5.5.x/modules/groupcom/to-do.txt
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/groupcom/to-do.txt?rev=407805&r1=407804&r2=407805&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/to-do.txt (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/to-do.txt Fri May 19 07:27:25 2006
@@ -31,6 +31,7 @@
  
 10. Sender burst, concurrent messaging between two or more nodes
 
+11. Multicasting can still be done on a per message basis using a MulticastInterceptor
 
 Bugs:
 ===========================================
@@ -41,9 +42,6 @@
 Code Tasks:
 ===========================================
 
-45. McastServiceImpl.receive should have a SO_TIMEOUT so that we can check
-    for members dropping on the same thread
-
 41. Build a tipi that is a soft membership
 
 38. Make the AbstractReplicatedMap accept non serializable elements, but just don't replicate
them
@@ -285,4 +283,8 @@
        the valid range for check time, 
     4. send a RPC message, if no reply, remove the map from itself
     Other solution, use the TcpFailureDetector, catch send errors 
-Notes: Implemented using a periodic ping in the AbstractReplicatedMap
\ No newline at end of file
+Notes: Implemented using a periodic ping in the AbstractReplicatedMap
+
+45. McastServiceImpl.receive should have a SO_TIMEOUT so that we can check
+    for members dropping on the same thread
+Notes: Completed
\ No newline at end of file

Modified: tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java?rev=407805&r1=407804&r2=407805&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
(original)
+++ tomcat/container/tc5.5.x/modules/ha/src/share/org/apache/catalina/ha/session/DeltaSession.java
Fri May 19 07:27:25 2006
@@ -85,6 +85,8 @@
 
     protected Lock diffLock = new ReentrantReadWriteLock().writeLock();
 
+    private long version;
+
     // ----------------------------------------------------------- Constructors
 
     /**
@@ -521,6 +523,7 @@
         isNew = ( (Boolean) stream.readObject()).booleanValue();
         isValid = ( (Boolean) stream.readObject()).booleanValue();
         thisAccessedTime = ( (Long) stream.readObject()).longValue();
+        version = ( (Long) stream.readObject()).longValue();
         boolean hasPrincipal = stream.readBoolean();
         principal = null;
         if (hasPrincipal) {
@@ -589,6 +592,7 @@
         stream.writeObject(new Boolean(isNew));
         stream.writeObject(new Boolean(isValid));
         stream.writeObject(new Long(thisAccessedTime));
+        stream.writeObject(new Long(version));
         stream.writeBoolean(getPrincipal() != null);
         if (getPrincipal() != null) {
             SerializablePrincipal.writePrincipal((GenericPrincipal) principal,stream);
@@ -659,10 +663,18 @@
         return lastTimeReplicated;
     }
 
+    public long getVersion() {
+        return version;
+    }
+
     protected void setLastTimeReplicated(long lastTimeReplicated) {
         this.lastTimeReplicated = lastTimeReplicated;
     }
-    
+
+    public void setVersion(long version) {
+        this.version = version;
+    }
+
     protected void setAccessCount(int count) {
         super.accessCount = count;
     }



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


Mime
View raw message