geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [11/56] [abbrv] incubator-geode git commit: Automatically converting calls of vm.invoke to lambdas
Date Tue, 16 Feb 2016 22:11:31 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationClientServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationClientServerDUnitTest.java
b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationClientServerDUnitTest.java
index 4e0b5c2..f01d36f 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationClientServerDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationClientServerDUnitTest.java
@@ -40,75 +40,69 @@ public class ParallelWANPropagationClientServerDUnitTest extends WANTestBase
{
    * @throws Exception
    */
   public void testParallelPropagationWithClientServer() throws Exception {
-    Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-        "createFirstLocatorWithDSId", new Object[] { 1 });
-    Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 2, lnPort });
+    Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(
1 ));
+    Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2,
lnPort ));
 
-    vm2.invoke(WANTestBase.class, "createReceiverAndServer", new Object[] { nyPort });
-    vm3.invoke(WANTestBase.class, "createReceiverAndServer", new Object[] { nyPort });
-    vm2.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", null, 1, 100, isOffHeap() });
-    vm3.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", null, 1, 100, isOffHeap() });
+    vm2.invoke(() -> WANTestBase.createReceiverAndServer( nyPort ));
+    vm3.invoke(() -> WANTestBase.createReceiverAndServer( nyPort ));
+    vm2.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", null, 1, 100, isOffHeap() ));
+    vm3.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", null, 1, 100, isOffHeap() ));
 
-    vm4.invoke(WANTestBase.class, "createClientWithLocator", new Object[] {
-        nyPort, "localhost", getTestMethodName() + "_PR" });
-    vm4.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_PR",
-      100 });
+    vm4.invoke(() -> WANTestBase.createClientWithLocator(
+        nyPort, "localhost", getTestMethodName() + "_PR" ));
+    vm4.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_PR",
+      100 ));
 
-    vm5.invoke(WANTestBase.class, "createServer", new Object[] { lnPort });
-    vm6.invoke(WANTestBase.class, "createServer", new Object[] { lnPort });
-    vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2, true,
-         100, 10, false, false, null, true });
-    vm6.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2, true,
-         100, 10, false, false, null, true });
-    vm5.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap() });
-    vm6.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap() });
+    vm5.invoke(() -> WANTestBase.createServer( lnPort ));
+    vm6.invoke(() -> WANTestBase.createServer( lnPort ));
+    vm5.invoke(() -> WANTestBase.createSender( "ln", 2, true,
+         100, 10, false, false, null, true ));
+    vm6.invoke(() -> WANTestBase.createSender( "ln", 2, true,
+         100, 10, false, false, null, true ));
+    vm5.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap() ));
+    vm6.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", "ln", 1, 100, isOffHeap() ));
 
-    vm7.invoke(WANTestBase.class, "createClientWithLocator", new Object[] {
-      lnPort, "localhost", getTestMethodName() + "_PR" });
+    vm7.invoke(() -> WANTestBase.createClientWithLocator(
+      lnPort, "localhost", getTestMethodName() + "_PR" ));
     
-    AsyncInvocation inv1 = vm5.invokeAsync(WANTestBase.class, "startSender", new Object[]
{ "ln" });
-    AsyncInvocation inv2 = vm6.invokeAsync(WANTestBase.class, "startSender", new Object[]
{ "ln" });
+    AsyncInvocation inv1 = vm5.invokeAsync(() -> WANTestBase.startSender( "ln" ));
+    AsyncInvocation inv2 = vm6.invokeAsync(() -> WANTestBase.startSender( "ln" ));
 
     inv1.join();
     inv2.join();
     // before doing any puts, let the senders be running in order to ensure that
     // not a single event will be lost
     
-    vm5.invoke(WANTestBase.class, "waitForSenderRunningState",
-        new Object[] { "ln" });
-    vm6.invoke(WANTestBase.class, "waitForSenderRunningState",
-        new Object[] { "ln" });
+    vm5.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+    vm6.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
     
-    vm7.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_PR",
-        10000 });
+    vm7.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_PR",
+        10000 ));
 
     
     // verify all buckets drained on all sender nodes.
