[infinispan-commits] Infinispan SVN: r365 - in trunk/core/src/main/java/org/infinispan: remoting/rpc and 1 other directory.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Mon Jun 1 08:50:30 EDT 2009


Author: mircea.markus
Date: 2009-06-01 08:50:30 -0400 (Mon, 01 Jun 2009)
New Revision: 365

Modified:
   trunk/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java
   trunk/core/src/main/java/org/infinispan/remoting/rpc/RpcManager.java
   trunk/core/src/main/java/org/infinispan/remoting/rpc/RpcManagerImpl.java
Log:
renamed commands (dropped anycast as it is actually a multicast taking place there)

Modified: trunk/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java	2009-06-01 09:57:54 UTC (rev 364)
+++ trunk/core/src/main/java/org/infinispan/interceptors/DistributionInterceptor.java	2009-06-01 12:50:30 UTC (rev 365)
@@ -170,7 +170,7 @@
    public Object visitLockControlCommand(TxInvocationContext ctx, LockControlCommand command) throws Throwable {
       if (ctx.isOriginLocal()) {
          List<Address> recipients = new ArrayList<Address>(ctx.getTransactionParticipants());
-         rpcManager.anycastRpcCommand(recipients, command, true, true);
+         rpcManager.invokeRemotely(recipients, command, true, true);
       }
       return invokeNextInterceptor(ctx, command);
    }
@@ -180,7 +180,7 @@
    public Object visitCommitCommand(TxInvocationContext ctx, CommitCommand command) throws Throwable {
       if (ctx.isOriginLocal()) {
          List<Address> recipients = new ArrayList<Address>(ctx.getTransactionParticipants());
-         rpcManager.anycastRpcCommand(recipients, command, configuration.isSyncCommitPhase(), true);
+         rpcManager.invokeRemotely(recipients, command, configuration.isSyncCommitPhase(), true);
       }
       return invokeNextInterceptor(ctx, command);
    }
@@ -195,7 +195,7 @@
          List<Address> recipients = new ArrayList<Address>(ctx.getTransactionParticipants());
          if (trace) log.trace("Multicasting PrepareCommand to recipients : " + recipients);
          // this method will return immediately if we're the only member (because exclude_self=true)
-         rpcManager.anycastRpcCommand(recipients, command, sync);
+         rpcManager.invokeRemotely(recipients, command, sync);
       }
       return retVal;
    }
@@ -204,7 +204,7 @@
    public Object visitRollbackCommand(TxInvocationContext ctx, RollbackCommand command) throws Throwable {
       if (ctx.isOriginLocal()) {
          List<Address> recipients = new ArrayList<Address>(ctx.getTransactionParticipants());
-         rpcManager.anycastRpcCommand(recipients, command, configuration.isSyncRollbackPhase(), true);
+         rpcManager.invokeRemotely(recipients, command, configuration.isSyncRollbackPhase(), true);
       }
       return invokeNextInterceptor(ctx, command);
    }
