[jboss-cvs] JBossAS SVN: r103607 - in projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/ha/framework: server and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Apr 6 23:30:39 EDT 2010


Author: bstansberry at jboss.com
Date: 2010-04-06 23:30:39 -0400 (Tue, 06 Apr 2010)
New Revision: 103607

Modified:
   projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/ha/framework/interfaces/HAPartition.java
   projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/ha/framework/server/HAServiceImpl.java
Log:
[JBCLUSTER-225][JBCLUSTER-220][JBCLUSTER-262][JBCLUSTER-263] Clean up HAPartition interface

Modified: projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/ha/framework/interfaces/HAPartition.java
===================================================================
--- projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/ha/framework/interfaces/HAPartition.java	2010-04-07 03:13:11 UTC (rev 103606)
+++ projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/ha/framework/interfaces/HAPartition.java	2010-04-07 03:30:39 UTC (rev 103607)
@@ -22,8 +22,8 @@
 package org.jboss.ha.framework.interfaces;
 
 import java.io.Serializable;
+import java.util.List;
 import java.util.Vector;
-import java.util.ArrayList;
 
 /** 
  *   HAPartition is an abstraction of the communication framework, providing access
@@ -49,7 +49,7 @@
    // Partition information accessors
    // *******************************
    // *******************************
-   //
+   
    /**
     * Return the name of this node in the current partition. The name is
     * dynamically determined by the partition. The name will be the String
@@ -61,8 +61,8 @@
     */   
    public String getNodeName();
    /**
-    * The name of the partition. Either set when creating the partition
-    * (MBEAN definition) or uses the default name
+    * The name of the partition.
+    *
     * @return Name of the current partition
     */   
    public String getPartitionName();
@@ -72,6 +72,7 @@
     * @return the DistributedReplicantManager
     */   
    public DistributedReplicantManager getDistributedReplicantManager();
+   
    /**
     * Accessor to the DistributedState (DS) that is linked to this partition.
     * @return the DistributedState service
@@ -85,8 +86,16 @@
    // RPC multicast communication
    // ***************************
    // ***************************
-   //
+   
    /**
+    * Gets the default period, in ms, that the various <code>callMethodOnXXX</code>
+    * methods that don't specify a <code>methodTimeout</code> parameter will wait for a response.
+    */
+   public long getMethodCallTimeout();
+   
+   /**
+    * Register an object upon which RPCs associated with the given serviceName
+    * will be invoked.
     * The partition receives RPC calls from other nodes in the cluster and demultiplexes
     * them, according to a service name, to a particular service. Consequently, each
     * service must first subscribe with a particular service name in the partition. The subscriber
@@ -98,6 +107,8 @@
    public void registerRPCHandler(String serviceName, Object handler);
    
    /**
+    * Register an object upon which RPCs associated with the given serviceName
+    * will be invoked.
     * The partition receives RPC calls from other nodes in the cluster and demultiplexes
     * them, according to a service name, to a particular service. Consequently, each
     * service must first subscribe with a particular service name in the partition. The subscriber
@@ -119,110 +130,264 @@
     */   
    public void unregisterRPCHandler(String serviceName, Object subscriber);
 
-   // Called only on all members of this partition on all nodes
-   //
+   
    /**
-    * Invoke a synchronous RPC call on all nodes of the partition/cluster
-    * @param serviceName Name of the target service name on which calls are de-multiplexed
+    * Invoke an RPC call on all nodes of the partition/cluster and return their
+    * response values as a list. This convenience method is equivalent to 
+    * {@link #callMethodOnCluster(String, String, Object[], Class[], Class, boolean, ResponseFilter, long, boolean) 
+    * callAsynchMethodOnCluster(serviceName, methodName, args, types, Object.class, excludeSelf, null, methodTimeout, false)} 
+    * where <code>methodTimeout</code> is the value returned by {@link #getMethodCallTimeout()}.
+    * 
+    * @param serviceName name of the target service name on which calls are invoked
     * @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 types The types of the parameters
-    * @param excludeSelf indicates if the RPC must also be made on the current
-    * node of the partition or only on remote nodes
-    * @throws Exception Throws if a communication exception occurs
-    * @return an array of responses from remote nodes
+    * @param types types of the parameters
+    * @param excludeSelf <code>false</code> if the RPC must also be made on the current
+    * node of the partition, <code>true</code> if only on remote nodes
+    *
+    * @return an array of responses from nodes that invoked the RPC
     */