-    vm5.invoke(WANTestBase.class,
-        "validateParallelSenderQueueAllBucketsDrained", new Object[] { "ln" });
-    vm6.invoke(WANTestBase.class,
-        "validateParallelSenderQueueAllBucketsDrained", new Object[] { "ln" });
+    vm5.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained( "ln" ));
+    vm6.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained( "ln" ));
 
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_PR", 10000 });
-    vm3.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_PR", 10000 });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_PR", 10000 ));
+    vm3.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_PR", 10000 ));
 
-    vm5.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_PR", 10000 });
-    vm6.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_PR", 10000 });
+    vm5.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_PR", 10000 ));
+    vm6.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_PR", 10000 ));
 
-    vm7.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 10000 });
+    vm7.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 10000 ));
     
-    vm4.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 10000 });
+    vm4.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 10000 ));
 
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/69024aa9/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationConcurrentOpsDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationConcurrentOpsDUnitTest.java
b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationConcurrentOpsDUnitTest.java
index c9fa048..8f3042a 100644
--- a/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationConcurrentOpsDUnitTest.java
+++ b/gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANPropagationConcurrentOpsDUnitTest.java
@@ -42,65 +42,63 @@ public class ParallelWANPropagationConcurrentOpsDUnitTest extends WANTestBase
{
    * @throws Exception
    */
   public void testParallelPropagationWithSingleBucketPR() throws Exception {
-    Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-        "createFirstLocatorWithDSId", new Object[] { 1 });
-    Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 2, lnPort });
+    Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(
1 ));
+    Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2,
lnPort ));
 
-    vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-    vm3.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
+    vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+    vm3.invoke(() -> WANTestBase.createReceiver( nyPort ));
 
-    vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+    vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm5.invoke(() -> WANTestBase.createCache( lnPort ));
  
-    vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-        true, 100, 10, false, false, null, true });
-    vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-        true, 100, 10, false, false, null, true });
+    vm4.invoke(() -> WANTestBase.createSender( "ln", 2,
+        true, 100, 10, false, false, null, true ));
+    vm5.invoke(() -> WANTestBase.createSender( "ln", 2,
+        true, 100, 10, false, false, null, true ));
  
-    vm4.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", "ln", 1, 1, isOffHeap() });
-    vm5.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", "ln", 1, 1, isOffHeap() });
+    vm4.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", "ln", 1, 1, isOffHeap() ));
+    vm5.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", "ln", 1, 1, isOffHeap() ));
  
-    vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
+    vm4.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm5.invoke(() -> WANTestBase.startSender( "ln" ));
  
-    vm2.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", null, 1, 1, isOffHeap() });
-    vm3.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", null, 1, 1, isOffHeap() });
+    vm2.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", null, 1, 1, isOffHeap() ));
+    vm3.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", null, 1, 1, isOffHeap() ));
 
     //before doing any puts, let the senders be running in order to ensure that
     //not a single event will be lost
-    vm4.invoke(WANTestBase.class, "waitForSenderRunningState", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "waitForSenderRunningState", new Object[] { "ln" });
+    vm4.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+    vm5.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
     
     //pause the senders
-    vm4.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln" });
+    vm4.invoke(() -> WANTestBase.pauseSender( "ln" ));
+    vm5.invoke(() -> WANTestBase.pauseSender( "ln" ));
     
     Wait.pause(5000);
     
-    AsyncInvocation async1 = vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[] {
getTestMethodName() + "_PR", 700 });
-    AsyncInvocation async2 = vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[] {
getTestMethodName() + "_PR", 1000 });
-    AsyncInvocation async3 = vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[] {
getTestMethodName() + "_PR", 800 });
-    AsyncInvocation async4 = vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[] {
getTestMethodName() + "_PR", 1000 });
+    AsyncInvocation async1 = vm4.invokeAsync(() -> WANTestBase.doPuts( getTestMethodName()
+ "_PR", 700 ));
+    AsyncInvocation async2 = vm4.invokeAsync(() -> WANTestBase.doPuts( getTestMethodName()
+ "_PR", 1000 ));
+    AsyncInvocation async3 = vm4.invokeAsync(() -> WANTestBase.doPuts( getTestMethodName()
+ "_PR", 800 ));
+    AsyncInvocation async4 = vm4.invokeAsync(() -> WANTestBase.doPuts( getTestMethodName()
+ "_PR", 1000 ));
     
     async1.join();
     async2.join();
     async3.join();
     async4.join();
     
