geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [32/56] [abbrv] incubator-geode git commit: Automatically converting calls of vm.invoke to lambdas
Date Tue, 16 Feb 2016 22:11:52 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
index f122fe6..66b33fa 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
@@ -258,10 +258,10 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
     VM clientVM_2 = host.getVM(2);
     VM clientVM_3 = host.getVM(3);
     
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "setUpServerVMTask");
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "createServerTask");
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.setUpServerVMTask());
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.createServerTask());
     
-    Object array[] = (Object[])serverVM.invoke(InterestRegrListenerDUnitTest.class, "getCacheServerEndPointTask"); 
+    Object array[] = (Object[])serverVM.invoke(() -> InterestRegrListenerDUnitTest.getCacheServerEndPointTask()); 
     String hostName = (String)array[0];
     int port = (Integer) array[1];
     Object params[] = new Object[4];
@@ -283,22 +283,22 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
     
     params = new Object[1];
     params[0] = true;
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "doRegisterListenerTask");
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.doRegisterListenerTask());
     
     clientVM_1.invoke(InterestRegrListenerDUnitTest.class, "doClientRegionRegisterInterestTask", params);
     clientVM_2.invoke(InterestRegrListenerDUnitTest.class, "doClientRegionRegisterInterestTask", params);
     clientVM_3.invoke(InterestRegrListenerDUnitTest.class, "doClientRegionRegisterInterestTask", params);
     
-    clientVM_1.invoke(InterestRegrListenerDUnitTest.class, "doClientRegionPutTask");
-    clientVM_2.invoke(InterestRegrListenerDUnitTest.class, "doClientRegionPutTask");
-    clientVM_3.invoke(InterestRegrListenerDUnitTest.class, "doClientRegionPutTask");
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "doServerRegionPutTask");
+    clientVM_1.invoke(() -> InterestRegrListenerDUnitTest.doClientRegionPutTask());
+    clientVM_2.invoke(() -> InterestRegrListenerDUnitTest.doClientRegionPutTask());
+    clientVM_3.invoke(() -> InterestRegrListenerDUnitTest.doClientRegionPutTask());
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.doServerRegionPutTask());
     
-    clientVM_1.invoke(InterestRegrListenerDUnitTest.class, "closeClientCacheTask", new Object[]{true});
-    clientVM_2.invoke(InterestRegrListenerDUnitTest.class, "closeClientCacheTask", new Object[]{true});
-    clientVM_3.invoke(InterestRegrListenerDUnitTest.class, "closeClientCacheTask", new Object[]{true});
+    clientVM_1.invoke(() -> InterestRegrListenerDUnitTest.closeClientCacheTask(true));
+    clientVM_2.invoke(() -> InterestRegrListenerDUnitTest.closeClientCacheTask(true));
+    clientVM_3.invoke(() -> InterestRegrListenerDUnitTest.closeClientCacheTask(true));
     Thread.sleep(2);
-    Map<String,Integer> listnerMap = (Map<String, Integer>) serverVM.invoke(InterestRegrListenerDUnitTest.class, "getListenerMapTask");
+    Map<String,Integer> listnerMap = (Map<String, Integer>) serverVM.invoke(() -> InterestRegrListenerDUnitTest.getListenerMapTask());
     LogWriterUtils.getLogWriter().info("Listener Map " + listnerMap);
     int registerCount = getMapValueForKey(listnerMap,REGISTER_INTEREST);
     int unregisterCount = getMapValueForKey(listnerMap,UNREGISTER_INTEREST);
@@ -306,13 +306,13 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
     assertEquals(0, unregisterCount);
     LogWriterUtils.getLogWriter().info("Sleeping till durable client queue are expired and unregister event is called on to listener");
     Thread.sleep((DURABLE_CLIENT_TIMEOUT+5)*1000);    
-    listnerMap = (Map<String, Integer>) serverVM.invoke(InterestRegrListenerDUnitTest.class, "getListenerMapTask");
+    listnerMap = (Map<String, Integer>) serverVM.invoke(() -> InterestRegrListenerDUnitTest.getListenerMapTask());
     LogWriterUtils.getLogWriter().info("Listener Map after sleeping " + listnerMap);
     registerCount = getMapValueForKey(listnerMap,REGISTER_INTEREST);
     unregisterCount = getMapValueForKey(listnerMap,UNREGISTER_INTEREST);
     assertEquals(3, registerCount);
     assertEquals(3, unregisterCount);
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "closeCacheTask");    
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.closeCacheTask());    
   }
   
   
@@ -323,10 +323,10 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
     VM clientVM_2 = host.getVM(2);
     VM clientVM_3 = host.getVM(3);
     
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "setUpServerVMTask");
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "createServerTask");
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.setUpServerVMTask());
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.createServerTask());
     
-    Object array[] = (Object[])serverVM.invoke(InterestRegrListenerDUnitTest.class, "getCacheServerEndPointTask"); 
+    Object array[] = (Object[])serverVM.invoke(() -> InterestRegrListenerDUnitTest.getCacheServerEndPointTask()); 
     String hostName = (String)array[0];
     int port = (Integer) array[1];
     Object params[] = new Object[4];
@@ -348,19 +348,19 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
     
     params = new Object[1];
     params[0] = true;
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "doRegisterListenerTask");
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.doRegisterListenerTask());
     serverVM.invoke(InterestRegrListenerDUnitTest.class, "doExpressInterestOnServerTask", params);
     
-    clientVM_1.invoke(InterestRegrListenerDUnitTest.class, "doClientRegionPutTask");
-    clientVM_2.invoke(InterestRegrListenerDUnitTest.class, "doClientRegionPutTask");
-    clientVM_3.invoke(InterestRegrListenerDUnitTest.class, "doClientRegionPutTask");
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "doServerRegionPutTask");
+    clientVM_1.invoke(() -> InterestRegrListenerDUnitTest.doClientRegionPutTask());
+    clientVM_2.invoke(() -> InterestRegrListenerDUnitTest.doClientRegionPutTask());
+    clientVM_3.invoke(() -> InterestRegrListenerDUnitTest.doClientRegionPutTask());
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.doServerRegionPutTask());
     
-    clientVM_1.invoke(InterestRegrListenerDUnitTest.class, "closeClientCacheTask", new Object[]{true});
-    clientVM_2.invoke(InterestRegrListenerDUnitTest.class, "closeClientCacheTask", new Object[]{true});
-    clientVM_3.invoke(InterestRegrListenerDUnitTest.class, "closeClientCacheTask", new Object[]{true});
+    clientVM_1.invoke(() -> InterestRegrListenerDUnitTest.closeClientCacheTask(true));
+    clientVM_2.invoke(() -> InterestRegrListenerDUnitTest.closeClientCacheTask(true));
+    clientVM_3.invoke(() -> InterestRegrListenerDUnitTest.closeClientCacheTask(true));
     Thread.sleep(2);
-    Map<String,Integer> listnerMap = (Map<String, Integer>) serverVM.invoke(InterestRegrListenerDUnitTest.class, "getListenerMapTask");
+    Map<String,Integer> listnerMap = (Map<String, Integer>) serverVM.invoke(() -> InterestRegrListenerDUnitTest.getListenerMapTask());
     LogWriterUtils.getLogWriter().info("Listener Map " + listnerMap);
     int registerCount = getMapValueForKey(listnerMap,REGISTER_INTEREST);
     int unregisterCount = getMapValueForKey(listnerMap,UNREGISTER_INTEREST);
@@ -368,13 +368,13 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
     assertEquals(0, unregisterCount);
     LogWriterUtils.getLogWriter().info("Sleeping till durable client queue are expired and unregister event is called on to listener");
     Thread.sleep((DURABLE_CLIENT_TIMEOUT+5)*1000);    
-    listnerMap = (Map<String, Integer>) serverVM.invoke(InterestRegrListenerDUnitTest.class, "getListenerMapTask");
+    listnerMap = (Map<String, Integer>) serverVM.invoke(() -> InterestRegrListenerDUnitTest.getListenerMapTask());
     LogWriterUtils.getLogWriter().info("Listener Map after sleeping " + listnerMap);
     registerCount = getMapValueForKey(listnerMap,REGISTER_INTEREST);
     unregisterCount = getMapValueForKey(listnerMap,UNREGISTER_INTEREST);
     assertEquals(3, registerCount);
     assertEquals(3, unregisterCount);
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "closeCacheTask");
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.closeCacheTask());
     
   }
   