-   public ArrayList callMethodOnCluster(String serviceName, String methodName,
-         Object[] args, Class[] types, boolean excludeSelf) throws Exception;
+   public List<?> callMethodOnCluster(String serviceName, String methodName,
+         Object[] args, Class<?>[] types, boolean excludeSelf) throws InterruptedException;
    
    /**
-    * Invoke a synchronous RPC call on all nodes of the partition/cluster which
-    * can be terminated early based on response filter implementation passed. 
-    * @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
+    * Invoke a synchronous RPC call on all nodes of the partition/cluster and return their
+    * response values as a list. This convenience method is equivalent to 
+    * {@link #callMethodOnCluster(String, String, Object[], Class[], boolean, ResponseFilter, boolean) 
+    * callAsynchMethodOnCluster(serviceName, methodName, args, types, Object.class, excludeSelf, filter, methodTimeout, false)} 
+    * where <code>methodTimeout</code> is the value returned by {@link #getMethodCallTimeout()}.
+    * 
+    * @param serviceName name of the target service name on which calls are invoked
+    * @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 types The types of the parameters
-    * @param excludeSelf Indicates if the RPC must also be made on the current
-    * node of the partition or only on remote nodes
-    * @param filter Response filter instance which allows for early termination 
-    * of the synchronous RCP call. 
+    * @param types types of the parameters
+    * @param excludeSelf <code>false</code> if the RPC must also be made on the current
+    * node of the partition, <code>true</code> if only on remote nodes
+    * @param filter response filter instance which allows for early termination 
+    * of the synchronous RPC call. Can be <code>null</code>.
+    * 
     * @return an array of responses from remote nodes
-    * @throws Exception Throws if a communication exception occurs
     */
