geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [43/63] [abbrv] incubator-geode git commit: Automatically converting calls of vm.invoke to lambdas
Date Fri, 19 Feb 2016 18:37:20 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutionDUnitTest.java
index 899e2bf..7f9d918 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MultiRegionFunctionExecutionDUnitTest.java
@@ -78,10 +78,10 @@ public class MultiRegionFunctionExecutionDUnitTest extends CacheTestCase {
   }
   
   public void testMultiRegionFunctionExecution(){
-    vm0.invoke(MultiRegionFunctionExecutionDUnitTest.class, "createRegionsOnVm0");
-    vm1.invoke(MultiRegionFunctionExecutionDUnitTest.class, "createRegionsOnVm1");
-    vm2.invoke(MultiRegionFunctionExecutionDUnitTest.class, "createRegionsOnVm2");
-    vm3.invoke(MultiRegionFunctionExecutionDUnitTest.class, "createRegionsOnVm3");
+    vm0.invoke(() -> MultiRegionFunctionExecutionDUnitTest.createRegionsOnVm0());
+    vm1.invoke(() -> MultiRegionFunctionExecutionDUnitTest.createRegionsOnVm1());
+    vm2.invoke(() -> MultiRegionFunctionExecutionDUnitTest.createRegionsOnVm2());
+    vm3.invoke(() -> MultiRegionFunctionExecutionDUnitTest.createRegionsOnVm3());
     createRegionsOnUnitControllerVm();
     Set<Region> regions = new HashSet<Region>();
     regions.add(PR1);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
index d33dc47..c5eab0a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerFunctionExecutionNoAckDUnitTest.java
@@ -70,10 +70,8 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
     LogWriterUtils.getLogWriter()
         .info(
             "PRClientServerFunctionExecutionNoAckDUnitTest#testServerFunctionExecution_NoAck : Starting test");
-    client.invoke(PRClientServerFunctionExecutionNoAckDUnitTest.class,
-        "serverExecution", new Object[] { isByName, functionNoAck, functionAck , toRegister});
-    client.invoke(PRClientServerFunctionExecutionNoAckDUnitTest.class,
-        "allServerExecution", new Object[] { isByName, functionNoAck , toRegister});
+    client.invoke(() -> PRClientServerFunctionExecutionNoAckDUnitTest.serverExecution( isByName, functionNoAck, functionAck , toRegister));
+    client.invoke(() -> PRClientServerFunctionExecutionNoAckDUnitTest.allServerExecution( isByName, functionNoAck , toRegister));
   }
 
   public void testServerFunctionExecution_NoAck_WithoutRegister() {
@@ -88,10 +86,8 @@ public class PRClientServerFunctionExecutionNoAckDUnitTest extends PRClientServe
     LogWriterUtils.getLogWriter()
         .info(
             "PRClientServerFunctionExecutionNoAckDUnitTest#testServerFunctionExecution_NoAck : Starting test");
-    client.invoke(PRClientServerFunctionExecutionNoAckDUnitTest.class,
-        "serverExecution", new Object[] { isByName, functionNoAck, functionAck, toRegister });
-    client.invoke(PRClientServerFunctionExecutionNoAckDUnitTest.class,
-        "allServerExecution", new Object[] { isByName, functionNoAck, toRegister });
+    client.invoke(() -> PRClientServerFunctionExecutionNoAckDUnitTest.serverExecution( isByName, functionNoAck, functionAck, toRegister ));
+    client.invoke(() -> PRClientServerFunctionExecutionNoAckDUnitTest.allServerExecution( isByName, functionNoAck, toRegister ));
   }
   
   private void createScenario() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