-    int queueSize = (Integer) vm4.invoke(WANTestBase.class, "getQueueContentSize", new Object[]
{ "ln" });
+    int queueSize = (Integer) vm4.invoke(() -> WANTestBase.getQueueContentSize( "ln" ));
     assertEquals("Actual queue size is not matching with the expected", 3500, queueSize);
     
     //resume the senders now
-    vm4.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln" });
+    vm4.invoke(() -> WANTestBase.resumeSender( "ln" ));
+    vm5.invoke(() -> WANTestBase.resumeSender( "ln" ));
     
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_PR", 1000 });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_PR", 1000 ));
   }
 
   /**
@@ -110,153 +108,149 @@ public class ParallelWANPropagationConcurrentOpsDUnitTest extends
WANTestBase {
    * @throws Exception
    */
   public void testParallelPropagationWithLowNumberofBuckets() throws Exception {
-    Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-        "createFirstLocatorWithDSId", new Object[] { 1 });
-    Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 2, lnPort });
+    Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(
1 ));
+    Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2,
lnPort ));
 
-    vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
-    vm3.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
+    vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
+    vm3.invoke(() -> WANTestBase.createReceiver( nyPort ));
 
-    vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+    vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm5.invoke(() -> WANTestBase.createCache( lnPort ));
  
-    vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-        true, 100, 10, false, false, null, true });
-    vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-        true, 100, 10, false, false, null, true });
+    vm4.invoke(() -> WANTestBase.createSender( "ln", 2,
+        true, 100, 10, false, false, null, true ));
+    vm5.invoke(() -> WANTestBase.createSender( "ln", 2,
+        true, 100, 10, false, false, null, true ));
  
-    vm4.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", "ln", 1, 10, isOffHeap() });
-    vm5.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", "ln", 1, 10, isOffHeap() });
+    vm4.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", "ln", 1, 10, isOffHeap() ));
+    vm5.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", "ln", 1, 10, isOffHeap() ));
  
-    vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
+    vm4.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm5.invoke(() -> WANTestBase.startSender( "ln" ));
  
-    vm2.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", null, 1, 10, isOffHeap() });
-    vm3.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", null, 1, 10, isOffHeap() });
+    vm2.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", null, 1, 10, isOffHeap() ));
+    vm3.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", null, 1, 10, isOffHeap() ));
 
     //before doing any puts, let the senders be running in order to ensure that
     //not a single event will be lost
-    vm4.invoke(WANTestBase.class, "waitForSenderRunningState", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "waitForSenderRunningState", new Object[] { "ln" });
+    vm4.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
+    vm5.invoke(() -> WANTestBase.waitForSenderRunningState( "ln" ));
     
-    AsyncInvocation async1 = vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[] {
getTestMethodName() + "_PR", 700 });
-    AsyncInvocation async2 = vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[] {
getTestMethodName() + "_PR", 1000 });
-    AsyncInvocation async3 = vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[] {
getTestMethodName() + "_PR", 800 });
-    AsyncInvocation async4 = vm4.invokeAsync(WANTestBase.class, "doPuts", new Object[] {
getTestMethodName() + "_PR", 1000 });
+    AsyncInvocation async1 = vm4.invokeAsync(() -> WANTestBase.doPuts( getTestMethodName()
+ "_PR", 700 ));
+    AsyncInvocation async2 = vm4.invokeAsync(() -> WANTestBase.doPuts( getTestMethodName()
+ "_PR", 1000 ));
+    AsyncInvocation async3 = vm4.invokeAsync(() -> WANTestBase.doPuts( getTestMethodName()
+ "_PR", 800 ));
+    AsyncInvocation async4 = vm4.invokeAsync(() -> WANTestBase.doPuts( getTestMethodName()
+ "_PR", 1000 ));
     
     async1.join();
     async2.join();
     async3.join();
     async4.join();
     
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-        getTestMethodName() + "_PR", 1000 });
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+        getTestMethodName() + "_PR", 1000 ));
   }
 
   public void testParalleQueueDrainInOrder_PR() throws Exception {
-    Integer lnPort = (Integer)vm0.invoke(WANTestBase.class,
-        "createFirstLocatorWithDSId", new Object[] { 1 });
-    Integer nyPort = (Integer)vm1.invoke(WANTestBase.class,
-        "createFirstRemoteLocator", new Object[] { 2, lnPort });
+    Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(
1 ));
+    Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2,
lnPort ));
 