-   public ArrayList callMethodOnCluster(String serviceName, String methodName,
-         Object[] args, Class[] types, boolean excludeSelf, ResponseFilter filter) throws Exception;
+   public List<?> callMethodOnCluster(String serviceName, String methodName,
+         Object[] args, Class<?>[] types, boolean excludeSelf, ResponseFilter filter) throws InterruptedException;
+   
+   /**
+    * Invoke an RPC call on all nodes of the partition/cluster and return their
+    * response values as a list.
+    * 
+    * @param serviceName name of the target service name on which calls are invoked
+    * @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 types types of the parameters
+    * @param returnType the expected type of the return values, null or 
+    *     <code>void.class</code> if no return values are expected
+    * @param excludeSelf <code>false</code> if the RPC must also be made on the current
+    * node of the partition, <code>true</code> if only on remote nodes
+    * @param filter response filter instance which allows for early termination 
+    * of the RPC call once acceptable responses are received. Can be <code>null</code>, 
+    * in which the call will not return until all nodes have responded.
+    * @param methodTimeout max number of ms to wait for response to arrive before
+    *                      returning
+    * @param unordered <code>true</code> if the HAPartition isn't required to ensure
+    * that this RPC is invoked on all nodes in a consistent order with respect
+    * to other RPCs originated by the same node
+    * @return a list of responses from remote nodes
+    */
+   public <T> List<T> callMethodOnCluster(String serviceName, String methodName,
+         Object[] args, Class<?>[] types, Class<T> returnType, boolean excludeSelf, 
+         ResponseFilter filter, long methodTimeout, boolean unordered) throws InterruptedException;
 
    /**
-    * 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.
-    * @param serviceName Name of the target service name on which calls are de-multiplexed
+    * Invoke an RPC call on all nodes of the partition/cluster without waiting
+    * for any responses. The call will return immediately after sending a message
+    * to the cluster telling nodes to invoke the RPC and will not wait for the nodes to answer. Thus
+    * no return values are available. This convenience method is equivalent to 
+    * {@link #callAsynchMethodOnCluster(String, String, Object[], Class[], boolean, boolean) 
+    * callAsynchMethodOnCluster(serviceName, methodName, args, types, excludeSelf, false)}.
+    * 
+    * @param serviceName name of the target service name on which calls are invoked
     * @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 types The types of the parameters
-    * @param excludeSelf indicates if the RPC must also be made on the current
-    * node of the partition or only on remote nodes
-    * @throws Exception Throws if a communication exception occurs
+    * @param types types of the parameters
+    * @param excludeSelf <code>false</code> if the RPC must also be made on the current
+    * node of the partition, <code>true</code> if only on remote nodes
     */   
    public void callAsynchMethodOnCluster (String serviceName, String methodName,
-         Object[] args, Class[] types, boolean excludeSelf) throws Exception;
+         Object[] args, Class<?>[] types, boolean excludeSelf) throws InterruptedException;
+   
+   /**
+    * Invoke an RPC call on all nodes of the partition/cluster without waiting
+    * for any responses. The call will return immediately after sending a message
+    * to the cluster telling nodes to invoke the RPC and will not wait for the nodes to answer. 
+    * Thus no return values are available. 
+    * 
+    * @param serviceName name of the target service name on which calls are invoked
+    * @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 types types of the parameters
+    * @param excludeSelf <code>false</code> if the RPC must also be made on the current
+    * node of the partition, <code>true</code> if only on remote nodes
+    * @param unordered <code>true</code> if the HAPartition isn't required to ensure
+    * that this RPC is invoked on all nodes in a consistent order with respect
+    * to other RPCs originated by the same node
+    */   
+   public void callAsynchMethodOnCluster(String objName, String methodName,
+         Object[] args, Class<?>[] types, boolean excludeSelf, boolean unordered) throws InterruptedException;
 
    /**
     * Calls method on Cluster coordinator node only.  The cluster coordinator 
+    * node is the first node in the current cluster view. This convenience method is equivalent to 
+    * {@link #callMethodOnCoordinatorNode(String, String, Object[], Class[], Class, boolean, long, boolean) 
+    * callMethodOnCoordinatorNode(serviceName, methodName, args, types, Object.class, excludeSelf, methodTimeout, false)} 
+    * where <code>methodTimeout</code> is the value returned by {@link #getMethodCallTimeout()}.
+    * 
+    * @param serviceName name of the target service name on which calls are invoked
+    * @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 types types of the parameters
+    * @param excludeSelf <code>true</code> if the RPC should not be made on the 
+    * current node even if the current node is the coordinator
+    * 
+    * @return the value returned by the target method
+    */
+   public Object callMethodOnCoordinatorNode(String serviceName, String methodName,
+             Object[] args, Class<?>[] types, boolean excludeSelf) throws InterruptedException;
+
+   /**
+    * Calls method on Cluster coordinator node only.  The cluster coordinator 
     * node is the first node in the current cluster view.
-    * @param serviceName Name of the target service name on which calls are de-multiplexed
+    * 
+    * @param serviceName name of the target service name on which calls are invoked
     * @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 types The types of the parameters
-    * @param excludeSelf indicates if the RPC will be made on the current node even if the current node
-    * is the coordinator
-    * @throws Exception Throws if a communication exception occurs
-    * @return an array of responses from remote nodes
+    * @param types types of the parameters
+    * @param returnType the expected type of the return value, <code>null</code>
+    *                   or <code>void.class</code> if no return value is expected
+    * @param excludeSelf <code>true</code> if the RPC should not be made on the 
+    * current node even if the current node is the coordinator
+    * @param methodTimeout max number of ms to wait for response to arrive before
+    *                      returning
+    * @param unordered <code>true</code> if the HAPartition isn't required to ensure
+    * that this RPC is invoked on all nodes in a consistent order with respect
+    * to other RPCs originated by the same node
+    * @return the value returned by the target method
     */