@@ -387,10 +387,10 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
     final VM clientVM_2 = host.getVM(2);
     final VM clientVM_3 = host.getVM(3);
     
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "setUpServerVMTask");
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "createServerTask");
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.setUpServerVMTask());
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.createServerTask());
     
-    Object array[] = (Object[])serverVM.invoke(InterestRegrListenerDUnitTest.class, "getCacheServerEndPointTask"); 
+    Object array[] = (Object[])serverVM.invoke(() -> InterestRegrListenerDUnitTest.getCacheServerEndPointTask()); 
     String hostName = (String)array[0];
     int port = (Integer) array[1];
     Object params[] = new Object[4];
@@ -413,17 +413,17 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
     params = new Object[1];
     params[0] = false; //non-durable interest    
     
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "doRegisterListenerTask");
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.doRegisterListenerTask());
     serverVM.invoke(InterestRegrListenerDUnitTest.class, "doExpressInterestOnServerTask", params);
     
-    clientVM_1.invoke(InterestRegrListenerDUnitTest.class, "doClientRegionPutTask");
-    clientVM_2.invoke(InterestRegrListenerDUnitTest.class, "doClientRegionPutTask");
-    clientVM_3.invoke(InterestRegrListenerDUnitTest.class, "doClientRegionPutTask");
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "doServerRegionPutTask");
+    clientVM_1.invoke(() -> InterestRegrListenerDUnitTest.doClientRegionPutTask());
+    clientVM_2.invoke(() -> InterestRegrListenerDUnitTest.doClientRegionPutTask());
+    clientVM_3.invoke(() -> InterestRegrListenerDUnitTest.doClientRegionPutTask());
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.doServerRegionPutTask());
     
-    clientVM_1.invoke(InterestRegrListenerDUnitTest.class, "closeClientCacheTask", new Object[]{false});
-    clientVM_2.invoke(InterestRegrListenerDUnitTest.class, "closeClientCacheTask", new Object[]{false});
-    clientVM_3.invoke(InterestRegrListenerDUnitTest.class, "closeClientCacheTask", new Object[]{false});
+    clientVM_1.invoke(() -> InterestRegrListenerDUnitTest.closeClientCacheTask(false));
+    clientVM_2.invoke(() -> InterestRegrListenerDUnitTest.closeClientCacheTask(false));
+    clientVM_3.invoke(() -> InterestRegrListenerDUnitTest.closeClientCacheTask(false));
     
     Thread.sleep(2);
     
@@ -433,7 +433,7 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
       
       @Override
       public boolean done() {
-        Map<String,Integer> listnerMap = (Map<String, Integer>) serverVM.invoke(InterestRegrListenerDUnitTest.class, "getListenerMapTask");
+        Map<String,Integer> listnerMap = (Map<String, Integer>) serverVM.invoke(() -> InterestRegrListenerDUnitTest.getListenerMapTask());
         LogWriterUtils.getLogWriter().info("Listener Map " + listnerMap);
         registerCount = getMapValueForKey(listnerMap,REGISTER_INTEREST);
         unregisterCount = getMapValueForKey(listnerMap,UNREGISTER_INTEREST);
@@ -454,7 +454,7 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
     
     LogWriterUtils.getLogWriter().info("Sleeping till durable client queue are expired and unregister event is called on to listener");
     Thread.sleep((DURABLE_CLIENT_TIMEOUT+5)*1000);
-    serverVM.invoke(InterestRegrListenerDUnitTest.class, "closeCacheTask");
+    serverVM.invoke(() -> InterestRegrListenerDUnitTest.closeCacheTask());
   }
   
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java
index 597da3d..c456483 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java
@@ -86,8 +86,8 @@ public class InterestResultPolicyDUnitTest extends DistributedTestCase
     final Host host = Host.getHost(0);
     vm0 = host.getVM(0);
     vm1 = host.getVM(1);
-    PORT =  ((Integer)vm0.invoke(InterestResultPolicyDUnitTest.class, "createServerCache" )).intValue();
-    vm0.invoke(InterestResultPolicyDUnitTest.class, "populateServerCache");
+    PORT =  ((Integer)vm0.invoke(() -> InterestResultPolicyDUnitTest.createServerCache())).intValue();
+    vm0.invoke(() -> InterestResultPolicyDUnitTest.populateServerCache());
   }
 
   /**
@@ -99,9 +99,9 @@ public class InterestResultPolicyDUnitTest extends DistributedTestCase
     this.expectedEx = IgnoredException.addIgnoredException(ServerConnectivityException.class
         .getName());
     // close server
-    vm0.invoke(InterestResultPolicyDUnitTest.class, "closeCache");
+    vm0.invoke(() -> InterestResultPolicyDUnitTest.closeCache());
     // close client
-    vm1.invoke(InterestResultPolicyDUnitTest.class, "closeCache");
+    vm1.invoke(() -> InterestResultPolicyDUnitTest.closeCache());
   }
 
   @Override
@@ -126,8 +126,8 @@ public class InterestResultPolicyDUnitTest extends DistributedTestCase
     Object[] objArr = new Object[2];
     objArr[0] = InterestResultPolicy.NONE;
     objArr[1] = new Integer(PREPOPULATED_ENTRIES);
-    vm1.invoke(InterestResultPolicyDUnitTest.class, "createClientCache", new Object[] {
-      NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT)});
+    vm1.invoke(() -> InterestResultPolicyDUnitTest.createClientCache(
+      NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT)));
     vm1.invoke(InterestResultPolicyDUnitTest.class, "registerInterest", objArr);
     vm1.invoke(InterestResultPolicyDUnitTest.class, "verifyResult", objArr);
     logger.fine("testPolicyNone END");
@@ -148,8 +148,8 @@ public class InterestResultPolicyDUnitTest extends DistributedTestCase
     Object[] objArr = new Object[2];
     objArr[0] = InterestResultPolicy.KEYS;
     objArr[1] = new Integer(PREPOPULATED_ENTRIES);
-    vm1.invoke(InterestResultPolicyDUnitTest.class, "createClientCache", new Object[] {
-      NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT)});;
+    vm1.invoke(() -> InterestResultPolicyDUnitTest.createClientCache(
+      NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT)));;
     vm1.invoke(InterestResultPolicyDUnitTest.class, "registerInterest", objArr);
     vm1.invoke(InterestResultPolicyDUnitTest.class, "verifyResult", objArr);
     logger.fine("testPolicyKeys END");
@@ -170,8 +170,8 @@ public class InterestResultPolicyDUnitTest extends DistributedTestCase
     Object[] objArr = new Object[2];
     objArr[0] = InterestResultPolicy.KEYS_VALUES;
     objArr[1] = new Integer(PREPOPULATED_ENTRIES);
-    vm1.invoke(InterestResultPolicyDUnitTest.class, "createClientCache", new Object[] {
-      NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT)});
+    vm1.invoke(() -> InterestResultPolicyDUnitTest.createClientCache(
+      NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT)));
     vm1.invoke(InterestResultPolicyDUnitTest.class, "registerInterest", objArr);
     vm1.invoke(InterestResultPolicyDUnitTest.class, "verifyResult", objArr);
     logger.fine("testPolicyKeyValues END");
@@ -195,12 +195,11 @@ public class InterestResultPolicyDUnitTest extends DistributedTestCase
     objArr[0] = InterestResultPolicy.KEYS;
     /* registering for 5 extra keys */
     objArr[1] = new Integer(PREPOPULATED_ENTRIES + 5);
-    vm1.invoke(InterestResultPolicyDUnitTest.class, "createClientCache", new Object[] {
-      NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT)});
+    vm1.invoke(() -> InterestResultPolicyDUnitTest.createClientCache(
+      NetworkUtils.getServerHostName(Host.getHost(0)), new Integer(PORT)));
     vm1.invoke(InterestResultPolicyDUnitTest.class, "registerInterest", objArr);
     vm1.invoke(InterestResultPolicyDUnitTest.class, "verifyResult", objArr);
