[jboss-cvs] JBossAS SVN: r63741 - in trunk: cluster/src/main/org/jboss/ha/framework/interfaces and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 28 18:41:20 EDT 2007


Author: jerrygauth
Date: 2007-06-28 18:41:20 -0400 (Thu, 28 Jun 2007)
New Revision: 63741

Modified:
   trunk/aspects/src/main/org/jboss/aspects/versioned/DistributedSynchronizationManager.java
   trunk/aspects/src/main/org/jboss/aspects/versioned/DistributedTxCache.java
   trunk/cluster/src/main/org/jboss/ha/framework/interfaces/HAPartition.java
   trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
   trunk/cluster/src/main/org/jboss/ha/jmx/HAServiceMBean.java
   trunk/cluster/src/main/org/jboss/ha/jmx/HAServiceMBeanSupport.java
Log:
JBAS-4443, removed deprecated HAPartition RPC methods

Modified: trunk/aspects/src/main/org/jboss/aspects/versioned/DistributedSynchronizationManager.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aspects/versioned/DistributedSynchronizationManager.java	2007-06-28 20:34:15 UTC (rev 63740)
+++ trunk/aspects/src/main/org/jboss/aspects/versioned/DistributedSynchronizationManager.java	2007-06-28 22:41:20 UTC (rev 63741)
@@ -42,7 +42,10 @@
  */
 public class DistributedSynchronizationManager extends LocalSynchronizationManager implements HAPartitionStateTransfer, HAMembershipListener
 {
-
+   protected static final Class[] STRING_TYPE = new Class[]{String.class};
+   protected static final Class[] LIST_TYPE = new Class[]{List.class};
+   protected static final Class[] LOCK_TYPES = new Class[]{String.class, GUID.class, List.class};
+   
    protected static Logger log = Logger.getLogger(DistributedSynchronizationManager.class);
    protected HAPartition partition;
    protected String domainName;
@@ -69,7 +72,7 @@
    protected void pullState() throws Exception
    {
       Object[] args = {};
-      ArrayList rsp = partition.callMethodOnCluster(domainName, "getCurrentState", args, true);
+      ArrayList rsp = partition.callMethodOnCluster(domainName, "getCurrentState", args, null, true);
       if (rsp.size() > 0)
          setCurrentState((Serializable)rsp.get(0));
    }
@@ -130,7 +133,7 @@
       try
       {
          Object[] args = {newObjects};
-         checkResponses(partition.callMethodOnCluster(domainName, "addNewObjects", args, true));
+         checkResponses(partition.callMethodOnCluster(domainName, "addNewObjects", args, LIST_TYPE, true));
       }
       catch (Exception ex)
       {
@@ -145,7 +148,7 @@
       try
       {
          Object[] args = {partition.getNodeName(), globalTxId, clusterUpdates};
-         checkResponses(partition.callMethodOnCluster(domainName, "updateObjects", args, true));
+         checkResponses(partition.callMethodOnCluster(domainName, "updateObjects", args, LOCK_TYPES, true));
 
       }
       catch (Exception ex)
@@ -160,14 +163,14 @@
       {
 
          Object[] args = {partition.getNodeName(), globalTxId, guids};
-         checkResponses(partition.callMethodOnCluster(domainName, "acquireLocks", args, true));
+         checkResponses(partition.callMethodOnCluster(domainName, "acquireLocks", args, LOCK_TYPES, true));
       }
       catch (Exception ex)
       {
          try
          {
             Object[] args = {partition.getNodeName()};
-            partition.callMethodOnCluster(domainName, "releaseHeldLocks", args, true);
+            partition.callMethodOnCluster(domainName, "releaseHeldLocks", args, STRING_TYPE, true);
          }
          catch (Exception ignored)
          {

Modified: trunk/aspects/src/main/org/jboss/aspects/versioned/DistributedTxCache.java
===================================================================
--- trunk/aspects/src/main/org/jboss/aspects/versioned/DistributedTxCache.java	2007-06-28 20:34:15 UTC (rev 63740)
+++ trunk/aspects/src/main/org/jboss/aspects/versioned/DistributedTxCache.java	2007-06-28 22:41:20 UTC (rev 63741)
@@ -46,7 +46,9 @@
  */
 public class DistributedTxCache implements HAPartitionStateTransfer
 {
-
+   protected static final Class[] INSERT_TYPES = new Class[]{Object.class, Object.class};
+   protected static final Class[] REMOVE_TYPES = new Class[]{Object.class};
+   
    private static class LRUCache extends LinkedHashMap
    {
       private static final long serialVersionUID = -402696519285213913L;
@@ -153,7 +155,7 @@
    protected void pullState() throws Exception
    {
       Object[] args = {};
-      List rsp = partition.callMethodOnCluster(cacheName, "getCurrentState", args, true);
+      List rsp = partition.callMethodOnCluster(cacheName, "getCurrentState", args, null, true);
       if (rsp.size() > 0)
       {
          setCurrentState((Serializable)rsp.get(0));
@@ -181,7 +183,7 @@
             log.trace("Inserting a non-Versioned object");
          }
          Object[] args = {key, obj};
-         partition.callMethodOnCluster(cacheName, "_insert", args, false);
+         partition.callMethodOnCluster(cacheName, "_insert", args, INSERT_TYPES, false);
       }
       catch (Exception ex)
       {
@@ -200,7 +202,7 @@
       Object[] args = {key};
       try
       {
-         partition.callMethodOnCluster(cacheName, "_remove", args, false);
+         partition.callMethodOnCluster(cacheName, "_remove", args, REMOVE_TYPES, false);
       }
       catch (Exception ex)
       {
@@ -219,7 +221,7 @@
       Object[] args = {};
       try
       {
-         partition.callMethodOnCluster(cacheName, "_flush", args, false);
+         partition.callMethodOnCluster(cacheName, "_flush", args, null, false);
       }
       catch (Exception ex)
       {

Modified: trunk/cluster/src/main/org/jboss/ha/framework/interfaces/HAPartition.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/interfaces/HAPartition.java	2007-06-28 20:34:15 UTC (rev 63740)
+++ trunk/cluster/src/main/org/jboss/ha/framework/interfaces/HAPartition.java	2007-06-28 22:41:20 UTC (rev 63741)
@@ -133,21 +133,6 @@
          Object[] args, Class[] types, boolean excludeSelf) throws Exception;
 
    /**
-    *
-    * @param serviceName Name of the target service name on which calls are de-multiplexed
-    * @param methodName name of the Java method to be called on remote services
-    * @param args array of Java Object representing the set of parameters to be
-    * given to the remote method
-    * @param excludeSelf indicates if the RPC must also be made on the current
-    * node of the partition or only on remote nodes
-    * @return an array of responses from remote nodes
-    * @throws Exception
-    * @deprecated Use {@link #callMethodOnCluster(String, String, Object[], Class[], boolean)} instead
-    */
-   public ArrayList callMethodOnCluster(String serviceName, String methodName,
-         Object[] args, boolean excludeSelf) throws Exception;
-
-   /**
     * Invoke a asynchronous RPC call on all nodes of the partition/cluster. The
     * call will return immediately and will not wait for the nodes to answer. Thus
     * no answer is available.
@@ -179,22 +164,7 @@
       public ArrayList callMethodOnCoordinatorNode(String serviceName, String methodName,
              Object[] args, Class[] types, boolean excludeSelf) throws Exception;
 
-   
-   /**
-    *
-    * @param serviceName Name of the target service name on which calls are de-multiplexed
-    * @param methodName name of the Java method to be called on remote services
-    * @param args array of Java Object representing the set of parameters to be
-    * given to the remote method
-    * @param excludeSelf indicates if the RPC must also be made on the current
-    * node of the partition or only on remote nodes
-    * @throws Exception
-    * @deprecated Use {@link #callAsynchMethodOnCluster(String, String, Object[], Class[], boolean)} instead
-    */
-   public void callAsynchMethodOnCluster (String serviceName, String methodName,
-         Object[] args, boolean excludeSelf) throws Exception;
 
-
    // *************************
    // *************************
    // State transfer management

Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java	2007-06-28 20:34:15 UTC (rev 63740)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java	2007-06-28 22:41:20 UTC (rev 63741)
@@ -832,22 +832,6 @@
    }      
 
    /**
-    *
-    * @param objName
-    * @param methodName
-    * @param args
-    * @param excludeSelf
-    * @return an array of responses from remote nodes
-    * @throws Exception
-    * @deprecated Use {@link #callMethodOnCluster(String,String,Object[],Class[], boolean)} instead
-    */
-   public ArrayList callMethodOnCluster(String objName, String methodName,
-      Object[] args, boolean excludeSelf) throws Exception
-   {
-      return callMethodOnCluster(objName, methodName, args, null, excludeSelf);
-   }
-
-   /**
     * This function is an abstraction of RpcDispatcher.
     */
    public ArrayList callMethodOnCluster(String objName, String methodName,
@@ -1012,24 +996,7 @@
       return rtn;
    }
 
-
    /**
-    *
-    * @param objName
-    * @param methodName
-    * @param args
-    * @param excludeSelf
-    * @throws Exception
-    * @deprecated Use {@link #callAsynchMethodOnCluster(String, String, Object[], Class[], boolean)} instead
-    */
-   public void callAsynchMethodOnCluster(String objName, String methodName,
-      Object[] args, boolean excludeSelf) 
-      throws Exception
-   {
-      callAsynchMethodOnCluster(objName, methodName, args, null, excludeSelf);
-   }
-
-   /**
     * This function is an abstraction of RpcDispatcher for asynchronous messages
     */
    public void callAsynchMethodOnCluster(String objName, String methodName,

Modified: trunk/cluster/src/main/org/jboss/ha/jmx/HAServiceMBean.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/jmx/HAServiceMBean.java	2007-06-28 20:34:15 UTC (rev 63740)
+++ trunk/cluster/src/main/org/jboss/ha/jmx/HAServiceMBean.java	2007-06-28 22:41:20 UTC (rev 63741)
@@ -80,10 +80,12 @@
    * of a partition.
    * 
    * @param methodName
-   * @param args
+   * @param args array of Java Object representing the set of parameters to be
+   * given to the remote method
+   * @param types The types of the parameters
    * @throws Exception
    */
-  public void callMethodOnPartition(String methodName, Object[] args)
+  public void callMethodOnPartition(String methodName, Object[] args, Class[] types)
     throws Exception;
 
   /**

Modified: trunk/cluster/src/main/org/jboss/ha/jmx/HAServiceMBeanSupport.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/jmx/HAServiceMBeanSupport.java	2007-06-28 20:34:15 UTC (rev 63740)
+++ trunk/cluster/src/main/org/jboss/ha/jmx/HAServiceMBeanSupport.java	2007-06-28 22:41:20 UTC (rev 63741)
@@ -286,23 +286,6 @@
       return partition_;
    }
 
-    /**
-     *
-     * @param methodName
-     * @param args
-     * @throws Exception
-     * @deprecated Use {@link #callMethodOnPartition(String, Object[], Class[])} instead
-     */
-   public void callMethodOnPartition(String methodName, Object[] args)
-      throws Exception
-   {
-      getPartition().callMethodOnCluster(
-         getServiceHAName(),
-         methodName,
-         args,
-         true);
-   }
-
     public void callMethodOnPartition(String methodName, Object[] args, Class[] types)
       throws Exception
    {




More information about the jboss-cvs-commits mailing list