-   public ArrayList callMethodOnCoordinatorNode(String serviceName, String methodName,
-             Object[] args, Class[] types, boolean excludeSelf) throws Exception;
+   public <T> T callMethodOnCoordinatorNode(String serviceName, String methodName,
+             Object[] args, Class<?>[] types, Class<T> returnType, boolean excludeSelf, 
+             long methodTimeout, boolean unordered) throws InterruptedException;
 
-    /**
-     * Calls method synchronously on target node only.
-     * @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 types The types of the parameters
-     * node of the partition or only on remote nodes
-     * @param targetNode is the target of the call
-     * @return the value returned by the target method
-     * @throws Exception Throws if a communication exception occurs
-     */
+
+   /**
+    * Calls method on target node only. This convenience method is equivalent to 
+    * {@link #callMethodOnNode(String, String, Object[], Class[], Class, long, ClusterNode, boolean) 
+    * callMethodOnNode(serviceName, methodName, args, types, Object.class, methodTimeout, targetNode, false)}
+    * where <code>methodTimeout</code> is the value returned by {@link #getMethodCallTimeout()}.
+    * 
+    * @param serviceName name of the target service name on which calls are invoked
+    * @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 types types of the parameters
+    * @param methodTimeout max number of ms to wait for response to arrive before
+    *                      returning
+    * @param targetNode is the target of the call
+    * 
+    * @return the value returned by the target method
+    */
    public Object callMethodOnNode(String serviceName, String methodName,
-           Object[] args, Class[] types, long methodTimeout, ClusterNode targetNode) throws Throwable;
+           Object[] args, Class<?>[] types, ClusterNode targetNode) throws InterruptedException;
 
+
    /**
-     * Calls method on target node only.
-     * @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 types The types of the parameters
-     * node of the partition or only on remote nodes
-     * @param targetNode is the target of the call
-     * 
-     * @throws Exception Throws if a communication exception occurs
+    * Calls method on target node only. This convenience method is equivalent to 
+    * {@link #callMethodOnNode(String, String, Object[], Class[], Class, long, ClusterNode, boolean) 
+    * callMethodOnNode(serviceName, methodName, args, types, Object.class, methodTimeout, targetNode, false)}.
+    * 
+    * @param serviceName name of the target service name on which calls are invoked
+    * @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 types types of the parameters
+    * @param methodTimeout max number of ms to wait for response to arrive before
+    *                      returning
+    * @param targetNode is the target of the call
+    * 
+    * @return the value returned by the target method
+    */
+   public Object callMethodOnNode(String serviceName, String methodName,
+           Object[] args, Class<?>[] types, long methodTimeout, ClusterNode targetNode) throws InterruptedException;
+
+
+   /**
+    * Calls method synchronously on target node only.
+    * 
+    * @param serviceName name of the target service name on which calls are invoked
+    * @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 types types of the parameters
+    * @param returnType the expected type of the return value, <code>null</code>
+    *                   or <code>void.class</code> if no return value is expected
+    * @param methodTimeout max number of ms to wait for response to arrive before
+    *                      returning
+    * @param targetNode is the target of the call
+    * @param unordered <code>true</code> if the HAPartition isn't required to ensure
+    * that this RPC is invoked on all nodes in a consistent order with respect
+    * to other RPCs originated by the same node
+    * @return the value returned by the target method
+    */
+   public <T> T callMethodOnNode(String serviceName, String methodName,
+          Object[] args, Class<?>[] types, Class<T> returnType, 
+          long methodTimeout, ClusterNode targetNode, boolean unordered) throws InterruptedException;
+
+   /**
+    * Calls method on target node only. The call will return immediately and 
+    * will not wait for the node to answer. Thus no answer is available. This 
+    * convenience method is equivalent to 
+    * {@link #callAsynchMethodOnNode(String, String, Object[], Class[], ClusterNode, boolean) 
+    * callAsynchMethodOnCluster(serviceName, methodName, args, types, methodTimeout, targetNode, false)}.
+    * 
+    * @param serviceName name of the target service name on which calls are invoked
+    * @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 types types of the parameters
+    * @param targetNode is the target of the call
      */
    public void callAsyncMethodOnNode(String serviceName, String methodName,
-           Object[] args, Class[] types, long methodTimeout, ClusterNode targetNode) throws Throwable;
+           Object[] args, Class<?>[] types, ClusterNode targetNode) throws InterruptedException;
 