-    Integer cnt = (Integer)vm0.invoke(InterestResultPolicyDUnitTest.class,
-        "getEntryCount");
+    Integer cnt = (Integer)vm0.invoke(() -> InterestResultPolicyDUnitTest.getEntryCount());
     assertEquals(cnt.intValue(), PREPOPULATED_ENTRIES);
     logger.fine("testBug35358 END");
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/NewRegionAttributesDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/NewRegionAttributesDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/NewRegionAttributesDUnitTest.java
index 97bef89..1a952c8 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/NewRegionAttributesDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/NewRegionAttributesDUnitTest.java
@@ -101,8 +101,8 @@ public class NewRegionAttributesDUnitTest extends DistributedTestCase
    */
   @Override
   protected final void preTearDown() throws Exception {
-    vm0.invoke(NewRegionAttributesDUnitTest.class, "closeCache");
-    vm1.invoke(NewRegionAttributesDUnitTest.class, "closeCache");
+    vm0.invoke(() -> NewRegionAttributesDUnitTest.closeCache());
+    vm1.invoke(() -> NewRegionAttributesDUnitTest.closeCache());
   }
 
   /**
@@ -186,18 +186,16 @@ public class NewRegionAttributesDUnitTest extends DistributedTestCase
    */
   public void testEntryOperationsWithNewAttributesEnabled()
   {
-    vm0.invoke(NewRegionAttributesDUnitTest.class, "checkAttributes");
-    vm1.invoke(NewRegionAttributesDUnitTest.class, "checkAttributes");
-    vm0.invoke(NewRegionAttributesDUnitTest.class, "doPuts");
-    Integer cnt1 = (Integer)vm1.invoke(NewRegionAttributesDUnitTest.class,
-        "getEntryCount");
+    vm0.invoke(() -> NewRegionAttributesDUnitTest.checkAttributes());
+    vm1.invoke(() -> NewRegionAttributesDUnitTest.checkAttributes());
+    vm0.invoke(() -> NewRegionAttributesDUnitTest.doPuts());
+    Integer cnt1 = (Integer)vm1.invoke(() -> NewRegionAttributesDUnitTest.getEntryCount());
     assertEquals(TOTAL_PUTS, cnt1.intValue());
-    vm0.invoke(NewRegionAttributesDUnitTest.class, "doPuts");
-    vm0.invoke(NewRegionAttributesDUnitTest.class, "doInvalidates");
-    vm0.invoke(NewRegionAttributesDUnitTest.class, "doDestroy");
+    vm0.invoke(() -> NewRegionAttributesDUnitTest.doPuts());
+    vm0.invoke(() -> NewRegionAttributesDUnitTest.doInvalidates());
+    vm0.invoke(() -> NewRegionAttributesDUnitTest.doDestroy());
 
-    Integer cnt2 = (Integer)vm1.invoke(NewRegionAttributesDUnitTest.class,
-        "getEntryCount");
+    Integer cnt2 = (Integer)vm1.invoke(() -> NewRegionAttributesDUnitTest.getEntryCount());
     assertEquals(0, cnt2.intValue());
   }
 
@@ -208,9 +206,9 @@ public class NewRegionAttributesDUnitTest extends DistributedTestCase
    */
   public void testRegisterInterestUseCases()
   {
-    vm1.invoke(NewRegionAttributesDUnitTest.class, "registerInterest");
-    vm1.invoke(NewRegionAttributesDUnitTest.class, "unregisterInterest");
-    vm1.invoke(NewRegionAttributesDUnitTest.class, "getInterestForRegion");
+    vm1.invoke(() -> NewRegionAttributesDUnitTest.registerInterest());
+    vm1.invoke(() -> NewRegionAttributesDUnitTest.unregisterInterest());
+    vm1.invoke(() -> NewRegionAttributesDUnitTest.getInterestForRegion());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart1DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart1DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart1DUnitTest.java
index 704a82a..004dacb 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart1DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart1DUnitTest.java
@@ -62,7 +62,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
     try {
       createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), PORT1, PORT2, PORT3, PORT4, 0);
       verifyOrderOfEndpoints();
-      server2.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       //pause(5000);      
       verifyLiveAndRedundantServers(3, 0);
       verifyOrderOfEndpoints();
@@ -111,7 +111,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), PORT1, PORT2, PORT3, PORT4, 0, 3000, 100);
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       verifyOrderOfEndpoints();
-      server0.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       verifyLiveAndRedundantServers(3, 0);
       verifyOrderOfEndpoints();
@@ -156,7 +156,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER2));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server2.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       //pause(5000);
       verifyDeadServers(1);
       verifyRedundantServersContain(SERVER2);
@@ -196,7 +196,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER4));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server2.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       verifyDeadServers(1);
       verifyRedundantServersContain(SERVER4);
@@ -233,7 +233,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER4));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server2.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       createEntriesK1andK2();
       registerK1AndK2();
@@ -273,7 +273,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER4));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server2.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       unregisterInterest();
       verifyDeadServers(1);
@@ -311,7 +311,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER2));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server2.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       doPuts();
       verifyDeadServers(1);
@@ -350,7 +350,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER2));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server1.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       //pause(5000);
       verifyDeadServers(1);
       verifyRedundantServersContain(SERVER3);
@@ -359,8 +359,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       //      assertTrue(pool.getRedundantNames()
       //          .contains(SERVER1));
       verifyOrderOfEndpoints();
-      server2.invoke(RedundancyLevelTestBase.class,
-          "verifyInterestRegistration");
+      server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       //assertEquals(3, pool.getConnectedServerCount());
       //assertEquals(1, proxy.getDeadServers().size());
     }
@@ -391,7 +390,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER2));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server1.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       verifyDeadServers(1);
       verifyRedundantServersContain(SERVER3);
@@ -400,8 +399,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
       verifyOrderOfEndpoints();
-      server2.invoke(RedundancyLevelTestBase.class,
-          "verifyInterestRegistration");
+      server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       // assertEquals(3, pool.getConnectedServerCount());
       //assertEquals(1, proxy.getDeadServers().size());
     }
@@ -430,7 +428,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER2));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server1.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       createEntriesK1andK2();
       registerK1AndK2();
@@ -441,8 +439,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
       verifyOrderOfEndpoints();
-      server2.invoke(RedundancyLevelTestBase.class,
-          "verifyInterestRegistration");
+      server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       // assertEquals(3, pool.getConnectedServerCount());
       //assertEquals(1, proxy.getDeadServers().size());
     }
@@ -471,7 +468,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER2));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server1.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       unregisterInterest();
       verifyDeadServers(1);
@@ -511,7 +508,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER2));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server1.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       doPuts();
       System.out.println("server1="+SERVER1);
@@ -525,8 +522,7 @@ public class RedundancyLevelPart1DUnitTest extends RedundancyLevelTestBase
       // assertTrue(pool.getRedundantNames()
       // .contains(SERVER1));
       verifyOrderOfEndpoints();
-      server2.invoke(RedundancyLevelTestBase.class,
-          "verifyInterestRegistration");
+      server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       // assertEquals(3, pool.getConnectedServerCount());
       //assertEquals(1, proxy.getDeadServers().size());
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart2DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart2DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart2DUnitTest.java
index 6f31d3b..4692699 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart2DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart2DUnitTest.java
@@ -69,7 +69,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
 
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server0.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       //pause(5000);
       verifyDeadServers(1);
       verifyRedundantServersContain(SERVER3);
@@ -110,7 +110,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER2));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server0.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       verifyDeadServers(1);
       verifyRedundantServersContain(SERVER3);
@@ -149,7 +149,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER2));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server0.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       createEntriesK1andK2();
       registerK1AndK2();
@@ -190,7 +190,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER2));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server0.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       unregisterInterest();
       verifyDeadServers(1);
@@ -230,7 +230,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER2));
       //assertEquals(0, proxy.getDeadServers().size());
       verifyOrderOfEndpoints();
-      server0.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       // pause(5000);
       doPuts();
       verifyDeadServers(1);
@@ -268,19 +268,17 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertFalse(pool.getRedundantNames().contains(SERVER3));
       assertFalse(pool.getRedundantNames().contains(SERVER4));
       verifyOrderOfEndpoints();
-      server0.invoke(RedundancyLevelTestBase.class, "stopServer");
-      server1.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server0.invoke(() -> RedundancyLevelTestBase.stopServer());
+      server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       //pause(5000);
       verifyLiveAndRedundantServers(2, 1);
       verifyOrderOfEndpoints();
       //assertEquals(2, pool.getRedundantNames().size());
       //Not Sure
       //assertTrue(pool.getPrimaryName().equals(SERVER2));
