[jboss-cvs] JBossAS SVN: r80947 - trunk/cluster/src/main/org/jboss/ha/framework/server.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Nov 13 14:56:02 EST 2008
Author: bstansberry at jboss.com
Date: 2008-11-13 14:56:02 -0500 (Thu, 13 Nov 2008)
New Revision: 80947
Modified:
trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
Log:
Generics cleanup
Modified: trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java
===================================================================
--- trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java 2008-11-13 19:07:01 UTC (rev 80946)
+++ trunk/cluster/src/main/org/jboss/ha/framework/server/ClusterPartition.java 2008-11-13 19:56:02 UTC (rev 80947)
@@ -49,7 +49,7 @@
import org.jboss.bootstrap.spi.util.ServerConfigUtil;
import org.jboss.ha.framework.interfaces.ClusterNode;
import org.jboss.ha.framework.interfaces.DistributedReplicantManager;
-import org.jboss.ha.framework.interfaces.DistributedState;
+//import org.jboss.ha.framework.interfaces.DistributedState;
import org.jboss.ha.framework.interfaces.HAPartition;
import org.jboss.ha.framework.interfaces.ResponseFilter;
import org.jboss.ha.framework.server.deployers.DefaultHAPartitionDependencyCreator;
@@ -148,6 +148,9 @@
}
}
+ /**
+ * Used to connect the channel asynchronously from the thread that calls start().
+ */
private class ChannelConnectTask implements Runnable
{
private final CountDownLatch latch;
@@ -227,7 +230,8 @@
/** The cluster replicant manager */
protected DistributedReplicantManagerImpl replicantManager;
/** The DistributedState service we manage */
- protected DistributedState distributedState;
+ @SuppressWarnings("deprecation")
+ protected org.jboss.ha.framework.interfaces.DistributedState distributedState;
/** The cluster instance log category */
protected Logger log = Logger.getLogger(HAPartition.class.getName());;
protected Logger clusterLifeCycleLog = Logger.getLogger(HAPartition.class.getName() + ".lifecycle");
@@ -828,10 +832,10 @@
this.currentViewId = newView.getVid().getId();
// Keep a list of other members only for "exclude-self" RPC calls
- this.jgotherMembers = (Vector)newView.getMembers().clone();
+ this.jgotherMembers = (Vector<Address>)newView.getMembers().clone();
this.jgotherMembers.remove (this.channel.getLocalAddress());
this.otherMembers = this.translateAddresses (this.jgotherMembers); // TRANSLATE!
- Vector<ClusterNode> translatedNewView = this.translateAddresses ((Vector)newView.getMembers().clone());
+ Vector<ClusterNode> translatedNewView = this.translateAddresses ((Vector<Address>)newView.getMembers().clone());
this.logHistory ("New view: " + translatedNewView + " with viewId: " + this.currentViewId +
" (old view: " + this.members + " )");
@@ -839,7 +843,7 @@
// Save the previous view and make a copy of the new view
Vector<ClusterNode> oldMembers = this.members;
- Vector<Address> newjgMembers = (Vector)newView.getMembers().clone();
+ Vector<Address> newjgMembers = (Vector<Address>)newView.getMembers().clone();
Vector<ClusterNode> newMembers = this.translateAddresses(newjgMembers); // TRANSLATE
this.members = newMembers;
this.jgmembers = newjgMembers;
@@ -961,7 +965,8 @@
return this.replicantManager;
}
- public DistributedState getDistributedStateService()
+ @SuppressWarnings("deprecation")
+ public org.jboss.ha.framework.interfaces.DistributedState getDistributedStateService()
{
return this.distributedState;
}
@@ -1233,9 +1238,9 @@
this.dispatcher.callRemoteMethod(((ClusterNodeImpl)targetNode).getOriginalJGAddress(), m, GroupRequest.GET_NONE, methodTimeout);
}
- private ArrayList processResponseList(RspList rsp, boolean trace)
+ private ArrayList<Object> processResponseList(RspList rsp, boolean trace)
{
- ArrayList rtn = new ArrayList();
+ ArrayList<Object> rtn = new ArrayList<Object>();
if (rsp != null)
{
for (Object item : rsp.values())
@@ -1388,7 +1393,8 @@
// Public ------------------------------------------------------------------
- public void setDistributedStateImpl(DistributedState distributedState)
+ @SuppressWarnings("deprecation")
+ public void setDistributedStateImpl(org.jboss.ha.framework.interfaces.DistributedState distributedState)
{
this.distributedState = distributedState;
}
@@ -1448,7 +1454,7 @@
* @param ctx Naming context under which we bind the object
* @throws Exception Thrown if a naming exception occurs during binding
*/
- protected void bind(String jndiName, Object who, Class classType, Context ctx) throws Exception
+ protected void bind(String jndiName, Object who, Class<?> classType, Context ctx) throws Exception
{
// Ah ! This service isn't serializable, so we use a helper class
//
@@ -1494,7 +1500,7 @@
{
newMembers=new Vector<ClusterNode>();
}
- Vector<ClusterNode> dead=(Vector)oldMembers.clone();
+ Vector<ClusterNode> dead=(Vector<ClusterNode>)oldMembers.clone();
dead.removeAll(newMembers);
this.log.debug("dead members: " + dead);
return dead;
@@ -1516,7 +1522,7 @@
{
allMembers=new Vector<ClusterNode>();
}
- Vector<ClusterNode> newMembers=(Vector)allMembers.clone();
+ Vector<ClusterNode> newMembers=(Vector<ClusterNode>)allMembers.clone();
newMembers.removeAll(oldMembers);
return newMembers;
}
@@ -1529,7 +1535,7 @@
synchronized(theListeners)
{
// JBAS-3619 -- don't hold synch lock while notifying
- theListeners = (ArrayList) theListeners.clone();
+ theListeners = (ArrayList<HAMembershipListener>) theListeners.clone();
}
for (int i = 0; i < theListeners.size(); i++)
More information about the jboss-cvs-commits
mailing list