-    vm2.invoke(WANTestBase.class, "createReceiver", new Object[] { nyPort });
+    vm2.invoke(() -> WANTestBase.createReceiver( nyPort ));
 
-    vm2.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-      getTestMethodName() + "_PR", null, 3, 4, isOffHeap() });
+    vm2.invoke(() -> WANTestBase.createPartitionedRegion(
+      getTestMethodName() + "_PR", null, 3, 4, isOffHeap() ));
   
-    vm2.invoke(WANTestBase.class, "addListenerOnRegion", new Object[] {getTestMethodName()
+ "_PR"});
+    vm2.invoke(() -> WANTestBase.addListenerOnRegion(getTestMethodName() + "_PR"));
   
-    vm4.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm5.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm6.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
-    vm7.invoke(WANTestBase.class, "createCache", new Object[] { lnPort });
+    vm4.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm5.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm6.invoke(() -> WANTestBase.createCache( lnPort ));
+    vm7.invoke(() -> WANTestBase.createCache( lnPort ));
 
-    vm4.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-        true, 100, 10, false, false, null, true });
-    vm5.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-        true, 100, 10, false, false, null, true });
-    vm6.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-      true, 100, 10, false, false, null, true });
-    vm7.invoke(WANTestBase.class, "createSender", new Object[] { "ln", 2,
-      true, 100, 10, false, false, null, true });
+    vm4.invoke(() -> WANTestBase.createSender( "ln", 2,
+        true, 100, 10, false, false, null, true ));
+    vm5.invoke(() -> WANTestBase.createSender( "ln", 2,
+        true, 100, 10, false, false, null, true ));
+    vm6.invoke(() -> WANTestBase.createSender( "ln", 2,
+      true, 100, 10, false, false, null, true ));
+    vm7.invoke(() -> WANTestBase.createSender( "ln", 2,
+      true, 100, 10, false, false, null, true ));
 
-    vm4.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", "ln", 3, 4, isOffHeap() });
-    vm5.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", "ln", 3, 4, isOffHeap() });
-    vm6.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", "ln", 3, 4, isOffHeap() });
-    vm7.invoke(WANTestBase.class, "createPartitionedRegion", new Object[] {
-        getTestMethodName() + "_PR", "ln", 3, 4, isOffHeap() });
+    vm4.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", "ln", 3, 4, isOffHeap() ));
+    vm5.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", "ln", 3, 4, isOffHeap() ));
+    vm6.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", "ln", 3, 4, isOffHeap() ));
+    vm7.invoke(() -> WANTestBase.createPartitionedRegion(
+        getTestMethodName() + "_PR", "ln", 3, 4, isOffHeap() ));
     
-    vm4.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-    vm5.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-    vm6.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
-    vm7.invoke(WANTestBase.class, "startSender", new Object[] { "ln" });
+    vm4.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm5.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm6.invoke(() -> WANTestBase.startSender( "ln" ));
+    vm7.invoke(() -> WANTestBase.startSender( "ln" ));
 