-      server2.invoke(RedundancyLevelTestBase.class,
-          "verifyInterestRegistration");
+      server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       //assertTrue(pool.getRedundantNames().contains(SERVER3));
-      server3.invoke(RedundancyLevelTestBase.class,
-          "verifyInterestRegistration");
+      server3.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -310,8 +308,8 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertFalse(pool.getRedundantNames().contains(SERVER4));
       // kill non primary EPs
       verifyOrderOfEndpoints();
-      server1.invoke(RedundancyLevelTestBase.class, "stopServer");
-      server2.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server1.invoke(() -> RedundancyLevelTestBase.stopServer());
+      server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       verifyDeadServers(2);
       //assertEquals(2, pool.getConnectedServerCount());
       //assertEquals(2, proxy.getDeadServers().size());
@@ -320,7 +318,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       verifyOrderOfEndpoints();
       //assertEquals(2, pool.getRedundantNames().size());      
       // bring up one server.
-      server1.invoke(RedundancyLevelTestBase.class, "startServer");
+      server1.invoke(() -> RedundancyLevelTestBase.startServer());
       //pause(10000);
       verifyLiveAndRedundantServers(3, 2);
       verifyOrderOfEndpoints();
@@ -329,17 +327,16 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       verifyRedundantServersContain(SERVER2);
       verifyRedundantServersContain(SERVER4);
-      server1.invoke(RedundancyLevelTestBase.class,
-          "verifyInterestRegistration");
+      server1.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       // bring up another server should get added to live server map only and
       // not to the active server as redundancy level is satisfied.
-      server2.invoke(RedundancyLevelTestBase.class, "startServer");
+      server2.invoke(() -> RedundancyLevelTestBase.startServer());
       //pause(10000);
       Wait.pause(1000);
       verifyOrderOfEndpoints();
       //assertEquals(3, pool.getRedundantNames().size());
       //assertEquals(4, pool.getConnectedServerCount());
-      server2.invoke(RedundancyLevelTestBase.class, "verifyNoCCP");
+      server2.invoke(() -> RedundancyLevelTestBase.verifyNoCCP());
     }
     catch (Exception ex) {
       Assert.fail(
@@ -357,8 +354,8 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
   {
     try {
       // stop two secondaries
-      server2.invoke(RedundancyLevelTestBase.class, "stopServer");
-      server1.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server2.invoke(() -> RedundancyLevelTestBase.stopServer());
+      server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       // make sure that the client connects to only two servers and
       // redundancyLevel
       // unsatisfied with one
@@ -374,7 +371,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertFalse(pool.getRedundantNames().contains(SERVER3));
       assertFalse(pool.getRedundantNames().contains(SERVER2));
       // start server
-      server2.invoke(RedundancyLevelTestBase.class, "startServer");
+      server2.invoke(() -> RedundancyLevelTestBase.startServer());
       //pause(10000);
       verifyLiveAndRedundantServers(3, 2);
       verifyOrderOfEndpoints();
@@ -384,10 +381,9 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER3));
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertFalse(pool.getRedundantNames().contains(SERVER2));
-      server2.invoke(RedundancyLevelTestBase.class,
-          "verifyInterestRegistration");
+      server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       // verify that redundancy level is satisfied
-      server1.invoke(RedundancyLevelTestBase.class, "startServer");
+      server1.invoke(() -> RedundancyLevelTestBase.startServer());
       //pause(10000);
       Wait.pause(1000);
       verifyOrderOfEndpoints();
@@ -397,7 +393,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER3));
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertFalse(pool.getRedundantNames().contains(SERVER2));
-      server1.invoke(RedundancyLevelTestBase.class, "verifyNoCCP");
+      server1.invoke(() -> RedundancyLevelTestBase.verifyNoCCP());
 
     }
     catch (Exception ex) {
@@ -416,7 +412,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
   {
     try {
       // TODO: Yogesh
-      server1.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), PORT1, PORT2, PORT3, PORT4, 2);
       // let the client connect to servers
       //pause(10000);      
@@ -429,7 +425,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertFalse(pool.getRedundantNames().contains(SERVER2));
       // start server
-      server1.invoke(RedundancyLevelTestBase.class, "startServer");
+      server1.invoke(() -> RedundancyLevelTestBase.startServer());
       Wait.pause(1000);
       verifyOrderOfEndpoints();
       //assertEquals(3, pool.getRedundantNames().size());
@@ -438,7 +434,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER4));
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertFalse(pool.getRedundantNames().contains(SERVER2));
-      server1.invoke(RedundancyLevelTestBase.class, "verifyNoCCP");
+      server1.invoke(() -> RedundancyLevelTestBase.verifyNoCCP());
 
     }
     catch (Exception ex) {
@@ -456,7 +452,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
   {
     try {
       // TODO: Yogesh
-      server2.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), PORT1, PORT2, PORT3, PORT4, -1/* not specified */);
       // let the client connect to servers
       //pause(10000);
@@ -470,7 +466,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getPrimaryName().equals(SERVER1));
       assertTrue(pool.getRedundantNames().contains(SERVER4));
       // start server
-      server2.invoke(RedundancyLevelTestBase.class, "startServer");
+      server2.invoke(() -> RedundancyLevelTestBase.startServer());
       //pause(10000);
       verifyLiveAndRedundantServers(4, 3);
       verifyOrderOfEndpoints();
@@ -482,8 +478,7 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
       assertTrue(pool.getRedundantNames().contains(SERVER3));
       assertTrue(pool.getRedundantNames().contains(SERVER4));
       assertTrue(pool.getPrimaryName().equals(SERVER1));
-      server2.invoke(RedundancyLevelTestBase.class,
-          "verifyInterestRegistration");
+      server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
     }
     catch (Exception ex) {
       Assert.fail("test failed due to exception in test noRedundancyLevelServerFail ",
@@ -524,10 +519,10 @@ public class RedundancyLevelPart2DUnitTest extends RedundancyLevelTestBase
     try {
       createClientCache(NetworkUtils.getServerHostName(Host.getHost(0)), PORT1, PORT2, PORT3, PORT4, 5);
       assertEquals(3, pool.getRedundantNames().size());
-      server0.invoke(RedundancyLevelTestBase.class, "verifyCCP");
-      server1.invoke(RedundancyLevelTestBase.class, "verifyCCP");
-      server2.invoke(RedundancyLevelTestBase.class, "verifyCCP");
-      server3.invoke(RedundancyLevelTestBase.class, "verifyCCP");
+      server0.invoke(() -> RedundancyLevelTestBase.verifyCCP());
+      server1.invoke(() -> RedundancyLevelTestBase.verifyCCP());
+      server2.invoke(() -> RedundancyLevelTestBase.verifyCCP());
+      server3.invoke(() -> RedundancyLevelTestBase.verifyCCP());
     }
     catch (Exception ex) {
       ex.printStackTrace();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart3DUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart3DUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart3DUnitTest.java
index ac5d8b7..20329d4 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart3DUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelPart3DUnitTest.java
@@ -56,14 +56,14 @@ public class RedundancyLevelPart3DUnitTest extends RedundancyLevelTestBase
       createEntriesK1andK2();
       registerK1AndK2();
       assertEquals(3, pool.getRedundantNames().size());
-      server0.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server1.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsNotAlive");
-      server2.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsNotAlive");
-      server3.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsNotAlive");
-      server0.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
-      server1.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
-      server2.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
-      server3.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
+      server0.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server1.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsNotAlive());
+      server2.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsNotAlive());
+      server3.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsNotAlive());
+      server0.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
+      server1.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
+      server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
+      server3.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       PoolImpl.BEFORE_REGISTER_CALLBACK_FLAG = true;
       PoolImpl.BEFORE_PRIMARY_IDENTIFICATION_FROM_BACKUP_CALLBACK_FLAG = true;
       PoolImpl.BEFORE_RECOVER_INTEREST_CALLBACK_FLAG = true;
@@ -84,11 +84,11 @@ public class RedundancyLevelPart3DUnitTest extends RedundancyLevelTestBase
           makePrimaryCalled = true;
         }
       });
-      server0.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       doPuts();
-      server1.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server2.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsNotAlive");
-      server3.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsNotAlive");
+      server1.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server2.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsNotAlive());
+      server3.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsNotAlive());
       verifyLiveAndRedundantServers(3, 2);
       if(registerInterestCalled){
         fail("register interest should not have been called since we failed to a redundant server !");
@@ -98,10 +98,10 @@ public class RedundancyLevelPart3DUnitTest extends RedundancyLevelTestBase
       }
       assertEquals(2, pool.getRedundantNames().size());
       makePrimaryCalled = false;