+   /**
+    * Calls method on target node only. The call will return immediately and 
+    * will not wait for the node to answer. Thus no answer is available.
+    * 
+    * @param serviceName name of the target service name on which calls are invoked
+    * @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 types types of the parameters
+    * @param targetNode is the target of the call
+    * @param unordered <code>true</code> if the HAPartition isn't required to ensure
+    * that this RPC is invoked on all nodes in a consistent order with respect
+    * to other RPCs originated by the same node
+    */
+   public void callAsyncMethodOnNode(String serviceName, String methodName,
+           Object[] args, Class<?>[] types, ClusterNode targetNode, boolean unordered) throws InterruptedException;
+
    // *************************
    // *************************
    // State transfer management
    // *************************
    // *************************
-   //
    
+   
    /**
     * State management is highly important for clustered services. Consequently, services that wish to manage their state
     * need to subscribe to state transfer events. When a service is started on a cluster node, state is pushed from another node to the  
@@ -248,6 +413,7 @@
     * @param subscriber Object implementing {@link HAPartitionStateTransfer} and providing or receiving state transfer callbacks
     */   
    public void subscribeToStateTransferEvents (String serviceName, HAPartition.HAPartitionStateTransfer subscriber);
+   
    /**
     * Unregister a service from state transfer callbacks.
     * @param serviceName Name of the service that participates in the state transfer protocol
@@ -260,57 +426,68 @@
    // Group Membership listeners
    // *************************
    // *************************
-   //
+   
    /**
-    * When a new node joins the cluster or an existing node leaves the cluster
-    * (or simply dies), membership events are raised.
-    *
+    * Listener for notifications issued when a new node joins the cluster or an 
+    * existing node leaves the cluster (or simply dies).
     */   
    public interface HAMembershipListener
    {
-      /** Called when a new partition topology occurs. This callback is made
-       * using the JG protocol handler thread and so you cannot execute new
-       * cluster calls that need this thread. If you need to do that implement
-       * the asynchronous version of the listener interface.
+      /** Called when a partition topology change occurs. This callback may be
+       * made using the thread that carries messages up from the network and so you 
+       * should not execute new cluster calls using this thread. If you need to 
+       * do that implement the 
+       * {@link AsynchHAMembershipListener asynchronous version of this interface}.
        *
        * @param deadMembers A list of nodes that have died since the previous view
        * @param newMembers A list of nodes that have joined the partition since the previous view
        * @param allMembers A list of nodes that built the current view
        */      
-      public void membershipChanged(Vector deadMembers, Vector newMembers, Vector allMembers);
+      public void membershipChanged(Vector<ClusterNode> deadMembers, Vector<ClusterNode> newMembers, Vector<ClusterNode> allMembers);
    }
 
-   /** A tagging interface for HAMembershipListener callbacks that will
-    * be performed in a thread separate from the JG protocol handler thread.
-    * The ordering of view changes is preserved, but listeners are free to
-    * execute cluster calls.
+   /** 
+    * A tagging interface for HAMembershipListener implementations that require
+    * notifications to be issued by a thread separate from the thread that 
+    * carries messages up from the network. The ordering of view changes is 
+    * preserved, but listeners are free to execute cluster calls.
     */
    public interface AsynchHAMembershipListener extends HAMembershipListener
    {
       // Nothing new
    }
    