index be5b082..56abb8c 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionDUnitTest.java
@@ -90,8 +90,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       throws InterruptedException {
     createScenario();
     try {
-      client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-          "executeRegisteredFunction");
+      client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.executeRegisteredFunction());
     }
     catch (Exception e) {
       assertEquals(true, (e.getCause() instanceof ServerOperationException));
@@ -104,8 +103,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     createScenario();
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "executeRegisteredFunction");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.executeRegisteredFunction());
   }
 
   /*
@@ -128,8 +126,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       }
     };
     runOnAllServers(suspect);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverSingleKeyExecution", new Object[] { isByName, toRegister});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecution( isByName, toRegister));
     SerializableRunnable endSuspect = new SerializableRunnable() {
       public void run() {
         cache.getLogger().info("<ExpectedException action=remove>" +
@@ -144,14 +141,12 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
   
   public void testServerSingleKeyExecution_Bug43513_OnRegion() {
     createScenario_SingleConnection();
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverSingleKeyExecutionOnRegion_SingleConnection");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecutionOnRegion_SingleConnection());
   }
   
   public void Bug47584_testServerSingleKeyExecution_Bug43513_OnServer() {
     createScenario_SingleConnection();
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverSingleKeyExecutionOnServer_SingleConnection");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecutionOnServer_SingleConnection());
   }
   
   public void testServerSingleKeyExecution_SendException() {
@@ -160,8 +155,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
     toRegister = new Boolean(true);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverSingleKeyExecution_SendException", new Object[] { isByName, toRegister});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecution_SendException( isByName, toRegister));
   }
   
   public void testServerSingleKeyExecution_ThrowException() {
@@ -170,8 +164,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
     toRegister = new Boolean(true);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverSingleKeyExecution_ThrowException", new Object[] { isByName, toRegister});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecution_ThrowException( isByName, toRegister));
   }
   
   public void testClientWithoutPool_Bug41832() {
@@ -190,8 +183,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       }
     };
     runOnAllServers(suspect);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverSingleKeyExecutionWith2Regions", new Object[] { isByName, toRegister});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecutionWith2Regions( isByName, toRegister));
     SerializableRunnable endSuspect = new SerializableRunnable() {
       public void run() {
         cache.getLogger().info("<ExpectedException action=remove>" +
@@ -216,9 +208,8 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     toRegister = new Boolean(true);
 
     final IgnoredException ex = IgnoredException.addIgnoredException("did not send last result");
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverSingleKeyExecution_NoLastResult", new Object[] { isByName,
-            toRegister });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecution_NoLastResult( isByName,
+            toRegister ));
     ex.remove();
   }
 
@@ -238,8 +229,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       }
     };
     runOnAllServers(suspect);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverSingleKeyExecution", new Object[] { isByName, toRegister});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecution( isByName, toRegister));
     SerializableRunnable endSuspect = new SerializableRunnable() {
       public void run() {
         cache.getLogger().info("<ExpectedException action=remove>" +
@@ -260,8 +250,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
    */
   public void testserverSingleKeyExecution_FunctionInvocationTargetException() {
     createScenario();
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverSingleKeyExecution_FunctionInvocationTargetException");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecution_FunctionInvocationTargetException());
   }
   
   public void testServerSingleKeyExecution_SocketTimeOut() {
@@ -269,8 +258,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     Function function = new TestFunction(true,TestFunction.TEST_FUNCTION_SOCKET_TIMEOUT);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverSingleKeyExecutionSocketTimeOut", new Object[] { isByName});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecutionSocketTimeOut( isByName));
   }
   
   /*
@@ -282,8 +270,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     Function function = new TestFunction(true,TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(false);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverSingleKeyExecution", new Object[] { isByName , toRegister});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecution( isByName , toRegister));
   } 
   
   /*
@@ -292,8 +279,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
    */   
   public void testServerSingleKeyExecution_byInlineFunction() {
     createScenario();
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverSingleKeyExecution_Inline");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverSingleKeyExecution_Inline());
   }
   
   /*
@@ -305,12 +291,10 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     Function function = new TestFunction(true,TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverMultiKeyExecution",
-        new Object[] { isByName});
-    server1.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class, "checkBucketsOnServer");
-    server2.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class, "checkBucketsOnServer");
-    server3.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class, "checkBucketsOnServer");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverMultiKeyExecution( isByName));
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.checkBucketsOnServer());
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.checkBucketsOnServer());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.checkBucketsOnServer());
   }
   
   /*
@@ -325,15 +309,11 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     bucketFilterSet.add(3);
     bucketFilterSet.add(6);
     bucketFilterSet.add(8);
-    client.invoke(PRClientServerTestBase.class,
-        "serverBucketFilterExecution",
-        new Object[]{bucketFilterSet});
+    client.invoke(() -> PRClientServerTestBase.serverBucketFilterExecution(bucketFilterSet));
     bucketFilterSet.clear();
     //Test single filter
     bucketFilterSet.add(7);
-    client.invoke(PRClientServerTestBase.class,
-        "serverBucketFilterExecution",
-        new Object[]{bucketFilterSet});
+    client.invoke(() -> PRClientServerTestBase.serverBucketFilterExecution(bucketFilterSet));
     
   }
   
@@ -351,9 +331,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     keyFilterSet.add(75);
     keyFilterSet.add(25);
     
-    client.invoke(PRClientServerTestBase.class,
-        "serverBucketFilterOverrideExecution",
-        new Object[]{bucketFilterSet, keyFilterSet});   
+    client.invoke(() -> PRClientServerTestBase.serverBucketFilterOverrideExecution(bucketFilterSet, keyFilterSet));   
     
   }
   
@@ -362,9 +340,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     Function function = new TestFunction(true,TestFunction.TEST_FUNCTION_SEND_EXCEPTION);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverMultiKeyExecution_SendException",
-        new Object[] { isByName});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverMultiKeyExecution_SendException( isByName));
   }
   
   public void testserverMultiKeyExecution_ThrowException(){
@@ -372,9 +348,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     Function function = new TestFunction(true,TestFunction.TEST_FUNCTION_THROW_EXCEPTION);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverMultiKeyExecution_ThrowException",
-        new Object[] { isByName});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverMultiKeyExecution_ThrowException( isByName));
   }
   
 
@@ -385,8 +359,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
    */
   public void testserverMultiKeyExecution_byInlineFunction(){
     createScenario();
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverMultiKeyExecution_Inline");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverMultiKeyExecution_Inline());
   }
   
   /*
@@ -397,8 +370,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
    */
   public void testserverMultiKeyExecution_FunctionInvocationTargetException() {
     createScenario();
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverMultiKeyExecution_FunctionInvocationTargetException");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverMultiKeyExecution_FunctionInvocationTargetException());
   }
   
   /*
@@ -410,9 +382,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     Function function = new TestFunction(false,TEST_FUNCTION7);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverMultiKeyExecutionNoResult",
-        new Object[] { isByName});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverMultiKeyExecutionNoResult( isByName));
   }
 
   /*
@@ -424,9 +394,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     Function function = new TestFunction(true,TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(false);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverMultiKeyExecution",
-        new Object[] { isByName});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverMultiKeyExecution( isByName));
   }
   
   /*
@@ -439,8 +407,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     Function function = new TestFunction(true,TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-      "serverMultiKeyExecutionOnASingleBucket", new Object[] { isByName});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverMultiKeyExecutionOnASingleBucket( isByName));
   }
   
   /*
@@ -453,8 +420,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
     Function function = new TestFunction(true,TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(false);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-      "serverMultiKeyExecutionOnASingleBucket", new Object[] { isByName});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverMultiKeyExecutionOnASingleBucket( isByName));
   }
 
 
@@ -1655,8 +1621,7 @@ public class PRClientServerRegionFunctionExecutionDUnitTest extends PRClientServ
       }
     };
     runOnAllServers(suspect);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverBug43430", new Object[] {});
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverBug43430());
     SerializableRunnable endSuspect = new SerializableRunnable() {
       public void run() {
         cache.getLogger().info("<ExpectedException action=remove>" +

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
index 3615ce4..1164543 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
@@ -80,8 +80,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     Function function = new TestFunction(true,
         TestFunction.TEST_FUNCTION_SOCKET_TIMEOUT);
     registerFunctionAtServer(function);
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "serverMultiKeyExecutionSocketTimeOut", new Object[] { new Boolean(true) });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.serverMultiKeyExecutionSocketTimeOut( new Boolean(true) ));
   }
 
   /*
@@ -96,26 +95,17 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     createClientServerScenarion(commonAttributes, 20, 20, 20);
     Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_HA);
     registerFunctionAtServer(function);
-    server2.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "stopServerHA");
-    server3.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "stopServerHA");
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "putOperation");
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.stopServerHA());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.stopServerHA());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.putOperation());
     int AsyncInvocationArrSize = 1;
     AsyncInvocation[] async = new AsyncInvocation[AsyncInvocationArrSize];
-    async[0] = client.invokeAsync(
-        PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "executeFunctionHA");
-    server2.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "startServerHA");
-    server3.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "startServerHA");
-    server1.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "stopServerHA");
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "verifyDeadAndLiveServers", new Object[] { new Integer(1),
-            new Integer(2) });
+    async[0] = client.invokeAsync(() -> PRClientServerRegionFunctionExecutionDUnitTest.executeFunctionHA());
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.startServerHA());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.startServerHA());
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.stopServerHA());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.verifyDeadAndLiveServers( new Integer(1),
+            new Integer(2) ));
     ThreadUtils.join(async[0], 6 * 60 * 1000);
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
@@ -136,26 +126,17 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     createClientServerScenarion(commonAttributes, 20, 20, 20);
     Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_HA);
     registerFunctionAtServer(function);
-    server2.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "stopServerHA");
-    server3.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "stopServerHA");
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "putOperation");
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.stopServerHA());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.stopServerHA());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.putOperation());
     int AsyncInvocationArrSize = 1;
     AsyncInvocation[] async = new AsyncInvocation[AsyncInvocationArrSize];
-    async[0] = client.invokeAsync(
-        PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "executeFunctionHA");
-    server2.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "startServerHA");
-    server3.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "startServerHA");
-    server1.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "closeCacheHA");
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "verifyDeadAndLiveServers", new Object[] { new Integer(1),
-            new Integer(2) });
+    async[0] = client.invokeAsync(() -> PRClientServerRegionFunctionExecutionDUnitTest.executeFunctionHA());
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.startServerHA());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.startServerHA());
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.closeCacheHA());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.verifyDeadAndLiveServers( new Integer(1),
+            new Integer(2) ));
     ThreadUtils.join(async[0], 5 * 60 * 1000);
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
@@ -166,16 +147,11 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
 
   public void testBug40714() {
     createScenario();
-    server1.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "registerFunction");
-    server1.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "registerFunction");
-    server1.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "registerFunction");
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "registerFunction");
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "FunctionExecution_Inline_Bug40714");
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.registerFunction());
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.registerFunction());
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.registerFunction());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.registerFunction());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.FunctionExecution_Inline_Bug40714());
   }
 
   public void testOnRegionFailoverWithTwoServerDownHA()
@@ -183,29 +159,22 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     IgnoredException.addIgnoredException("FunctionInvocationTargetException");
     createScenario();
 
-    server1.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createReplicatedRegion");
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createReplicatedRegion());
 
-    server2.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createReplicatedRegion");
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createReplicatedRegion());
 
-    server3.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createReplicatedRegion");
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createReplicatedRegion());
 
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createProxyRegion",
-        new Object[] { NetworkUtils.getServerHostName(server1.getHost()) });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createProxyRegion( NetworkUtils.getServerHostName(server1.getHost()) ));
 
     Function function = new TestFunction(true,
         TestFunction.TEST_FUNCTION_HA_REGION);
     registerFunctionAtServer(function);
 
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "regionExecutionHATwoServerDown", new Object[] { Boolean.FALSE,
-            function, Boolean.FALSE });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.regionExecutionHATwoServerDown( Boolean.FALSE,
+            function, Boolean.FALSE ));
 
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "verifyMetaData", new Object[] { new Integer(2), new Integer(1) });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.verifyMetaData( new Integer(2), new Integer(1) ));
   }
 
   // retry attempts is 2
@@ -214,29 +183,22 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     IgnoredException.addIgnoredException("FunctionInvocationTargetException");
     createScenario();
 
-    server1.invokeAsync(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createReplicatedRegion");
+    server1.invokeAsync(() -> PRClientServerRegionFunctionExecutionDUnitTest.createReplicatedRegion());
 
-    server2.invokeAsync(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createReplicatedRegion");
+    server2.invokeAsync(() -> PRClientServerRegionFunctionExecutionDUnitTest.createReplicatedRegion());
 
-    server3.invokeAsync(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createReplicatedRegion");
+    server3.invokeAsync(() -> PRClientServerRegionFunctionExecutionDUnitTest.createReplicatedRegion());
 
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createProxyRegion",
-        new Object[] { NetworkUtils.getServerHostName(server1.getHost()) });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createProxyRegion( NetworkUtils.getServerHostName(server1.getHost()) ));
 
     Function function = new TestFunction(true,
         TestFunction.TEST_FUNCTION_HA_REGION);
     registerFunctionAtServer(function);
 
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "regionExecutionHAOneServerDown", new Object[] { Boolean.FALSE,
-            function, Boolean.FALSE });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.regionExecutionHAOneServerDown( Boolean.FALSE,
+            function, Boolean.FALSE ));
 
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "verifyMetaData", new Object[] { new Integer(1), new Integer(1) });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.verifyMetaData( new Integer(1), new Integer(1) ));
   }
 
   /*
@@ -246,28 +208,21 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
   public void testOnRegionFailoverNonHA() throws InterruptedException { // See #47489 before enabling it
     createScenario();
     IgnoredException.addIgnoredException("FunctionInvocationTargetException");
-    server1.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createReplicatedRegion");
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createReplicatedRegion());
 
-    server2.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createReplicatedRegion");
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createReplicatedRegion());
 
-    server3.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createReplicatedRegion");
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createReplicatedRegion());
 
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createProxyRegion",
-        new Object[] { NetworkUtils.getServerHostName(server1.getHost()) });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createProxyRegion( NetworkUtils.getServerHostName(server1.getHost()) ));
 
     Function function = new TestFunction(true,
         TestFunction.TEST_FUNCTION_NONHA_REGION);
     registerFunctionAtServer(function);
 
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "regionSingleKeyExecutionNonHA", new Object[] { Boolean.FALSE,
-            function, Boolean.FALSE });
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "verifyMetaData", new Object[] { new Integer(1), new Integer(0) });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.regionSingleKeyExecutionNonHA( Boolean.FALSE,
+            function, Boolean.FALSE ));
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.verifyMetaData( new Integer(1), new Integer(0) ));
   }
   
   /*
@@ -279,18 +234,13 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
         "TestPartitionedRegion", null, 0, 13, null);
     createClientServerScenarioSingleHop(commonAttributes, 20, 20, 20);
     
-    server1.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createReplicatedRegion");
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createReplicatedRegion());
 
-    server2.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createReplicatedRegion");
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createReplicatedRegion());
 
-    server3.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createReplicatedRegion");
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createReplicatedRegion());
 
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "createProxyRegion",
-        new Object[] { NetworkUtils.getServerHostName(server1.getHost()) });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.createProxyRegion( NetworkUtils.getServerHostName(server1.getHost()) ));
 
     //Make sure the buckets are created.
     client.invoke(new SerializableRunnable() {
@@ -305,9 +255,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     });
     
     //Make sure the client metadata is up to date.
-    client.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "fetchMetaData");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.fetchMetaData());
     
     Function function = new TestFunction(true,
         TestFunction.TEST_FUNCTION_NONHA_REGION);
@@ -316,9 +264,8 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
         TestFunction.TEST_FUNCTION_NONHA_NOP);
     registerFunctionAtServer(function);
 
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "regionSingleKeyExecutionNonHA", new Object[] { Boolean.FALSE,
-            function, Boolean.FALSE });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.regionSingleKeyExecutionNonHA( Boolean.FALSE,
+            function, Boolean.FALSE ));
     
     
     //This validation doesn't work because the client may
@@ -335,8 +282,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
 //      }
 //    });
     
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "verifyMetaData", new Object[] { new Integer(1), new Integer(0) });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.verifyMetaData( new Integer(1), new Integer(0) ));
   }
 
   public void testServerBucketMovedException() throws InterruptedException {
@@ -361,35 +307,21 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     startLocatorInVM(portLocator);
     try {
 
-    Integer port1 = (Integer)server1.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "createServerWithLocator", new Object[] { locator, false,
-            commonAttributes });
-
-    Integer port2 = (Integer)server2.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "createServerWithLocator", new Object[] { locator, false,
-            commonAttributes });
-
-    server4.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "createClientWithLocator", new Object[] { hostLocator, portLocator });
-    server4.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "putIntoRegion");
-
-    server4.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "fetchMetaData");
+    Integer port1 = (Integer)server1.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.createServerWithLocator( locator, false,
+            commonAttributes ));
+
+    Integer port2 = (Integer)server2.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.createServerWithLocator( locator, false,
+            commonAttributes ));
+
+    server4.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.createClientWithLocator( hostLocator, portLocator ));
+    server4.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.putIntoRegion());
+
+    server4.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.fetchMetaData());
     
-    Integer port3 = (Integer)server3.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "createServerWithLocator", new Object[] { locator, false,
-            commonAttributes });
-
-    Object result = server4.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "executeFunction");
+    Integer port3 = (Integer)server3.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.createServerWithLocator( locator, false,
+            commonAttributes ));
+
+    Object result = server4.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.executeFunction());
     List l = (List)result;
     assertEquals(2, l.size());
 
@@ -419,30 +351,18 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
     startLocatorInVM(portLocator);
     try {
 
-    Integer port1 = (Integer)server1.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "createServerWithLocator", new Object[] { locator, false,
-            commonAttributes });
-
-    server4.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "createClientWithLocator", new Object[] { hostLocator, portLocator });
-    server4.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "putIntoRegion");
-
-    server4.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "fetchMetaData");
+    Integer port1 = (Integer)server1.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.createServerWithLocator( locator, false,
+            commonAttributes ));
+
+    server4.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.createClientWithLocator( hostLocator, portLocator ));
+    server4.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.putIntoRegion());
+
+    server4.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.fetchMetaData());
     
-    Integer port2 = (Integer)server2.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "createServerWithLocator", new Object[] { locator, false,
-            commonAttributes });
-
-    Object result = server4.invoke(
-        PRClientServerRegionFunctionExecutionFailoverDUnitTest.class,
-        "executeFunction");
+    Integer port2 = (Integer)server2.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.createServerWithLocator( locator, false,
+            commonAttributes ));
+
+    Object result = server4.invoke(() -> PRClientServerRegionFunctionExecutionFailoverDUnitTest.executeFunction());
     List l = (List)result;
     assertEquals(2, l.size());
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
index f1d354b..005b1b5 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.java
@@ -81,9 +81,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(false);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverAllKeyExecution", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverAllKeyExecution( isByName ));
   }
 
   /*
@@ -91,9 +89,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
    */
   public void testServerGetAllFunction() {
     createScenario();
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "getAll");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.getAll());
   }
 
   /*
@@ -101,9 +97,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
    */
   public void testServerPutAllFunction() {
     createScenario();
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "putAll");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.putAll());
   }
 
   /*
@@ -115,9 +109,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverSingleKeyExecution", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverSingleKeyExecution( isByName ));
   }
 
   /*
@@ -128,9 +120,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
    */
   public void testserverSingleKeyExecution_FunctionInvocationTargetException() {
     createScenario();
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverSingleKeyExecution_FunctionInvocationTargetException");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverSingleKeyExecution_FunctionInvocationTargetException());
   }
   
   /*
@@ -145,15 +135,11 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     bucketFilterSet.add(3);
     bucketFilterSet.add(6);
     bucketFilterSet.add(8);
-    client.invoke(PRClientServerTestBase.class,
-        "serverBucketFilterExecution",
-        new Object[]{bucketFilterSet});
+    client.invoke(() -> PRClientServerTestBase.serverBucketFilterExecution(bucketFilterSet));
     bucketFilterSet.clear();
     //Test single filter
     bucketFilterSet.add(7);
-    client.invoke(PRClientServerTestBase.class,
-        "serverBucketFilterExecution",
-        new Object[]{bucketFilterSet});
+    client.invoke(() -> PRClientServerTestBase.serverBucketFilterExecution(bucketFilterSet));
   }
   
   public void testBucketFilterOverride(){
@@ -170,9 +156,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     keyFilterSet.add(75);
     keyFilterSet.add(25);
     
-    client.invoke(PRClientServerTestBase.class,
-        "serverBucketFilterOverrideExecution",
-        new Object[]{bucketFilterSet, keyFilterSet});   
+    client.invoke(() -> PRClientServerTestBase.serverBucketFilterOverrideExecution(bucketFilterSet, keyFilterSet));   
     
   }
 
@@ -182,9 +166,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
         TestFunction.TEST_FUNCTION_SOCKET_TIMEOUT);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverSingleKeyExecutionSocketTimeOut", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverSingleKeyExecutionSocketTimeOut( isByName ));
   }
 
   /*
@@ -196,9 +178,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(false);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverSingleKeyExecution", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverSingleKeyExecution( isByName ));
   }
 
   /*
@@ -207,9 +187,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
    */
   public void testServerSingleKeyExecution_byInlineFunction() {
     createScenario();
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverSingleKeyExecution_Inline");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverSingleKeyExecution_Inline());
   }
 
   /*
@@ -221,18 +199,10 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecution", new Object[] { isByName });
-    server1.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "checkBucketsOnServer");
-    server2.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "checkBucketsOnServer");
-    server3.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "checkBucketsOnServer");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverMultiKeyExecution( isByName ));
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.checkBucketsOnServer());
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.checkBucketsOnServer());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.checkBucketsOnServer());
   }
 
   public void testserverMultiKeyExecution_SocektTimeOut() {
@@ -241,9 +211,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
         TestFunction.TEST_FUNCTION_SOCKET_TIMEOUT);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecutionSocketTimeOut", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverMultiKeyExecutionSocketTimeOut( isByName ));
   }
 
   /*
@@ -252,9 +220,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
    */
   public void testserverMultiKeyExecution_byInlineFunction() {
     createScenario();
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecution_Inline");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverMultiKeyExecution_Inline());
   }
 
   /*
@@ -265,9 +231,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
    */
   public void testserverMultiKeyExecution_FunctionInvocationTargetException() {
     createScenario();
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecution_FunctionInvocationTargetException");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverMultiKeyExecution_FunctionInvocationTargetException());
   }
 
   /*
@@ -279,9 +243,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     Function function = new TestFunction(false, TEST_FUNCTION7);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecutionNoResult", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverMultiKeyExecutionNoResult( isByName ));
   }
 
   /*
@@ -293,9 +255,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(false);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecution", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverMultiKeyExecution( isByName ));
   }
 
   /*
@@ -308,9 +268,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecutionOnASingleBucket", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverMultiKeyExecutionOnASingleBucket( isByName ));
   }
 
   /*
@@ -323,9 +281,7 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(false);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecutionOnASingleBucket", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.serverMultiKeyExecutionOnASingleBucket( isByName ));
   }
 
   /*
@@ -340,33 +296,18 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     createClientServerScenarion(commonAttributes, 20, 20, 20);
     Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_HA);
     registerFunctionAtServer(function);
-    server2.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "stopServerHA");
-    server3.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "stopServerHA");
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "putOperation");
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.stopServerHA());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.stopServerHA());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.putOperation());
 
     int AsyncInvocationArrSize = 1;
     AsyncInvocation[] async = new AsyncInvocation[AsyncInvocationArrSize];
-    async[0] = client.invokeAsync(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "executeFunctionHA");
-    server2.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "startServerHA");
-    server3.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "startServerHA");
-    server1.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "stopServerHA");
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "verifyDeadAndLiveServers", new Object[] { new Integer(1),
-            new Integer(2) });
+    async[0] = client.invokeAsync(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.executeFunctionHA());
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.startServerHA());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.startServerHA());
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.stopServerHA());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.verifyDeadAndLiveServers( new Integer(1),
+            new Integer(2) ));
     ThreadUtils.join(async[0], 6 * 60 * 1000);
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
@@ -388,33 +329,17 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
     createClientServerScenarion(commonAttributes, 20, 20, 20);
     Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_HA);
     registerFunctionAtServer(function);
-    server2.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "stopServerHA");
-    server3.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "stopServerHA");
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "putOperation");
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.stopServerHA());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.stopServerHA());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.putOperation());
     int AsyncInvocationArrSize = 1;
     AsyncInvocation[] async = new AsyncInvocation[AsyncInvocationArrSize];
-    async[0] = client.invokeAsync(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "executeFunctionHA");
-    server2.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "startServerHA");
-    server3.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "startServerHA");
-    server1.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "closeCacheHA");
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "verifyDeadAndLiveServers", new Object[] { new Integer(1),
-            new Integer(2) });
+    async[0] = client.invokeAsync(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.executeFunctionHA());
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.startServerHA());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.startServerHA());
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.closeCacheHA());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.verifyDeadAndLiveServers( new Integer(1),
+            new Integer(2) ));
     ThreadUtils.join(async[0], 5 * 60 * 1000);
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
@@ -425,20 +350,11 @@ public class PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest extends
 
   public void testBug40714() {
     createScenario();
-    server1.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "registerFunction");
-    server1.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "registerFunction");
-    server1.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "registerFunction");
-    client.invoke(
-        PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.class,
-        "registerFunction");
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "FunctionExecution_Inline_Bug40714");
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.registerFunction());
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.registerFunction());
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.registerFunction());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionNoSingleHopDUnitTest.registerFunction());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.FunctionExecution_Inline_Bug40714());
   }
 
   public static void registerFunction() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
index 8e2d2d4..890841e 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.java
@@ -81,9 +81,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(false);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverAllKeyExecution", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverAllKeyExecution( isByName ));
   }
 
   /*
@@ -91,9 +89,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    */
   public void testServerGetAllFunction() {
     createScenario();
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "getAll");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.getAll());
   }
 
   /*
@@ -101,9 +97,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    */
   public void testServerPutAllFunction() {
     createScenario();
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "putAll");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.putAll());
   }
 
   /*
@@ -115,9 +109,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverSingleKeyExecution", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverSingleKeyExecution( isByName ));
   }
 
   /*
@@ -128,9 +120,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    */
   public void testserverSingleKeyExecution_FunctionInvocationTargetException() {
     createScenario();
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverSingleKeyExecution_FunctionInvocationTargetException");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverSingleKeyExecution_FunctionInvocationTargetException());
   }
 
   public void testServerSingleKeyExecution_SocketTimeOut() {
@@ -139,9 +129,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
         TestFunction.TEST_FUNCTION_SOCKET_TIMEOUT);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverSingleKeyExecutionSocketTimeOut", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverSingleKeyExecutionSocketTimeOut( isByName ));
   }
 
   /*
@@ -153,9 +141,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(false);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverSingleKeyExecution", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverSingleKeyExecution( isByName ));
   }
 
   /*
@@ -164,9 +150,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    */
   public void testServerSingleKeyExecution_byInlineFunction() {
     createScenario();
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverSingleKeyExecution_Inline");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverSingleKeyExecution_Inline());
   }
 
   /*
@@ -178,18 +162,10 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecution", new Object[] { isByName });
-    server1.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "checkBucketsOnServer");
-    server2.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "checkBucketsOnServer");
-    server3.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "checkBucketsOnServer");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverMultiKeyExecution( isByName ));
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.checkBucketsOnServer());
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.checkBucketsOnServer());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.checkBucketsOnServer());
   }
 
   public void testserverMultiKeyExecution_SocektTimeOut() {
@@ -198,9 +174,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
         TestFunction.TEST_FUNCTION_SOCKET_TIMEOUT);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecutionSocketTimeOut", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverMultiKeyExecutionSocketTimeOut( isByName ));
   }
 
   /*
@@ -209,9 +183,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    */
   public void testserverMultiKeyExecution_byInlineFunction() {
     createScenario();
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecution_Inline");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverMultiKeyExecution_Inline());
   }
 
   /*
@@ -222,9 +194,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
    */
   public void testserverMultiKeyExecution_FunctionInvocationTargetException() {
     createScenario();
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecution_FunctionInvocationTargetException");
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverMultiKeyExecution_FunctionInvocationTargetException());
   }
 
   /*
@@ -236,9 +206,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     Function function = new TestFunction(false, TEST_FUNCTION7);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecutionNoResult", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverMultiKeyExecutionNoResult( isByName ));
   }
 
   /*
@@ -250,9 +218,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(false);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecution", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverMultiKeyExecution( isByName ));
   }
 
   /*
@@ -265,9 +231,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(true);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecutionOnASingleBucket", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverMultiKeyExecutionOnASingleBucket( isByName ));
   }
 
   /*
@@ -280,9 +244,7 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     Function function = new TestFunction(true, TEST_FUNCTION2);
     registerFunctionAtServer(function);
     isByName = new Boolean(false);
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "serverMultiKeyExecutionOnASingleBucket", new Object[] { isByName });
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.serverMultiKeyExecutionOnASingleBucket( isByName ));
   }
 
   /*
@@ -301,33 +263,18 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     createClientServerScenarion(commonAttributes, 20, 20, 20);
     Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_HA);
     registerFunctionAtServer(function);
-    server2.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "stopServerHA");
-    server3.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "stopServerHA");
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "putOperation");
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.stopServerHA());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.stopServerHA());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.putOperation());
 
     int AsyncInvocationArrSize = 1;
     AsyncInvocation[] async = new AsyncInvocation[AsyncInvocationArrSize];
-    async[0] = client.invokeAsync(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "executeFunctionHA");
-    server2.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "startServerHA");
-    server3.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "startServerHA");
-    server1.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "stopServerHA");
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "verifyDeadAndLiveServers", new Object[] { new Integer(1),
-            new Integer(2) });
+    async[0] = client.invokeAsync(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.executeFunctionHA());
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.startServerHA());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.startServerHA());
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.stopServerHA());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.verifyDeadAndLiveServers( new Integer(1),
+            new Integer(2) ));
     ThreadUtils.join(async[0], 6 * 60 * 1000);
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
@@ -353,33 +300,17 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
     createClientServerScenarion(commonAttributes, 20, 20, 20);
     Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_HA);
     registerFunctionAtServer(function);
-    server2.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "stopServerHA");
-    server3.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "stopServerHA");
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "putOperation");
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.stopServerHA());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.stopServerHA());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.putOperation());
     int AsyncInvocationArrSize = 1;
     AsyncInvocation[] async = new AsyncInvocation[AsyncInvocationArrSize];
-    async[0] = client.invokeAsync(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "executeFunctionHA");
-    server2.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "startServerHA");
-    server3.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "startServerHA");
-    server1.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "closeCacheHA");
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "verifyDeadAndLiveServers", new Object[] { new Integer(1),
-            new Integer(2) });
+    async[0] = client.invokeAsync(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.executeFunctionHA());
+    server2.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.startServerHA());
+    server3.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.startServerHA());
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.closeCacheHA());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.verifyDeadAndLiveServers( new Integer(1),
+            new Integer(2) ));
     ThreadUtils.join(async[0], 5 * 60 * 1000);
     if (async[0].getException() != null) {
       Assert.fail("UnExpected Exception Occured : ", async[0].getException());
@@ -390,20 +321,11 @@ public class PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest e
 
   public void testBug40714() {
     createScenario();
-    server1.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "registerFunction");
-    server1.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "registerFunction");
-    server1.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "registerFunction");
-    client.invoke(
-        PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.class,
-        "registerFunction");
-    client.invoke(PRClientServerRegionFunctionExecutionDUnitTest.class,
-        "FunctionExecution_Inline_Bug40714");
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.registerFunction());
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.registerFunction());
+    server1.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.registerFunction());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionSelectorNoSingleHopDUnitTest.registerFunction());
+    client.invoke(() -> PRClientServerRegionFunctionExecutionDUnitTest.FunctionExecution_Inline_Bug40714());
   }
 
   public static void registerFunction() {


Mime
View raw message