User: slaboure
  Date: 01/10/02 00:17:07

  Modified:    src/main/org/jboss/ha/framework/server HAPartitionImpl.java
  Log:
  Optimization: we save three methods calls for each method invocation.
  We could further improve this (one call) by using the same scheme in HARMIServerImpl.
  
  Revision  Changes    Path
  1.3       +11 -1     
jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java
  
  Index: HAPartitionImpl.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/HAPartitionImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HAPartitionImpl.java      2001/10/02 04:06:47     1.2
  +++ HAPartitionImpl.java      2001/10/02 07:17:07     1.3
  @@ -69,6 +69,8 @@
      
      protected Logger log = null;
      
  +   protected long currentViewId = -1;
  +   
      final MethodLookup  method_lookup_clos=new MethodLookupClos ();
      
      public HAPartitionImpl (String partitionName, JChannel channel, boolean 
deadlock_detection) throws Exception
  @@ -153,6 +155,10 @@
         this.members = view.GetMembers ();
         log.info ("Num cluster members: " + members.size ());
         
  +      // Update the initial view id
  +      //
  +      this.currentViewId = view.GetVid().GetId();
  +      
         // We must now syncrhonize new state transfer subscriber
         //
         boolean rc = channel.GetState (null, 8000);
  @@ -201,7 +207,7 @@
   
      public long getCurrentViewId()
      {
  -       return channel.GetView().GetVid().GetId();
  +      return this.currentViewId;
      }
   
      // ***************************
  @@ -370,6 +376,10 @@
      {
         try
         {
  +         // we update the view id
  +         //
  +         this.currentViewId = newView.GetVid().GetId();
  +         
            if (this.members == null)
            {
               // Initial viewAccepted
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to