-      server1.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       doPuts();
-      server2.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server3.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsNotAlive");
+      server2.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server3.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsNotAlive());
       verifyLiveAndRedundantServers(2, 1);
       if(registerInterestCalled){
         fail("register interest should not have been called since we failed to a redundant server !");
@@ -111,9 +111,9 @@ public class RedundancyLevelPart3DUnitTest extends RedundancyLevelTestBase
       }
       assertEquals(1, pool.getRedundantNames().size());
       makePrimaryCalled = false;
-      server2.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       doPuts();
-      server3.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
+      server3.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
       verifyLiveAndRedundantServers(1, 0);
       if(registerInterestCalled){
         fail("register interest should not have been called since we failed to a redundant server !");
@@ -122,11 +122,11 @@ public class RedundancyLevelPart3DUnitTest extends RedundancyLevelTestBase
         fail("make primary should have been called since primary did fail and a new primary was to be chosen ");
       }
       assertEquals(0, pool.getRedundantNames().size());
-      server3.invoke(RedundancyLevelTestBase.class, "stopServer");
-      server0.invoke(RedundancyLevelTestBase.class, "startServer");
+      server3.invoke(() -> RedundancyLevelTestBase.stopServer());
+      server0.invoke(() -> RedundancyLevelTestBase.startServer());
       doPuts();
-      server0.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server0.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
+      server0.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server0.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       verifyLiveAndRedundantServers(1, 0);
       if(!registerInterestCalled){
         fail("register interest should have been called since a recovered server came up!");
@@ -160,31 +160,31 @@ public class RedundancyLevelPart3DUnitTest extends RedundancyLevelTestBase
       createEntriesK1andK2();
       registerK1AndK2();
       assertEquals(0, pool.getRedundantNames().size());
-      server0.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server0.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
-      server0.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server0.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server0.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
+      server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       doPuts();
-      server1.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server1.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
+      server1.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server1.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       verifyLiveAndRedundantServers(3, 0);
       assertEquals(0, pool.getRedundantNames().size());
-      server1.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       doPuts();
-      server2.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server2.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
+      server2.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       verifyLiveAndRedundantServers(2, 0);
       assertEquals(0, pool.getRedundantNames().size());
-      server2.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       doPuts();
-      server3.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server3.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
+      server3.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server3.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       verifyLiveAndRedundantServers(1, 0);
       assertEquals(0, pool.getRedundantNames().size());
-      server3.invoke(RedundancyLevelTestBase.class, "stopServer");
-      server0.invoke(RedundancyLevelTestBase.class, "startServer");
+      server3.invoke(() -> RedundancyLevelTestBase.stopServer());
+      server0.invoke(() -> RedundancyLevelTestBase.startServer());
       doPuts();
-      server0.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server0.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
+      server0.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server0.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       verifyLiveAndRedundantServers(1, 0);
       assertEquals(0, pool.getRedundantNames().size());
     }
@@ -212,28 +212,28 @@ public class RedundancyLevelPart3DUnitTest extends RedundancyLevelTestBase
       createEntriesK1andK2();
       registerK1AndK2();
       assertEquals(1, pool.getRedundantNames().size());
-      server0.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server0.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server0.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server0.invoke(() -> RedundancyLevelTestBase.stopServer());
       doPuts();
-      server1.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server2.invoke(RedundancyLevelTestBase.class, "verifyCCP");
-      server2.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
+      server1.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server2.invoke(() -> RedundancyLevelTestBase.verifyCCP());
+      server2.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       verifyLiveAndRedundantServers(3, 1);
       assertEquals(1, pool.getRedundantNames().size());
-      server1.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server1.invoke(() -> RedundancyLevelTestBase.stopServer());
       doPuts();
-      server2.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server2.invoke(RedundancyLevelTestBase.class, "stopServer");
+      server2.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server2.invoke(() -> RedundancyLevelTestBase.stopServer());
       doPuts();
-      server3.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server3.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
+      server3.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server3.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       verifyLiveAndRedundantServers(1, 0);
       assertEquals(0, pool.getRedundantNames().size());
-      server3.invoke(RedundancyLevelTestBase.class, "stopServer");
-      server0.invoke(RedundancyLevelTestBase.class, "startServer");
+      server3.invoke(() -> RedundancyLevelTestBase.stopServer());
+      server0.invoke(() -> RedundancyLevelTestBase.startServer());
       doPuts();
-      server0.invoke(RedundancyLevelTestBase.class, "verifyDispatcherIsAlive");
-      server0.invoke(RedundancyLevelTestBase.class, "verifyInterestRegistration");
+      server0.invoke(() -> RedundancyLevelTestBase.verifyDispatcherIsAlive());
+      server0.invoke(() -> RedundancyLevelTestBase.verifyInterestRegistration());
       verifyLiveAndRedundantServers(1, 0);
       assertEquals(0, pool.getRedundantNames().size());
      }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
index 03ed215..eaba8d9 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
@@ -115,14 +115,10 @@ public class RedundancyLevelTestBase extends DistributedTestCase
     IgnoredException.addIgnoredException("java.net.SocketException||java.net.ConnectException");
 
     // start servers first
-    PORT1 = ((Integer)server0.invoke(RedundancyLevelTestBase.class,
-        "createServerCache")).intValue();
-    PORT2 = ((Integer)server1.invoke(RedundancyLevelTestBase.class,
-        "createServerCache")).intValue();
-    PORT3 = ((Integer)server2.invoke(RedundancyLevelTestBase.class,
-        "createServerCache")).intValue();
-    PORT4 = ((Integer)server3.invoke(RedundancyLevelTestBase.class,
-        "createServerCache")).intValue();
+    PORT1 = ((Integer)server0.invoke(() -> RedundancyLevelTestBase.createServerCache())).intValue();
+    PORT2 = ((Integer)server1.invoke(() -> RedundancyLevelTestBase.createServerCache())).intValue();
+    PORT3 = ((Integer)server2.invoke(() -> RedundancyLevelTestBase.createServerCache())).intValue();
+    PORT4 = ((Integer)server3.invoke(() -> RedundancyLevelTestBase.createServerCache())).intValue();
 
     String hostName = NetworkUtils.getServerHostName(Host.getHost(0));
     SERVER1 = hostName + PORT1;
@@ -636,10 +632,10 @@ public class RedundancyLevelTestBase extends DistributedTestCase
       closeCache();
 
       // then close the servers
-      server0.invoke(RedundancyLevelTestBase.class, "closeCache");
-      server1.invoke(RedundancyLevelTestBase.class, "closeCache");
-      server2.invoke(RedundancyLevelTestBase.class, "closeCache");
-      server3.invoke(RedundancyLevelTestBase.class, "closeCache");
+      server0.invoke(() -> RedundancyLevelTestBase.closeCache());
+      server1.invoke(() -> RedundancyLevelTestBase.closeCache());
+      server2.invoke(() -> RedundancyLevelTestBase.closeCache());
+      server3.invoke(() -> RedundancyLevelTestBase.closeCache());
     } finally {
       CacheServerTestUtil.enableShufflingOfEndpoints();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
index a6ee5ba..7d729a3 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
@@ -77,9 +77,9 @@ public class RegionCloseDUnitTest extends DistributedTestCase
     //Client 1 VM
     client1 = host.getVM(1);
 
-    PORT1 =  ((Integer)server1.invoke(RegionCloseDUnitTest.class, "createServerCache" )).intValue();
-    client1.invoke(RegionCloseDUnitTest.class, "createClientCache", new Object[] {
-      NetworkUtils.getServerHostName(host), new Integer(PORT1)});
+    PORT1 =  ((Integer)server1.invoke(() -> RegionCloseDUnitTest.createServerCache())).intValue();
+    client1.invoke(() -> RegionCloseDUnitTest.createClientCache(
+      NetworkUtils.getServerHostName(host), new Integer(PORT1)));
 
   }
 