@@ -259,10 +259,10 @@
 
                if (useFuture) {
                   if (future == null) future = new NotifyingFutureImpl(returnValue);
-                  rpcManager.anycastRpcCommandInFuture(rec, command, future);
+                  rpcManager.invokeRemotelyInFuture(rec, command, future);
                   return future;
                } else {
-                  rpcManager.anycastRpcCommand(rec, command, sync);
+                  rpcManager.invokeRemotely(rec, command, sync);
                }
             }
          } else {

Modified: trunk/core/src/main/java/org/infinispan/remoting/rpc/RpcManager.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/remoting/rpc/RpcManager.java	2009-06-01 09:57:54 UTC (rev 364)
+++ trunk/core/src/main/java/org/infinispan/remoting/rpc/RpcManager.java	2009-06-01 12:50:30 UTC (rev 365)
@@ -143,7 +143,7 @@
     * @param sync       if true, the transport will operate in sync mode.  Otherwise, it will operate in async mode.
     * @throws ReplicationException in the event of problems
     */
-   void anycastRpcCommand(List<Address> recipients, ReplicableCommand rpc, boolean sync) throws ReplicationException;
+   void invokeRemotely(List<Address> recipients, ReplicableCommand rpc, boolean sync) throws ReplicationException;
 
    /**
     * Broadcasts an RPC command to a specified set of recipients
@@ -155,10 +155,10 @@
     * @param usePriorityQueue if true, a priority queue is used
     * @throws ReplicationException in the event of problems
     */
-   void anycastRpcCommand(List<Address> recipients, ReplicableCommand rpc, boolean sync, boolean usePriorityQueue) throws ReplicationException;
+   void invokeRemotely(List<Address> recipients, ReplicableCommand rpc, boolean sync, boolean usePriorityQueue) throws ReplicationException;
 
    /**
-    * The same as {@link #anycastRpcCommand(java.util.List, org.infinispan.commands.ReplicableCommand, boolean)} except
+    * The same as {@link #invokeRemotely(java.util.List, org.infinispan.commands.ReplicableCommand, boolean)} except
     * that the task is passed to the transport executor and a Future is returned.  The transport always deals with this
     * synchronously.
     *
@@ -166,10 +166,10 @@
     * @param rpc        command to execute remotely
     * @param future     the future which will be passed back to the user
     */
-   void anycastRpcCommandInFuture(List<Address> recipients, ReplicableCommand rpc, NotifyingNotifiableFuture<Object> future);
+   void invokeRemotelyInFuture(List<Address> recipients, ReplicableCommand rpc, NotifyingNotifiableFuture<Object> future);
 
    /**
-    * The same as {@link #anycastRpcCommand(java.util.List, org.infinispan.commands.ReplicableCommand, boolean)} except
+    * The same as {@link #invokeRemotely(java.util.List, org.infinispan.commands.ReplicableCommand, boolean)} except
     * that the task is passed to the transport executor and a Future is returned.  The transport always deals with this
     * synchronously.
     *
@@ -178,7 +178,7 @@
     * @param usePriorityQueue if true, a priority queue is used
     * @param future           the future which will be passed back to the user
     */
-   void anycastRpcCommandInFuture(List<Address> recipients, ReplicableCommand rpc, boolean usePriorityQueue, NotifyingNotifiableFuture<Object> future);
+   void invokeRemotelyInFuture(List<Address> recipients, ReplicableCommand rpc, boolean usePriorityQueue, NotifyingNotifiableFuture<Object> future);
 
    /**
     * @return a reference to the underlying transport.

Modified: trunk/core/src/main/java/org/infinispan/remoting/rpc/RpcManagerImpl.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/remoting/rpc/RpcManagerImpl.java	2009-06-01 09:57:54 UTC (rev 364)
+++ trunk/core/src/main/java/org/infinispan/remoting/rpc/RpcManagerImpl.java	2009-06-01 12:50:30 UTC (rev 365)
@@ -176,7 +176,7 @@
       if (useReplicationQueue(sync)) {
          replicationQueue.add(rpc);
       } else {
-         anycastRpcCommand(null, rpc, sync, usePriorityQueue);
+         invokeRemotely(null, rpc, sync, usePriorityQueue);
       }
    }
 
@@ -185,14 +185,14 @@
    }
 
    public final void broadcastRpcCommandInFuture(ReplicableCommand rpc, boolean usePriorityQueue, NotifyingNotifiableFuture<Object> l) {
-      anycastRpcCommandInFuture(null, rpc, usePriorityQueue, l);
+      invokeRemotelyInFuture(null, rpc, usePriorityQueue, l);
    }
 
-   public final void anycastRpcCommand(List<Address> recipients, ReplicableCommand rpc, boolean sync) throws ReplicationException {
-      anycastRpcCommand(recipients, rpc, sync, false);
+   public final void invokeRemotely(List<Address> recipients, ReplicableCommand rpc, boolean sync) throws ReplicationException {
+      invokeRemotely(recipients, rpc, sync, false);
    }
 
-   public final void anycastRpcCommand(List<Address> recipients, ReplicableCommand rpc, boolean sync, boolean usePriorityQueue) throws ReplicationException {
+   public final void invokeRemotely(List<Address> recipients, ReplicableCommand rpc, boolean sync, boolean usePriorityQueue) throws ReplicationException {
       if (trace) {
          log.trace("Broadcasting call " + rpc + " to recipient list " + recipients);
       }
@@ -219,14 +219,14 @@
       }
    }
 
-   public final void anycastRpcCommandInFuture(List<Address> recipients, ReplicableCommand rpc, NotifyingNotifiableFuture<Object> l) {
-      anycastRpcCommandInFuture(recipients, rpc, false, l);
+   public final void invokeRemotelyInFuture(List<Address> recipients, ReplicableCommand rpc, NotifyingNotifiableFuture<Object> l) {
+      invokeRemotelyInFuture(recipients, rpc, false, l);
    }
 
-   public final void anycastRpcCommandInFuture(final List<Address> recipients, final ReplicableCommand rpc, final boolean usePriorityQueue, final NotifyingNotifiableFuture<Object> l) {
+   public final void invokeRemotelyInFuture(final List<Address> recipients, final ReplicableCommand rpc, final boolean usePriorityQueue, final NotifyingNotifiableFuture<Object> l) {
       Callable<Object> c = new Callable<Object>() {
          public Object call() {
-            anycastRpcCommand(recipients, rpc, true, usePriorityQueue);
+            invokeRemotely(recipients, rpc, true, usePriorityQueue);
             l.notifyDone();
             return null;
          }




More information about the infinispan-commits mailing list