[jboss-cvs] JBossCache/src/org/jboss/cache/rpc ...

Manik Surtani msurtani at jboss.com
Wed Jul 19 17:34:44 EDT 2006


  User: msurtani
  Date: 06/07/19 17:34:44

  Modified:    src/org/jboss/cache/rpc  RpcTreeCache.java
  Log:
  JBCACHE-657
  JBCACHE-594
  
  Revision  Changes    Path
  1.8       +14 -18    JBossCache/src/org/jboss/cache/rpc/RpcTreeCache.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: RpcTreeCache.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/rpc/RpcTreeCache.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- RpcTreeCache.java	16 May 2006 22:42:27 -0000	1.7
  +++ RpcTreeCache.java	19 Jul 2006 21:34:44 -0000	1.8
  @@ -1,19 +1,19 @@
   package org.jboss.cache.rpc;
   
  +import org.jboss.cache.TreeCache;
  +import org.jboss.cache.config.Configuration;
  +import org.jboss.cache.marshall.MethodCallFactory;
  +import org.jgroups.Address;
  +import org.jgroups.JChannel;
  +import org.jgroups.blocks.MethodCall;
  +
   import java.lang.reflect.Method;
   import java.util.ArrayList;
   import java.util.HashMap;
  -import java.util.Iterator;
   import java.util.List;
   import java.util.Map;
   import java.util.Vector;
   
  -import org.jboss.cache.TreeCache;
  -import org.jboss.cache.marshall.MethodCallFactory;
  -import org.jgroups.Address;
  -import org.jgroups.JChannel;
  -import org.jgroups.blocks.MethodCall;
  -
   /**
    * {@link TreeCache} extension that adds a general purpose RPC functionality
    * to allow clients to make/receive RPC calls over the same JGroups Channel 
  @@ -37,7 +37,7 @@
    * @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
    * @version $Revision$
    */
  -public class RpcTreeCache extends TreeCache implements RpcTreeCacheMBean
  +public class RpcTreeCache extends TreeCache //implements RpcTreeCacheMBean // TODO; Sort out proper JMX interfaces
   {
   
      /** The {@link #_dispatchRpcCall(String, MethodCall)} method */
  @@ -65,7 +65,8 @@
       * and starts it
       */
      public RpcTreeCache(String cluster_name, String props, long state_fetch_timeout) throws Exception {
  -      super(cluster_name, props, state_fetch_timeout);
  +      //super(cluster_name, props, state_fetch_timeout);
  +       // TODO; Use factory to create cache
      }
   
      /**
  @@ -125,17 +126,12 @@
       * <p>
       * If the cache's <code>cache mode</code> is <code>TreeCache.LOCAL</code>
       * and parameter <code>exclude_self</code> is <code>false</code>
  -    * this request will be made directly to {@link #_dispatchRpcCall()}.
  +    * this request will be made directly to
       * </p>
       * 
       * @param serviceName   name of a callback handler that will have been
       *                      registered on the remote end via 
       *                      {@link #registerRPCHandler(String, Object)}.
  -    * @param members       Vector, each of whose members is the Address of one
  -    *                      the nodes in the cache's 
  -    *                      {@link TreeCache#getMembers() member list}.
  -    *                      If <code>null</code>, the method will be invoked on
  -    *                      all members.
       * @param method_call   method call to execute
       * @param synchronous   <code>true</code> if the call should block until
       *                      all members respond (or timeout); <code>false</code>
  @@ -158,7 +154,7 @@
      {
         List responses = null;
         
  -      if (cache_mode == TreeCache.LOCAL)
  +      if (getConfiguration().getCacheModeInt() == Configuration.CacheMode.LOCAL)
         {
            // If cache mode is local, we have no channel
            // so we have to make local calls to our registered handler
  @@ -168,7 +164,7 @@
              // For synchronous calls we have to return something
              responses = new ArrayList();
              
  -           if (exclude_self == false)
  +           if (!exclude_self)
              {
                 // Make the call locally and add a valid response to result list
                 Object resp = _dispatchRpcCall(serviceName, method_call);
  @@ -178,7 +174,7 @@
              // else just return an empty list
              
           }
  -        else if (exclude_self == false)
  +        else if (!exclude_self)
           {
              // Asynchronous, so we don't return anything,
              // but we still want to make the local call
  
  
  



More information about the jboss-cvs-commits mailing list