-    vm4.invoke(WANTestBase.class, "addQueueListener", new Object[] { "ln", true});
-    vm5.invoke(WANTestBase.class, "addQueueListener", new Object[] { "ln", true});
-    vm6.invoke(WANTestBase.class, "addQueueListener", new Object[] { "ln", true});
-    vm7.invoke(WANTestBase.class, "addQueueListener", new Object[] { "ln", true});
+    vm4.invoke(() -> WANTestBase.addQueueListener( "ln", true));
+    vm5.invoke(() -> WANTestBase.addQueueListener( "ln", true));
+    vm6.invoke(() -> WANTestBase.addQueueListener( "ln", true));
+    vm7.invoke(() -> WANTestBase.addQueueListener( "ln", true));
 
     Wait.pause(2000);
-    vm4.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln"});
-    vm5.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln"});
-    vm6.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln"});
-    vm7.invoke(WANTestBase.class, "pauseSender", new Object[] { "ln"});
+    vm4.invoke(() -> WANTestBase.pauseSender( "ln"));
+    vm5.invoke(() -> WANTestBase.pauseSender( "ln"));
+    vm6.invoke(() -> WANTestBase.pauseSender( "ln"));
+    vm7.invoke(() -> WANTestBase.pauseSender( "ln"));
     
     Wait.pause(2000);
     
-    vm6.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_PR",
-      4 });
-    vm4.invoke(WANTestBase.class, "addListenerOnBucketRegion", new Object[] {getTestMethodName()
+ "_PR", 4});
-    vm5.invoke(WANTestBase.class, "addListenerOnBucketRegion", new Object[] {getTestMethodName()
+ "_PR", 4});
-    vm6.invoke(WANTestBase.class, "addListenerOnBucketRegion", new Object[] {getTestMethodName()
+ "_PR", 4 });
-    vm7.invoke(WANTestBase.class, "addListenerOnBucketRegion", new Object[] {getTestMethodName()
+ "_PR", 4});
+    vm6.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_PR",
+      4 ));
+    vm4.invoke(() -> WANTestBase.addListenerOnBucketRegion(getTestMethodName() + "_PR",
4));
+    vm5.invoke(() -> WANTestBase.addListenerOnBucketRegion(getTestMethodName() + "_PR",
4));
+    vm6.invoke(() -> WANTestBase.addListenerOnBucketRegion(getTestMethodName() + "_PR",
4 ));
+    vm7.invoke(() -> WANTestBase.addListenerOnBucketRegion(getTestMethodName() + "_PR",
4));
     
-    vm4.invoke(WANTestBase.class, "addListenerOnQueueBucketRegion", new Object[] { "ln" ,
4});
-    vm5.invoke(WANTestBase.class, "addListenerOnQueueBucketRegion", new Object[] { "ln" ,
4});
-    vm6.invoke(WANTestBase.class, "addListenerOnQueueBucketRegion", new Object[] { "ln" ,
4 });
-    vm7.invoke(WANTestBase.class, "addListenerOnQueueBucketRegion", new Object[] { "ln" ,
4});
+    vm4.invoke(() -> WANTestBase.addListenerOnQueueBucketRegion( "ln" , 4));
+    vm5.invoke(() -> WANTestBase.addListenerOnQueueBucketRegion( "ln" , 4));
+    vm6.invoke(() -> WANTestBase.addListenerOnQueueBucketRegion( "ln" , 4 ));
+    vm7.invoke(() -> WANTestBase.addListenerOnQueueBucketRegion( "ln" , 4));
     
-    vm6.invoke(WANTestBase.class, "doPuts", new Object[] { getTestMethodName() + "_PR",
-      1000 });
+    vm6.invoke(() -> WANTestBase.doPuts( getTestMethodName() + "_PR",
+      1000 ));
     
-    vm6.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 1000 });
+    vm6.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 1000 ));
     
