User: slaboure
  Date: 01/12/31 07:15:11

  Modified:    src/main/org/jboss/ha/framework/server
                        DistributedStateImpl.java
  Log:
  New set/remove methods to mimic optional parameter to indicate if the cluster call 
must be made (a-)synchronous.
  
  Revision  Changes    Path
  1.6       +18 -3     
jbossmx/src/main/org/jboss/ha/framework/server/DistributedStateImpl.java
  
  Index: DistributedStateImpl.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmx/src/main/org/jboss/ha/framework/server/DistributedStateImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DistributedStateImpl.java 2001/12/29 16:11:43     1.5
  +++ DistributedStateImpl.java 2001/12/31 15:15:11     1.6
  @@ -29,7 +29,7 @@
    *
    *   @author  <a href="mailto:[EMAIL PROTECTED]";>Sacha Labourey</a>.
    *   @author  <a href="mailto:[EMAIL PROTECTED]";>Bill Burke</a>.
  - *   @version $Revision: 1.5 $
  + *   @version $Revision: 1.6 $
    *
    * <p><b>Revisions:</b><br>
    * <p><b>2001/11/26: Sacha Labourey</b>
  @@ -105,18 +105,33 @@
   
      public void set (String category, String key, Serializable value) throws 
Exception
      {
  +      set (category, key, value, true);
  +   }
  +   public void set (String category, String key, Serializable value, boolean 
asynchronousCall) throws Exception
  +   {
         Object[] args =
         {category, key, value};
  -      partition.callMethodOnCluster (SERVICE_NAME, "_set", args, true);
  +      if (asynchronousCall)
  +         partition.callAsynchMethodOnCluster (SERVICE_NAME, "_set", args, true);
  +      else
  +         partition.callMethodOnCluster (SERVICE_NAME, "_set", args, true);
         this._setInternal (category, key, value);
         notifyKeyListeners (category, key, value, true);
      }
      
      public Serializable remove (String category, String key) throws Exception
      {
  +      return remove (category, key, true);
  +   }
  +   
  +   public Serializable remove (String category, String key, boolean 
asynchronousCall) throws Exception
  +   {
         Object[] args =
         {category, key};
  -      partition.callMethodOnCluster (SERVICE_NAME, "_remove", args, true);
  +      if (asynchronousCall)
  +         partition.callAsynchMethodOnCluster (SERVICE_NAME, "_remove", args, true);
  +      else
  +         partition.callMethodOnCluster (SERVICE_NAME, "_remove", args, true);
   
         Serializable removed = this._removeInternal (category, key);
         notifyKeyListenersOfRemove (category, key, removed , true);
  
  
  

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

Reply via email to