[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Fri Dec 15 09:19:58 EST 2006
User: msurtani
Date: 06/12/15 09:19:58
Modified: src/org/jboss/cache TreeCache.java
Log:
Upgraded to use JGroups anycast
Revision Changes Path
1.293 +3 -44 JBossCache/src/org/jboss/cache/TreeCache.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TreeCache.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCache.java,v
retrieving revision 1.292
retrieving revision 1.293
diff -u -b -r1.292 -r1.293
--- TreeCache.java 14 Dec 2006 17:18:47 -0000 1.292
+++ TreeCache.java 15 Dec 2006 14:19:57 -0000 1.293
@@ -94,7 +94,7 @@
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
* @author Brian Stansberry
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Id: TreeCache.java,v 1.292 2006/12/14 17:18:47 msurtani Exp $
+ * @version $Id: TreeCache.java,v 1.293 2006/12/15 14:19:57 msurtani Exp $
* <p/>
* @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
*/
@@ -1981,15 +1981,7 @@
log.trace("callRemoteMethods(): valid members are " + validMembers + " methods: " + method_call.getArgs()[0]);
}
- // this is a temporary workaround (JBCACHE-813) until AnyCast (JGRP-338) is available.
- if (useTcpWorkaround())
- {
- rsps = multipleUnicast(validMembers, method_call, mode, timeout);
- }
- else
- {
- rsps = disp.callRemoteMethods(validMembers, method_call, mode, timeout);
- }
+ rsps = disp.callRemoteMethods(validMembers, method_call, mode, timeout, buddyManager != null && buddyManager.isEnabled());
// a null response is 99% likely to be due to a marshalling problem - we throw a NSE, this needs to be changed when
// JGroups supports http://jira.jboss.com/jira/browse/JGRP-193
@@ -2034,39 +2026,6 @@
return retval;
}
- boolean useTcpWorkaround()
- {
- return channel.getProtocolStack().findProtocol("UDP") == null;
- }
-
- /**
- * This is a workaround for JBCACHE-813
- */
- private RspList multipleUnicast(List recipients, MethodCall call, int mode, long timeout) throws Exception
- {
- if (recipients == null || recipients.isEmpty()) return null;
-
- Iterator i = recipients.iterator();
- RspList rsps = new RspList();
-
- while (i.hasNext())
- {
- Address recipient = (Address) i.next();
- Object r = null;
- try
- {
- r = disp.callRemoteMethod(recipient, call, mode, timeout);
- }
- catch (Throwable throwable)
- {
- throw new Exception(throwable);
- }
- rsps.addRsp(recipient, r);
- }
- return rsps;
- }
-
-
/**
* @param members
* @param method
@@ -3757,7 +3716,7 @@
{
if (t instanceof CacheException)
{
- throw(CacheException) t;
+ throw (CacheException) t;
}
throw new RuntimeException(t);
}
More information about the jboss-cvs-commits
mailing list