-    HashMap vm4BRUpdates = (HashMap)vm4.invoke(WANTestBase.class, "checkBR", new Object[]
{getTestMethodName() + "_PR", 4});
-    HashMap vm5BRUpdates = (HashMap)vm5.invoke(WANTestBase.class, "checkBR", new Object[]
{getTestMethodName() + "_PR", 4});
-    HashMap vm6BRUpdates = (HashMap)vm6.invoke(WANTestBase.class, "checkBR", new Object[]
{getTestMethodName() + "_PR", 4});
-    HashMap vm7BRUpdates = (HashMap)vm7.invoke(WANTestBase.class, "checkBR", new Object[]
{getTestMethodName() + "_PR", 4});
+    HashMap vm4BRUpdates = (HashMap)vm4.invoke(() -> WANTestBase.checkBR(getTestMethodName()
+ "_PR", 4));
+    HashMap vm5BRUpdates = (HashMap)vm5.invoke(() -> WANTestBase.checkBR(getTestMethodName()
+ "_PR", 4));
+    HashMap vm6BRUpdates = (HashMap)vm6.invoke(() -> WANTestBase.checkBR(getTestMethodName()
+ "_PR", 4));
+    HashMap vm7BRUpdates = (HashMap)vm7.invoke(() -> WANTestBase.checkBR(getTestMethodName()
+ "_PR", 4));
     
     List b0SenderUpdates = (List)vm4BRUpdates.get("Create0");
     List b1SenderUpdates = (List)vm4BRUpdates.get("Create1");
     List b2SenderUpdates = (List)vm4BRUpdates.get("Create2");
     List b3SenderUpdates = (List)vm4BRUpdates.get("Create3");
     
-    HashMap vm4QueueBRUpdates = (HashMap)vm4.invoke(WANTestBase.class, "checkQueue_BR", new
Object[] {"ln", 4});
-    HashMap vm5QueueBRUpdates = (HashMap)vm5.invoke(WANTestBase.class, "checkQueue_BR", new
Object[] {"ln", 4});
-    HashMap vm6QueueBRUpdates = (HashMap)vm6.invoke(WANTestBase.class, "checkQueue_BR", new
Object[] {"ln", 4});
-    HashMap vm7QueueBRUpdates = (HashMap)vm7.invoke(WANTestBase.class, "checkQueue_BR", new
Object[] {"ln", 4});
+    HashMap vm4QueueBRUpdates = (HashMap)vm4.invoke(() -> WANTestBase.checkQueue_BR("ln",
4));
+    HashMap vm5QueueBRUpdates = (HashMap)vm5.invoke(() -> WANTestBase.checkQueue_BR("ln",
4));
+    HashMap vm6QueueBRUpdates = (HashMap)vm6.invoke(() -> WANTestBase.checkQueue_BR("ln",
4));
+    HashMap vm7QueueBRUpdates = (HashMap)vm7.invoke(() -> WANTestBase.checkQueue_BR("ln",
4));
     
     assertEquals(vm4QueueBRUpdates, vm5QueueBRUpdates);
     assertEquals(vm4QueueBRUpdates, vm6QueueBRUpdates);
     assertEquals(vm4QueueBRUpdates, vm7QueueBRUpdates);
     
-    vm4.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln"});
-    vm5.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln"});
-    vm6.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln"});
-    vm7.invoke(WANTestBase.class, "resumeSender", new Object[] { "ln"});
-    vm2.invoke(WANTestBase.class, "validateRegionSize", new Object[] {
-      getTestMethodName() + "_PR", 1000 });
-    HashMap receiverUpdates = (HashMap)vm2.invoke(WANTestBase.class, "checkPR", new Object[]
{
-      getTestMethodName() + "_PR"});
+    vm4.invoke(() -> WANTestBase.resumeSender( "ln"));
+    vm5.invoke(() -> WANTestBase.resumeSender( "ln"));
+    vm6.invoke(() -> WANTestBase.resumeSender( "ln"));
+    vm7.invoke(() -> WANTestBase.resumeSender( "ln"));
+    vm2.invoke(() -> WANTestBase.validateRegionSize(
+      getTestMethodName() + "_PR", 1000 ));
+    HashMap receiverUpdates = (HashMap)vm2.invoke(() -> WANTestBase.checkPR(
+      getTestMethodName() + "_PR"));
     List<Long> createList = (List)receiverUpdates.get("Create");
     ArrayList<Long> b0ReceiverUpdates = new ArrayList<Long>();
     ArrayList<Long> b1ReceiverUpdates = new ArrayList<Long>();


Mime
View raw message