-   /** Extends HAMembershipListener to receive notification when a network-partition merge occurs.
+   /** 
+    * Extends HAMembershipListener to receive a specialized notification when a 
+    * network-partition merge occurs. A merge occurs when two or more nodes that 
+    * were unaware of each other for some reason (e.g. a crashed switch) detect 
+    * each other and form a single group.
     */
    public interface HAMembershipExtendedListener extends HAPartition.HAMembershipListener
    {
-      /** Extends HAMembershipListener to receive a specific callback when a
-       * network-partition merge occurs. The same restriction on interaction
-       * with the JG protocol stack applies.
+      /** 
+       * Specialized notification issued instead of 
+       * {@link #membershipChanged(List, List, List) the standard one}
+       * when a network-partition merge occurs. This notification is made
+       * using the thread that carries messages up from the network and so you 
+       * should not execute new cluster calls using this thread. If you need to 
+       * do that implement the 
+       * {@link AsynchHAMembershipExtendedListener asynchronous version of this interface}.
        *
        * @param deadMembers A list of nodes that have died since the previous view
        * @param newMembers A list of nodes that have joined the partition since the previous view
        * @param allMembers A list of nodes that built the current view
        * @param originatingGroups A list of nodes that were previously partioned and that are now merged
        */      
-      public void membershipChangedDuringMerge(Vector deadMembers, Vector newMembers,
-            Vector allMembers, Vector originatingGroups);
+      public void membershipChangedDuringMerge(List<ClusterNode> deadMembers, List<ClusterNode> newMembers,
+            List<ClusterNode> allMembers, List<List<ClusterNode>> originatingGroups);
    }
 
-   /** A tagging interface for HAMembershipExtendedListener callbacks that will
-    * be performed in a thread separate from the JG protocol handler thread.
-    * The ordering of view changes is preserved, but listeners are free to
-    * execute cluster calls.
+   /** 
+    * A tagging interface for HAMembershipExtendedListener callbacks that will
+    * be performed in a thread separate from the thread that carries messages 
+    * up from the network. The ordering of view changes is preserved, but 
+    * listeners are free to execute cluster calls.
     */
    public interface AsynchHAMembershipExtendedListener extends HAMembershipExtendedListener
    {
@@ -322,11 +499,13 @@
     * @param listener The membership listener object
     */   
    public void registerMembershipListener(HAMembershipListener listener);
+   
    /**
     * Unsubscribes from receiving {@link HAMembershipListener} events.
     * @param listener The listener wishing to unsubscribe
-    */   
+    */ 
    public void unregisterMembershipListener(HAMembershipListener listener);
+   
    /**
     * Returns whether this partition will synchronously notify any 
     * HAMembershipListeners of membership changes using the calling thread
@@ -340,6 +519,7 @@
     *         is <code>false</code>.
     */
    public boolean getAllowSynchronousMembershipNotifications();
+
    /**
     * Sets whether this partition will synchronously notify any 
     * HAMembershipListeners of membership changes using the calling thread
@@ -360,11 +540,12 @@
     * @return The identifier of the current view
     */   
    public long getCurrentViewId();
+
    /**
     * Return the list of member nodes that built the current view i.e., the current partition.
     * @return An array of Strings containing the node names
     */   
-   public Vector getCurrentView ();
+   public List<ClusterNode> getCurrentView ();
 
    /**
     * Return the member nodes that built the current view i.e., the current partition.

Modified: projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/ha/framework/server/HAServiceImpl.java
===================================================================
--- projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/ha/framework/server/HAServiceImpl.java	2010-04-07 03:13:11 UTC (rev 103606)
+++ projects/cluster/ha-server-api/trunk/src/main/java/org/jboss/ha/framework/server/HAServiceImpl.java	2010-04-07 03:30:39 UTC (rev 103607)
@@ -207,7 +207,7 @@
    @SuppressWarnings("unchecked")
    protected <T> List<T> callMethodOnPartition(String methodName, Object[] args, Class<?>[] types) throws Exception
    {
-       return this.partition.callMethodOnCluster(this.name, methodName, args, types, true);
+       return (List<T>) this.partition.callMethodOnCluster(this.name, methodName, args, types, true);
    }
 
    protected void callAsyncMethodOnPartition(String methodName, Object[] args, Class<?>[] types) throws Exception




More information about the jboss-cvs-commits mailing list