@@ -96,10 +96,10 @@ public class RegionCloseDUnitTest extends DistributedTestCase
 
   public void testCloseRegionOnClient()
   {
-    server1.invoke(RegionCloseDUnitTest.class, "VerifyClientProxyOnServerBeforeClose");
-    client1.invoke(RegionCloseDUnitTest.class, "closeRegion");
+    server1.invoke(() -> RegionCloseDUnitTest.VerifyClientProxyOnServerBeforeClose());
+    client1.invoke(() -> RegionCloseDUnitTest.closeRegion());
    // pause(10000);
-    server1.invoke(RegionCloseDUnitTest.class, "VerifyClientProxyOnServerAfterClose");
+    server1.invoke(() -> RegionCloseDUnitTest.VerifyClientProxyOnServerAfterClose());
   }
 
   public static void createClientCache(String host, Integer port1) throws Exception
@@ -239,8 +239,8 @@ public class RegionCloseDUnitTest extends DistributedTestCase
   @Override
   protected final void preTearDown() throws Exception {
     //close client
-    client1.invoke(RegionCloseDUnitTest.class, "closeCache");
+    client1.invoke(() -> RegionCloseDUnitTest.closeCache());
     //close server
-    server1.invoke(RegionCloseDUnitTest.class, "closeCache");
+    server1.invoke(() -> RegionCloseDUnitTest.closeCache());
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
index fd50d6e..097da6a 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
@@ -107,10 +107,10 @@ public class RegisterInterestBeforeRegionCreationDUnitTest extends DistributedTe
    */
   @Override
   protected final void preTearDown() throws Exception {
-    client1.invoke(RegisterInterestBeforeRegionCreationDUnitTest.class, "closeCache");
-    client2.invoke(RegisterInterestBeforeRegionCreationDUnitTest.class, "closeCache");
-    server1.invoke(RegisterInterestBeforeRegionCreationDUnitTest.class, "closeCache");
-    server2.invoke(RegisterInterestBeforeRegionCreationDUnitTest.class, "closeCache");
+    client1.invoke(() -> RegisterInterestBeforeRegionCreationDUnitTest.closeCache());
+    client2.invoke(() -> RegisterInterestBeforeRegionCreationDUnitTest.closeCache());
+    server1.invoke(() -> RegisterInterestBeforeRegionCreationDUnitTest.closeCache());
+    server2.invoke(() -> RegisterInterestBeforeRegionCreationDUnitTest.closeCache());
   }
 
   
@@ -197,20 +197,16 @@ public class RegisterInterestBeforeRegionCreationDUnitTest extends DistributedTe
   private void createClientServerConfigurationForClearTest() throws Exception
   {
     //create server and region
-    PORT1 = ((Integer)server1.invoke(RegisterInterestBeforeRegionCreationDUnitTest.class,
-        "createServer", new Object[] { new Boolean(true) })).intValue();
+    PORT1 = ((Integer)server1.invoke(() -> RegisterInterestBeforeRegionCreationDUnitTest.createServer( new Boolean(true) ))).intValue();
     
     //only create server, no region
-    PORT2 = ((Integer)server2.invoke(RegisterInterestBeforeRegionCreationDUnitTest.class,
-        "createServer", new Object[] { new Boolean(false) })).intValue();
+    PORT2 = ((Integer)server2.invoke(() -> RegisterInterestBeforeRegionCreationDUnitTest.createServer( new Boolean(false) ))).intValue();
     
     //client1 connected to server1
-    client1.invoke(RegisterInterestBeforeRegionCreationDUnitTest.class, "createClient",
-        new Object[] { NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1) });
+    client1.invoke(() -> RegisterInterestBeforeRegionCreationDUnitTest.createClient( NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1) ));
     
     //client2 connected to server2
-    client2.invoke(RegisterInterestBeforeRegionCreationDUnitTest.class, "createClient",
-        new Object[] { NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT2) });
+    client2.invoke(() -> RegisterInterestBeforeRegionCreationDUnitTest.createClient( NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT2) ));
   }
 
   public static Integer createServer(Boolean createRegion) throws Exception

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
index 203a742..fde871a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
@@ -91,13 +91,13 @@ public class RegisterInterestKeysDUnitTest extends DistributedTestCase
 
     LogWriterUtils.getLogWriter().info("implementation class is " + impl.getClass());
 
-    PORT1 =  ((Integer)server1.invoke(impl.getClass(), "createServerCache" )).intValue();
-    PORT2 =  ((Integer)server2.invoke(impl.getClass(), "createServerCache" )).intValue();
+    PORT1 =  ((Integer)server1.invoke(() -> impl.createServerCache())).intValue();
+    PORT2 =  ((Integer)server2.invoke(() -> impl.createServerCache())).intValue();
     
-    client1.invoke(impl.getClass(), "createClientCache", new Object[] { 
-      NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)});
-    client2.invoke(impl.getClass(), "createClientCache", new Object[] {
-      NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)});
+    client1.invoke(() -> impl.createClientCache( 
+      NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)));
+    client2.invoke(() -> impl.createClientCache(
+      NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)));
 
   }
 
@@ -122,8 +122,8 @@ public class RegisterInterestKeysDUnitTest extends DistributedTestCase
   public void testRegisterCreatesInvalidEntry()
   {
     //  First create entries on both servers via the two client
-    client1.invoke(impl.getClass(), "createEntriesK1");
-    client2.invoke(impl.getClass(), "registerKeysK1");
+    client1.invoke(() -> impl.createEntriesK1());
+    client2.invoke(() -> impl.registerKeysK1());
   }
 
 
@@ -239,10 +239,10 @@ public class RegisterInterestKeysDUnitTest extends DistributedTestCase
   @Override
   protected final void preTearDown() throws Exception {
     //close client
-    client1.invoke(impl.getClass(), "closeCache");
-    client2.invoke(impl.getClass(), "closeCache");
+    client1.invoke(() -> impl.closeCache());
+    client2.invoke(() -> impl.closeCache());
     //close server
-    server1.invoke(impl.getClass(), "closeCache");
-    server2.invoke(impl.getClass(), "closeCache");
+    server1.invoke(() -> impl.closeCache());
+    server2.invoke(() -> impl.closeCache());
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
index ece92d7..f02fef5 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
@@ -100,11 +100,11 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase
   public void testPeriodicAckSendByClient() throws Exception
   {
     createEntries();
-    server1.invoke(ReliableMessagingDUnitTest.class, "putOnServer");   
+    server1.invoke(() -> ReliableMessagingDUnitTest.putOnServer());   
     waitForServerUpdate();    
     setCreationTimeTidAndSeq();
     waitForClientAck();        
-    server1.invoke(ReliableMessagingDUnitTest.class, "checkTidAndSeq");   
+    server1.invoke(() -> ReliableMessagingDUnitTest.checkTidAndSeq());   
   }
 
   /*
@@ -116,14 +116,14 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase
     IgnoredException.addIgnoredException("java.net.ConnectException");
     createEntries();
     setClientServerObserverForBeforeSendingClientAck();    
-    server1.invoke(ReliableMessagingDUnitTest.class, "putOnServer");
+    server1.invoke(() -> ReliableMessagingDUnitTest.putOnServer());
     LogWriterUtils.getLogWriter().info("Entering waitForServerUpdate");
     waitForServerUpdate();    
     LogWriterUtils.getLogWriter().info("Entering waitForCallback");
     waitForCallback();
     LogWriterUtils.getLogWriter().info("Entering waitForClientAck");
     waitForClientAck();
-    server2.invoke(ReliableMessagingDUnitTest.class, "checkTidAndSeq");
+    server2.invoke(() -> ReliableMessagingDUnitTest.checkTidAndSeq());
   }
   
   /**
@@ -301,9 +301,9 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase
       {
         LogWriterUtils.getLogWriter().info("beforeSendingClientAck invoked");
         setCreationTimeTidAndSeq();   
-        server1.invoke(ReliableMessagingDUnitTest.class, "stopServer");
+        server1.invoke(() -> ReliableMessagingDUnitTest.stopServer());
         checkServerCount(1,1);
-        server2.invoke(ReliableMessagingDUnitTest.class, "checkEmptyDispatchedMsgs");        
+        server2.invoke(() -> ReliableMessagingDUnitTest.checkEmptyDispatchedMsgs());        
         PoolImpl.BEFORE_SENDING_CLIENT_ACK_CALLBACK_FLAG = false;       
         LogWriterUtils.getLogWriter().info("end of beforeSendingClientAck");
             }
@@ -334,10 +334,8 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase
     server1 = host.getVM(0);
     server2 = host.getVM(1);
 
-    PORT1 = ((Integer)server1.invoke(ReliableMessagingDUnitTest.class,
-        "createServerCache")).intValue();
-    PORT2 = ((Integer)server2.invoke(ReliableMessagingDUnitTest.class,
-        "createServerCache")).intValue();
+    PORT1 = ((Integer)server1.invoke(() -> ReliableMessagingDUnitTest.createServerCache())).intValue();
+    PORT2 = ((Integer)server2.invoke(() -> ReliableMessagingDUnitTest.createServerCache())).intValue();
 
     CacheServerTestUtil.disableShufflingOfEndpoints();
     createClientCache(PORT1, PORT2);
@@ -418,8 +416,8 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase
   protected final void preTearDown() throws Exception {
     creationTime = 0;
     closeCache();
-    server1.invoke(ReliableMessagingDUnitTest.class, "closeCache");
-    server2.invoke(ReliableMessagingDUnitTest.class, "closeCache");
+    server1.invoke(() -> ReliableMessagingDUnitTest.closeCache());
+    server2.invoke(() -> ReliableMessagingDUnitTest.closeCache());
     CacheServerTestUtil.resetDisableShufflingOfEndpointsFlag();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
index dedd915..4056483 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
@@ -77,17 +77,17 @@ public class UnregisterInterestDUnitTest extends DistributedTestCase {
     client1 = host.getVM(1);
     client2 = host.getVM(2);
     
-    int port = (Integer)server0.invoke(UnregisterInterestDUnitTest.class, "createCacheAndStartServer");
-    client1.invoke(UnregisterInterestDUnitTest.class, "createClientCache", new Object[]{client1.getHost(), port});
-    client2.invoke(UnregisterInterestDUnitTest.class, "createClientCache", new Object[]{client2.getHost(), port});
+    int port = (Integer)server0.invoke(() -> UnregisterInterestDUnitTest.createCacheAndStartServer());
+    client1.invoke(() -> UnregisterInterestDUnitTest.createClientCache(client1.getHost(), port));
+    client2.invoke(() -> UnregisterInterestDUnitTest.createClientCache(client2.getHost(), port));
   }
 
   @Override
   protected final void preTearDown() throws Exception {
     closeCache();
-    server0.invoke(UnregisterInterestDUnitTest.class, "closeCache");
-    client1.invoke(UnregisterInterestDUnitTest.class, "closeCache");
-    client2.invoke(UnregisterInterestDUnitTest.class, "closeCache");
+    server0.invoke(() -> UnregisterInterestDUnitTest.closeCache());
+    client1.invoke(() -> UnregisterInterestDUnitTest.closeCache());
+    client2.invoke(() -> UnregisterInterestDUnitTest.closeCache());
   }
 
   public static void closeCache() {
@@ -107,13 +107,13 @@ public class UnregisterInterestDUnitTest extends DistributedTestCase {
    * @throws Exception
    */
   public void testUnregisterInterestAllKeys() throws Exception {
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {all_keys, 0, 0});
-    client1.invoke(UnregisterInterestDUnitTest.class, "registerInterest", new Object[] {all_keys, receiveValuesConstant, null});
-    client2.invoke(UnregisterInterestDUnitTest.class, "registerInterest", new Object[] {all_keys, !receiveValuesConstant, null});
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {all_keys, 1, 1});
-    client1.invoke(UnregisterInterestDUnitTest.class, "closeCache");
-    client2.invoke(UnregisterInterestDUnitTest.class, "closeCache");
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {all_keys, 0, 0});
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(all_keys, 0, 0));
+    client1.invoke(() -> UnregisterInterestDUnitTest.registerInterest(all_keys, receiveValuesConstant, null));
+    client2.invoke(() -> UnregisterInterestDUnitTest.registerInterest(all_keys, !receiveValuesConstant, null));
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(all_keys, 1, 1));
+    client1.invoke(() -> UnregisterInterestDUnitTest.closeCache());
+    client2.invoke(() -> UnregisterInterestDUnitTest.closeCache());
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(all_keys, 0, 0));
   }
 
   /**
@@ -126,13 +126,13 @@ public class UnregisterInterestDUnitTest extends DistributedTestCase {
    * @throws Exception
    */
   public void testUnregisterInterestKeys() throws Exception {
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {list, 0, 0});
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(list, 0, 0));
     client1.invoke(UnregisterInterestDUnitTest.class, "registerInterest", new Object[] {list, receiveValuesConstant, new String[]{"key_1", "key_2", "key_3", "key_4", "key_5"}});
     client2.invoke(UnregisterInterestDUnitTest.class, "registerInterest", new Object[] {list, !receiveValuesConstant, new String[]{"key_1", "key_2", "key_3", "key_4", "key_5"}});
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {list, 1, 1});
-    client1.invoke(UnregisterInterestDUnitTest.class, "closeCache");
-    client2.invoke(UnregisterInterestDUnitTest.class, "closeCache");
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {list, 0, 0});
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(list, 1, 1));
+    client1.invoke(() -> UnregisterInterestDUnitTest.closeCache());
+    client2.invoke(() -> UnregisterInterestDUnitTest.closeCache());
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(list, 0, 0));
   }
 
   /**
@@ -146,13 +146,13 @@ public class UnregisterInterestDUnitTest extends DistributedTestCase {
    * @throws Exception
    */
   public void testUnregisterInterestPatterns() throws Exception {
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {regex, 0, 0});
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(regex, 0, 0));
     client1.invoke(UnregisterInterestDUnitTest.class, "registerInterest", new Object[] {regex, receiveValuesConstant, new String[] {"[a-z]*[0-9]"}});
     client2.invoke(UnregisterInterestDUnitTest.class, "registerInterest", new Object[] {regex, !receiveValuesConstant, new String[] {"[a-z]*[0-9]"}});
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {regex, 1, 1});
-    client1.invoke(UnregisterInterestDUnitTest.class, "closeCache");
-    client2.invoke(UnregisterInterestDUnitTest.class, "closeCache");
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {regex, 0, 0});
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(regex, 1, 1));
+    client1.invoke(() -> UnregisterInterestDUnitTest.closeCache());
+    client2.invoke(() -> UnregisterInterestDUnitTest.closeCache());
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(regex, 0, 0));
   }
 
   /**
@@ -167,14 +167,14 @@ public class UnregisterInterestDUnitTest extends DistributedTestCase {
    * @throws Exception
    */
   public void testUnregisterInterestKeysInvForOneClientDoesNotAffectOtherClient() throws Exception {
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {list, 0, 0});
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(list, 0, 0));
     client1.invoke(UnregisterInterestDUnitTest.class, "registerInterest", new Object[] {list, !receiveValuesConstant, new String[] {"key_1", "key_2", "key_3", "key_4", "key_5"}});
     client2.invoke(UnregisterInterestDUnitTest.class, "registerInterest", new Object[] {list, !receiveValuesConstant, new String[] {"key_1", "key_2", "key_3", "key_4", "key_5"}});
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {list, 0, 2});
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(list, 0, 2));
     client1.invoke(UnregisterInterestDUnitTest.class, "unregisterInterest", new Object[] {new String[] {"key_1", "key_2", "key_3"}});
     server0.invoke(UnregisterInterestDUnitTest.class, "updateKeys",  new Object[] {new String[] {"key_1", "key_2", "key_3", "key_4", "key_5"}});
-    client1.invoke(UnregisterInterestDUnitTest.class, "timedWaitForInvalidates", new Object[] {2});
-    client2.invoke(UnregisterInterestDUnitTest.class, "timedWaitForInvalidates", new Object[] {5});
+    client1.invoke(() -> UnregisterInterestDUnitTest.timedWaitForInvalidates(2));
+    client2.invoke(() -> UnregisterInterestDUnitTest.timedWaitForInvalidates(5));
   }
 
   /**
@@ -190,14 +190,14 @@ public class UnregisterInterestDUnitTest extends DistributedTestCase {
    * @throws Exception
    */
   public void testUnregisterInterestRegexInvForOneClientDoesNotAffectOtherClient() throws Exception {
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {regex, 0, 0});
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(regex, 0, 0));
     client1.invoke(UnregisterInterestDUnitTest.class, "registerInterest", new Object[] {regex, !receiveValuesConstant, new String[] {"[a-z]*[0-9]"}});
     client2.invoke(UnregisterInterestDUnitTest.class, "registerInterest", new Object[] {regex, !receiveValuesConstant, new String[] {"[a-z]*[0-9]"}});
-    server0.invoke(UnregisterInterestDUnitTest.class, "checkRIArtifacts", new Object[] {regex, 0, 2});
+    server0.invoke(() -> UnregisterInterestDUnitTest.checkRIArtifacts(regex, 0, 2));
     client1.invoke(UnregisterInterestDUnitTest.class, "unregisterInterestRegex", new Object[] {new String[] {"[a-z]*[0-9]"}});
     server0.invoke(UnregisterInterestDUnitTest.class, "updateKeys",  new Object[] {new String[] {"key1", "key2", "key3", "key4", "key5"}});
-    client1.invoke(UnregisterInterestDUnitTest.class, "timedWaitForInvalidates", new Object[] {0});
-    client2.invoke(UnregisterInterestDUnitTest.class, "timedWaitForInvalidates", new Object[] {5});
+    client1.invoke(() -> UnregisterInterestDUnitTest.timedWaitForInvalidates(0));
+    client2.invoke(() -> UnregisterInterestDUnitTest.timedWaitForInvalidates(5));
   }
 
   public void _testUnregisterInterestFilters() throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
index 0c60c46..bdbb838 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
@@ -124,13 +124,13 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
       host.getVM(i).invoke(getClass(), "createImpl", null);
     }
 
-    PORT1 =  ((Integer)server1.invoke(getClass(), "createServerCache" )).intValue();
-    PORT2 =  ((Integer)server2.invoke(getClass(), "createServerCache" )).intValue();
+    PORT1 =  ((Integer)server1.invoke(() -> createServerCache())).intValue();
+    PORT2 =  ((Integer)server2.invoke(() -> createServerCache())).intValue();
 
-    client1.invoke(getClass(), "createClientCache", new Object[] {
-      NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)});
-    client2.invoke(getClass(), "createClientCache", new Object[] {
-      NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)});
+    client1.invoke(() -> createClientCache(
+      NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)));
+    client2.invoke(() -> createClientCache(
+      NetworkUtils.getServerHostName(server1.getHost()), new Integer(PORT1),new Integer(PORT2)));
     
     IgnoredException.addIgnoredException("java.net.SocketException");
     IgnoredException.addIgnoredException("Unexpected IOException");
@@ -165,14 +165,13 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
     final int maxWaitTime = Integer.getInteger(WAIT_PROPERTY, WAIT_DEFAULT).intValue();
 
     //First create entries on both servers via the two client
-    client1.invoke(impl.getClass(), "createEntriesK1andK2");
-    client2.invoke(impl.getClass(), "createEntriesK1andK2");
-    client1.invoke(impl.getClass(), "registerKeysK1andK2");
-    client2.invoke(impl.getClass(), "registerKeysK1andK2");
+    client1.invoke(() -> impl.createEntriesK1andK2());
+    client2.invoke(() -> impl.createEntriesK1andK2());
+    client1.invoke(() -> impl.registerKeysK1andK2());
+    client2.invoke(() -> impl.registerKeysK1andK2());
     //Induce fail over of InteretsList Endpoint to Server 2 by killing server1
     
-    server1.invoke(UpdatePropagationDUnitTest.class, "killServer",
-        new Object[] {new Integer(PORT1)});
+    server1.invoke(() -> UpdatePropagationDUnitTest.killServer(new Integer(PORT1)));
     //Wait for 10 seconds to allow fail over. This would mean that Interest
     // has failed over to Server2.
     client1.invoke(new CacheSerializableRunnable("Wait for server on port1 to be dead") {
@@ -226,7 +225,7 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
     });
 
     //Start Server1 again so that both clients1 & Client 2 will establish connection to server1 too.
-    server1.invoke(UpdatePropagationDUnitTest.class, "startServer", new Object[] {new Integer(PORT1)});
+    server1.invoke(() -> UpdatePropagationDUnitTest.startServer(new Integer(PORT1)));
 
     client1.invoke(new CacheSerializableRunnable("Wait for server on port1 to be dead") {
       public void run2() throws CacheException
@@ -255,15 +254,13 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
 
     //Do a put on Server1 via Connection object from client1.
     // Client1 should not receive updated value while client2 should receive
-    client1.invoke(impl.getClass(),
-        "acquireConnectionsAndPutonK1andK2",
-        new Object[] { NetworkUtils.getServerHostName(client1.getHost())});
+    client1.invoke(() -> impl.acquireConnectionsAndPutonK1andK2( NetworkUtils.getServerHostName(client1.getHost())));
     //pause(5000);
     //Check if both the puts ( on key1 & key2 ) have reached the servers
-    server1.invoke(impl.getClass(), "verifyUpdates");
-    server2.invoke(impl.getClass(), "verifyUpdates");
+    server1.invoke(() -> impl.verifyUpdates());
+    server2.invoke(() -> impl.verifyUpdates());
     // verify no updates for update originator
-    client1.invoke(impl.getClass(), "verifyNoUpdates");
+    client1.invoke(() -> impl.verifyNoUpdates());
 
   }
 
@@ -277,12 +274,12 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
   {
     final int maxWaitTime = Integer.getInteger(WAIT_PROPERTY, WAIT_DEFAULT).intValue();
     //  First create entries on both servers via the two client
-    client1.invoke(impl.getClass(), "createEntriesK1andK2");
-    client2.invoke(impl.getClass(), "createEntriesK1andK2");
-    client1.invoke(impl.getClass(), "registerKeysK1andK2");
-    client2.invoke(impl.getClass(), "registerKeysK1andK2");
+    client1.invoke(() -> impl.createEntriesK1andK2());
+    client2.invoke(() -> impl.createEntriesK1andK2());
+    client1.invoke(() -> impl.registerKeysK1andK2());
+    client2.invoke(() -> impl.registerKeysK1andK2());
     //Induce fail over of InteretsList Endpoint to Server 2 by killing server1
-    server1.invoke(UpdatePropagationDUnitTest.class, "killServer", new Object[] {new Integer(PORT1)});
+    server1.invoke(() -> UpdatePropagationDUnitTest.killServer(new Integer(PORT1)));
     //Wait for 10 seconds to allow fail over. This would mean that Interstist has failed
     // over to Server2.
     client1.invoke(new CacheSerializableRunnable("Wait for server on port1 to be dead") {
@@ -335,7 +332,7 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
     });
 
     //Start Server1 again so that both clients1 & Client 2 will establish connection to server1 too.
-    server1.invoke(UpdatePropagationDUnitTest.class, "startServer", new Object[] {new Integer(PORT1)});
+    server1.invoke(() -> UpdatePropagationDUnitTest.startServer(new Integer(PORT1)));
 
     client1.invoke(new CacheSerializableRunnable("Wait for servers to be alive") {
       public void run2() throws CacheException
@@ -381,15 +378,13 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
 
     //Do a put on Server1 via Connection object from client1.
     // Client1 should not receive updated value while client2 should receive
-    client1.invoke(impl.getClass(),
-        "acquireConnectionsAndPutonK1andK2",
-        new Object[] { NetworkUtils.getServerHostName(client1.getHost())});
+    client1.invoke(() -> impl.acquireConnectionsAndPutonK1andK2( NetworkUtils.getServerHostName(client1.getHost())));
     Wait.pause(5000);
     //Check if both the puts ( on key1 & key2 ) have reached the servers
-    server1.invoke(impl.getClass(), "verifyUpdates");
-    server2.invoke(impl.getClass(), "verifyUpdates");
+    server1.invoke(() -> impl.verifyUpdates());
+    server2.invoke(() -> impl.verifyUpdates());
     // verify updates to other client
-    client2.invoke(impl.getClass(), "verifyUpdates");
+    client2.invoke(() -> impl.verifyUpdates());
   }
 
   public static void acquireConnectionsAndPutonK1andK2(String host)
@@ -591,11 +586,11 @@ public class UpdatePropagationDUnitTest extends DistributedTestCase
   @Override
   protected final void preTearDown() throws Exception {
     //close client
-    client1.invoke(getClass(), "closeCache");
-    client2.invoke(getClass(), "closeCache");
+    client1.invoke(() -> closeCache());
+    client2.invoke(() -> closeCache());
     //close server
-    server1.invoke(getClass(), "closeCache");
-    server2.invoke(getClass(), "closeCache");
+    server1.invoke(() -> closeCache());
+    server2.invoke(() -> closeCache());
   }
 }
 


Mime
View raw message