You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by je...@apache.org on 2016/03/21 21:39:32 UTC

[01/54] [abbrv] incubator-geode git commit: GEODE-573: Fix broken image links in javadocs

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-17-2 386ace7c8 -> fed950025


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/jcache-get-flow.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/jcache-get-flow.fig b/geode-core/src/main/resources/javadoc-images/jcache-get-flow.fig
new file mode 100644
index 0000000..d51af17
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/jcache-get-flow.fig
@@ -0,0 +1,349 @@
+#FIG 3.2
+Portrait
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 4275 225 9825 1050
+2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 4275 225 9825 225 9825 1050 4275 1050 4275 225
+4 0 0 50 0 0 13 0.0000 4 150 5085 4441 450 This flowchart describes the series of actions that are taken\001
+4 0 0 50 0 0 13 0.0000 6 210 5220 4441 930 $Id$\001
+4 0 0 50 0 0 13 0.0000 4 195 4170 4441 690 when a value is requested from a JCache region.\001
+-6
+6 2025 975 3975 1575
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 3975 1575 3975 975 2100 975 2100 1575 3975 1575
+4 1 0 50 0 0 12 0.0000 4 180 1815 3000 1200 User requests the value\001
+4 1 0 50 0 0 12 0.0000 4 180 1425 3000 1440 of a key in a region\001
+-6
+6 1350 8325 3750 8625
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 3750 8625 3750 8325 1350 8325 1350 8625 3750 8625
+4 1 0 50 0 0 12 0.0000 4 180 2250 2550 8550 Define the entry, if necessary\001
+-6
+6 4575 9075 6525 9375
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 4575 9375 4575 9075 6525 9075 6525 9375 4575 9375
+4 1 0 50 0 0 12 0.0000 4 180 1860 5550 9300 Store key/value in region\001
+-6
+6 750 3075 2400 3525
+4 1 0 50 0 0 12 0.0000 4 180 1605 1575 3225 [Does entry or region\001
+4 1 0 50 0 0 12 0.0000 4 180 1635 1575 3465 have a cache loader?]\001
+-6
+6 2250 4500 3300 5550
+6 2250 4500 3300 4800
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 3300 4800 3300 4500 2250 4500 2250 4800 3300 4800
+4 1 0 50 0 0 12 0.0000 4 135 825 2775 4725 Return null\001
+-6
+6 2550 4800 3000 5550
+6 2550 5100 3000 5550
+6 2625 5175 2925 5475
+1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2775 5325 106 106 2775 5325 2881 5325
+-6
+1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 2775 5325 168 168 2775 5325 2700 5175
+-6
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 2775 4800 2775 5175
+-6
+-6
+6 600 4500 2100 5025
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 2100 5025 2100 4500 600 4500 600 5025 2100 5025
+4 1 0 50 0 0 12 0.0000 4 135 1425 1350 4725 Invoke the loader's\001
+4 1 0 50 0 0 12 0.0000 4 180 1065 1350 4965 load() method\001
+-6
+6 5475 11775 6600 12075
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 6600 12075 6600 11775 5475 11775 5475 12075 6600 12075
+4 0 0 50 0 0 12 0.0000 4 135 960 5550 12000 Return value\001
+-6
+6 2775 7725 4425 8025
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 4425 8025 4425 7725 2775 7725 2775 8025 4425 8025
+4 1 0 50 0 0 12 0.0000 4 135 1530 3600 7950 Perform a "net load"\001
+-6
+6 2925 6900 4575 7350
+4 1 0 50 0 0 12 0.0000 4 180 1620 3750 7050 [Can another member\001
+4 1 0 50 0 0 12 0.0000 4 180 1185 3750 7290 load the value?]\001
+-6
+6 4500 7725 5550 8700
+6 4500 7725 5550 8025
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 5550 8025 5550 7725 4500 7725 4500 8025 5550 8025
+4 1 0 50 0 0 12 0.0000 4 135 825 5025 7950 Return null\001
+-6
+6 4800 8025 5250 8700
+6 4800 8250 5250 8700
+6 4875 8325 5175 8625
+1 3 0 1 0 0 50 0 20 0.000 1 0.0000 5025 8475 106 106 5025 8475 5131 8475
+-6
+1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5025 8475 168 168 5025 8475 4950 8325
+-6
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 5025 8025 5025 8325
+-6
+-6
+6 3825 5100 5325 5625
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 5325 5625 5325 5100 3825 5100 3825 5625 5325 5625
+4 1 0 50 0 0 12 0.0000 4 180 1470 4575 5325 Request value from\001
+4 1 0 50 0 0 12 0.0000 4 135 1125 4575 5565 other members\001
+-6
+6 3825 4500 5625 4800
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 5625 4800 5625 4500 3825 4500 3825 4800 5625 4800
+4 1 0 50 0 0 12 0.0000 4 135 1725 4725 4725 Perform a "net search"\001
+-6
+6 7275 5850 8625 6375
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 8625 6375 8625 5850 7275 5850 7275 6375 8625 6375
+4 1 0 50 0 0 12 0.0000 4 180 1110 7950 6075 Get ownership\001
+4 1 0 50 0 0 12 0.0000 4 180 585 7950 6315 of entry\001
+-6
+6 8175 6450 9825 6900
+4 1 0 50 0 0 12 0.0000 4 180 1605 9000 6600 [Does entry or region\001
+4 1 0 50 0 0 12 0.0000 4 180 1635 9000 6840 have a cache loader?]\001
+-6
+6 8400 7200 9900 7725
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 9900 7725 9900 7200 8400 7200 8400 7725 9900 7725
+4 1 0 50 0 0 12 0.0000 4 135 1425 9150 7425 Invoke the loader's\001
+4 1 0 50 0 0 12 0.0000 4 180 1065 9150 7665 load() method\001
+-6
+6 2700 5850 4500 6300
+4 1 0 50 0 0 12 0.0000 4 180 1725 3600 6000 [Does another member\001
+4 1 0 50 0 0 12 0.0000 4 180 1230 3600 6240 have the value?]\001
+-6
+6 6000 5475 6750 5925
+4 1 0 50 0 0 12 0.0000 4 180 720 6375 5625 [Is region\001
+4 1 0 50 0 0 12 0.0000 4 180 585 6375 5865 global?]\001
+-6
+6 4275 10575 5925 11100
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 5925 11100 5925 10575 4275 10575 4275 11100 5925 11100
+4 1 0 50 0 0 12 0.0000 4 180 1440 5100 10800 Release ownership\001
+4 1 0 50 0 0 12 0.0000 4 180 585 5100 11040 of entry\001
+-6
+6 7575 10575 9225 11100
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 7575 11100 7575 10575 9225 10575 9225 11100 7575 11100
+4 1 0 50 0 0 12 0.0000 4 135 1530 8400 10800 Invoke the listener's\001
+4 1 0 50 0 0 12 0.0000 4 180 1110 8400 11040 objectAdded()\001
+-6
+6 7425 9750 9375 10200
+6 7425 9750 9375 10200
+4 1 0 50 0 0 12 0.0000 4 180 1680 8400 10140 object event listener?]\001
+4 1 0 50 0 0 12 0.0000 4 180 1815 8400 9900 [Does the entry have an\001
+-6
+-6
+6 6600 12675 7050 13125
+6 6675 12750 6975 13050
+1 3 0 1 0 0 50 0 20 0.000 1 0.0000 6825 12900 106 106 6825 12900 6931 12900
+-6
+1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 6825 12900 168 168 6825 12900 6750 12750
+-6
+6 600 8925 2400 9375
+4 1 0 50 0 0 12 0.0000 4 180 1665 1500 9075 [Does the region have\001
+4 1 0 50 0 0 12 0.0000 4 180 1725 1500 9315 an eviction controller?]\001
+-6
+6 1500 5175 2400 5625
+4 1 0 50 0 0 12 0.0000 4 180 840 1950 5325 [Did loader\001
+4 1 0 50 0 0 12 0.0000 4 180 900 1950 5565 return null?]\001
+-6
+6 675 9900 2475 10500
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 2475 10500 2475 9900 675 9900 675 10500 2475 10500
+4 1 0 50 0 0 12 0.0000 4 180 1560 1575 10125 evict Entries making\001
+4 1 0 50 0 0 12 0.0000 4 180 1710 1575 10365 space for loaded Entry\001
+-6
+1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3000 300 106 106 3000 300 3106 300
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 3000 975 3000 375
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2850 2025 3000 1875 3150 2025 3000 2175 2850 2025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2250 2550 2400 2400 2550 2550 2400 2700 2250 2550
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2850 2025 2400 2025 2400 2400
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 3000 1875 3000 1575
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 2250 2550 225 2550 225 11925 5475 11925
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2325 9525 2475 9375 2625 9525 2475 9675 2325 9525
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2325 9525 1575 9525 1575 9900
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2325 10800 2475 10650 2625 10800 2475 10950 2325 10800
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 1575 10500 1575 10800 2325 10800
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 2625 9525 3000 9525 3000 10800 2625 10800
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 5
+	0 0 1.00 120.00 120.00
+	 2475 10950 2475 11250 3675 11250 3675 9225 4575 9225
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 2475 8625 2475 9375
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 4425 6375 2475 6375 2475 8325
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 5100 11100 5100 11325 5925 11325
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 6225 10275 6600 10275 6600 11325 6225 11325
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5925 11325 6075 11175 6225 11325 6075 11475 5925 11325
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 7425 11325 7275 11175 7125 11325 7275 11475 7425 11325
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 8325 11100 8325 11325 7425 11325
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 7125 10275 6825 10275 6825 11325 7125 11325
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 6600 9675 6600 9825 6075 9825 6075 10125
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 6825 9675 6825 9825 7275 9825 7275 10125
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 7275 11475 7275 11775 6900 11775 6900 12525
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3225 4125 3375 3975 3525 4125 3375 4275 3225 4125
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3
+	 2700 3600 3375 3600 3375 3975
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2400 3600 2550 3450 2700 3600 2550 3750 2400 3600
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2400 3600 1350 3600 1350 4500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 4575 6225 4575 5625
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3525 4125 4125 4125 4125 4500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3675 3075 5100 3075 5100 4500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 6525 9225 6750 9225 6750 9675
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 6825 12525 6825 12750
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 6075 11475 6075 11775
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 6075 12075 6075 12225 6675 12225 6675 12525
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3375 3075 2550 3075 2550 3450
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4500 7350 4650 7200 4800 7350 4650 7500 4500 7350
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 4500 7350 3600 7350 3600 7725
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 4800 7350 5025 7350 5025 7725
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 3600 8025 3600 8325
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3150 2025 3525 2025 3525 2550
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 1200 5700 1350 5550 1500 5700 1350 5850 1200 5700
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 1350 5550 1350 5025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 5
+	0 0 1.00 120.00 120.00
+	 1200 5700 975 5700 975 7725 1875 7725 1875 8325
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 4575 4800 4575 5100
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 1500 5700 3450 5700 3450 4650 3825 4650
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 7950 6750 7950 6375
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 8100 6900 9150 6900 9150 7200
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 7800 6900 7950 6750 8100 6900 7950 7050 7800 6900
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 9150 8250 7275 8250 7275 6900
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 9300 7725 9300 8100
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 5
+	0 0 1.00 120.00 120.00
+	 9300 8400 9300 8850 4125 8850 4125 8475 3750 8475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 7800 6900 4650 6900 4650 7200
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4425 6375 4575 6225 4725 6375 4575 6525 4425 6375
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5550 6075 5700 5925 5850 6075 5700 6225 5550 6075
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 5550 6075 5325 6075 5325 6900
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 5
+	0 0 1.00 120.00 120.00
+	 5700 5925 5700 5700 5025 5700 5025 6375 4725 6375
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 5850 6075 7275 6075
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 9150 8250 9300 8100 9450 8250 9300 8400 9150 8250
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5925 10275 6075 10125 6225 10275 6075 10425 5925 10275
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 5925 10275 5100 10275 5100 10575
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 7425 10275 7275 10125 7125 10275 7275 10425 7425 10275
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 7425 10275 8325 10275 8325 10575
+2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 6450 9675 6975 9675
+2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 6525 12525 7125 12525
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3375 3075 3525 2925 3675 3075 3525 3225 3375 3075
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2550 2550 3525 2550 3525 2925
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3225 4125 2775 4125 2775 4500
+4 1 0 50 0 0 12 0.0000 4 180 1665 2025 1875 [Is the entry defined?]\001
+4 1 0 50 0 0 12 0.0000 4 180 1695 1500 2325 [Is the value present?]\001
+4 1 0 50 0 0 12 0.0000 4 180 1785 8325 8175 [Did loader return null?]\001
+4 1 0 50 0 0 12 0.0000 4 180 1350 5250 10200 [Is region global?]\001
+4 1 0 50 0 0 12 0.0000 4 180 2070 4650 2925 [Is region globally scoped?]\001
+4 1 0 50 0 0 12 0.0000 4 180 1260 2625 3975 [Is region local?]\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/jcache-get-flow.pdf
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/jcache-get-flow.pdf b/geode-core/src/main/resources/javadoc-images/jcache-get-flow.pdf
new file mode 100644
index 0000000..5c6a4d0
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/jcache-get-flow.pdf differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/jcache-put-flow.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/jcache-put-flow.fig b/geode-core/src/main/resources/javadoc-images/jcache-put-flow.fig
new file mode 100644
index 0000000..6f3a5ca
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/jcache-put-flow.fig
@@ -0,0 +1,359 @@
+#FIG 3.2
+Portrait
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 6600 12150 7500 12450
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 7500 12450 7500 12150 6600 12150 6600 12450 7500 12450
+4 1 0 50 0 0 12 0.0000 4 180 705 7050 12375 Entry put\001
+-6
+6 6825 12675 7275 13125
+6 6900 12750 7200 13050
+1 3 0 1 0 0 50 0 20 0.000 1 0.0000 7050 12900 106 106 7050 12900 7156 12900
+-6
+1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 7050 12900 168 168 7050 12900 6975 12750
+-6
+6 6075 7275 8025 7575
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 8025 7575 8025 7275 6075 7275 6075 7575 8025 7575
+4 1 0 50 0 0 12 0.0000 4 180 1860 7050 7500 Store key/value in region\001
+-6
+6 1875 2325 3375 2625
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 3375 2625 3375 2325 1875 2325 1875 2625 3375 2625
+4 1 0 50 0 0 12 0.0000 4 180 1440 2625 2550 Define a new entry\001
+-6
+6 1125 3750 2475 4350
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 2400 4350 2400 3750 1125 3750 1125 4350 2400 4350
+4 1 0 50 0 0 12 0.0000 4 135 915 1800 3975 Use custom\001
+4 1 0 50 0 0 12 0.0000 4 180 1245 1800 4215 object attributes\001
+-6
+6 2700 3750 4425 4350
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 4425 4350 4425 3750 2700 3750 2700 4350 4425 4350
+4 1 0 50 0 0 12 0.0000 4 180 1395 3600 3975 Use default object\001
+4 1 0 50 0 0 12 0.0000 4 180 1635 3600 4215 attributes from region\001
+-6
+6 2925 750 4275 1350
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 4275 1350 4275 750 2925 750 2925 1350 4275 1350
+4 1 0 50 0 0 12 0.0000 4 180 1260 3600 1215 pair into a region\001
+4 1 0 50 0 0 12 0.0000 4 180 1155 3600 975 Put a key/value\001
+-6
+6 4575 375 10050 1200
+2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 4575 375 10050 375 10050 1200 4575 1200 4575 375
+4 0 0 50 0 0 13 0.0000 4 150 5085 4738 600 This flowchart describes the series of actions that are taken\001
+4 0 0 50 0 0 13 0.0000 4 195 3840 4738 840 when a key/value is place in a JCache region\001
+4 0 0 50 0 0 13 0.0000 6 210 5220 4738 1080 \001
+-6
+6 900 2775 2400 3225
+4 1 0 50 0 0 12 0.0000 4 180 1380 1650 3165 object attributes?]\001
+4 1 0 50 0 0 12 0.0000 4 180 1395 1650 2925 [Did caller specify\001
+-6
+6 2250 8775 3900 9225
+4 1 0 50 0 0 12 0.0000 4 180 1155 3075 8925 [Was the value\001
+4 1 0 50 0 0 12 0.0000 4 180 1530 3075 9165 previously present?]\001
+-6
+6 1875 9750 3825 10275
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 3825 10275 3825 9750 1875 9750 1875 10275 3825 10275
+4 1 0 50 0 0 12 0.0000 4 135 1530 2850 9975 Invoke the listener's\001
+4 1 0 50 0 0 12 0.0000 4 180 1830 2850 10215 objectReplaced() mthod\001
+-6
+6 4200 9750 6000 10275
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 6000 10275 6000 9750 4200 9750 4200 10275 6000 10275
+4 1 0 50 0 0 12 0.0000 4 135 1530 5100 9975 Invoke the listener's\001
+4 1 0 50 0 0 12 0.0000 4 180 1710 5100 10215 objectAdded() method\001
+-6
+6 7425 8925 8925 9225
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 8925 9225 8925 8925 7425 8925 7425 9225 8925 9225
+4 1 0 50 0 0 12 0.0000 4 180 1320 8175 9150 Distribute update\001
+-6
+6 8475 10050 9525 10350
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 9525 10350 9525 10050 8475 10050 8475 10350 9525 10350
+4 1 0 50 0 0 12 0.0000 4 135 1035 9000 10275 Wait for acks\001
+-6
+6 8325 11325 9975 11850
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 9975 11850 9975 11325 8325 11325 8325 11850 9975 11850
+4 1 0 50 0 0 12 0.0000 4 180 1440 9150 11550 Release ownership\001
+4 1 0 50 0 0 12 0.0000 4 180 585 9150 11790 of entry\001
+-6
+6 9150 10500 9900 10950
+4 1 0 50 0 0 12 0.0000 4 180 720 9525 10650 [Is region\001
+4 1 0 50 0 0 12 0.0000 4 180 585 9525 10890 global?]\001
+-6
+6 4350 2250 5850 2550
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 5850 2550 5850 2250 4350 2250 4350 2550 5850 2550
+4 1 0 50 0 0 12 0.0000 4 180 1275 5100 2475 Replace an entry\001
+-6
+6 5175 5100 7125 5700
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 5175 5700 5175 5100 7125 5100 7125 5700 5175 5700
+4 1 0 50 0 0 12 0.0000 4 135 1680 6150 5325 Invoke the controller's\001
+4 1 0 50 0 0 12 0.0000 4 180 1635 6150 5565 beforeObjectAdded()\001
+-6
+6 7425 5100 9375 5700
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 7425 5700 7425 5100 9375 5100 9375 5700 7425 5700
+4 1 0 50 0 0 12 0.0000 4 180 1845 8400 5565 beforeObjectReplaced()\001
+4 1 0 50 0 0 12 0.0000 4 135 1680 8400 5325 Invoke the controller's\001
+-6
+6 4575 2700 7575 3900
+6 5475 3300 7575 3600
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 5475 3600 5475 3300 7575 3300 7575 3600 5475 3600
+4 1 0 50 0 0 12 0.0000 4 180 1965 6525 3525 Obtain ownership of entry\001
+-6
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5250 3000 5100 2850 4950 3000 5100 3150 5250 3000
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 5250 3000 6600 3000 6600 3300
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5250 3750 5100 3600 4950 3750 5100 3900 5250 3750
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 3
+	0 0 1.00 120.00 120.00
+	 5250 3750 6600 3750 6600 3600
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 4950 3000 4575 3000 4575 3750 4950 3750
+4 1 0 50 0 0 12 0.0000 4 180 1350 6000 2850 [Is region global?]\001
+-6
+6 4350 8100 6300 8550
+6 4350 8100 6300 8550
+4 1 0 50 0 0 12 0.0000 4 180 1860 5325 8250 [Does this entry have an\001
+4 1 0 50 0 0 12 0.0000 4 180 1680 5325 8490 object event listener?]\001
+-6
+-6
+6 300 5550 2400 5850
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 2400 5850 2400 5550 300 5550 300 5850 2400 5850
+4 1 0 50 0 0 12 0.0000 4 180 1965 1350 5775 Obtain ownership of entry\001
+-6
+6 525 6300 2325 6750
+4 1 0 50 0 0 12 0.0000 4 180 1635 1425 6690 a eviction controller?]\001
+4 1 0 50 0 0 12 0.0000 4 180 1665 1425 6450 [Does the region have\001
+-6
+6 450 7125 2250 7725
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 450 7725 450 7125 2250 7125 2250 7725 450 7725
+4 1 0 50 0 0 12 0.0000 4 180 1800 1350 7350 apply eviction algorithm\001
+4 1 0 50 0 0 12 0.0000 4 135 1560 1350 7590 to accomodate value\001
+-6
+1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3600 300 106 106 3600 300 3706 300
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 6975 7575 6975 7875
+2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 6750 7875 7200 7875
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 7350 8625 7500 8475 7650 8625 7500 8775 7350 8625
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 7125 7875 7125 8100 7500 8100 7500 8475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 7650 8625 8100 8625 8100 8925
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 7425 11025 7575 10875 7725 11025 7575 11175 7425 11025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 7350 8625 7125 8625 7125 11025 7425 11025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 7575 11175 7575 11400 7125 11400 7125 11775
+2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 6750 11775 7275 11775
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 7050 11775 7050 12150
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 7050 12450 7050 12750
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 6825 7875 6825 8100 6375 8100 6375 8475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 6225 8625 6375 8475 6525 8625 6375 8775 6225 8625
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 6225 8625 4050 8625 4050 9150
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3450 1950 2550 1950 2550 2325
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 2550 3150 2550 2625
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2400 4725 2550 4575 2700 4725 2550 4875 2400 4725
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2400 3300 2550 3150 2700 3300 2550 3450 2400 3300
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2700 3300 3450 3300 3450 3750
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 3
+	0 0 1.00 120.00 120.00
+	 2400 4725 1725 4725 1725 4350
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3450 4350 3450 4725 2700 4725
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 3
+	0 0 1.00 120.00 120.00
+	 1725 3750 1725 3300 2400 3300
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3450 1950 3600 1800 3750 1950 3600 2100 3450 1950
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 3600 1800 3600 1350
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3600 750 3600 375
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3750 1950 5100 1950 5100 2250
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3900 9300 4050 9150 4200 9300 4050 9450 3900 9300
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3900 9300 2775 9300 2775 9750
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 4200 9300 5025 9300 5025 9750
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3900 10725 4050 10575 4200 10725 4050 10875 3900 10725
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2775 10275 2775 10725 3900 10725
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 5025 10275 5025 10725 4200 10725
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 6375 11175 6375 11400 6900 11400 6900 11775
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 6225 11025 6375 10875 6525 11025 6375 11175 6225 11025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 6525 8625 6825 8625 6825 11025 6525 11025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 4050 10875 4050 11025 6225 11025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 7950 9750 8100 9600 8250 9750 8100 9900 7950 9750
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 8250 9750 9000 9750 9000 10050
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 7950 9750 7575 9750 7575 10875
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 8850 11025 9000 10875 9150 11025 9000 11175 8850 11025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 9000 10350 9000 10875
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 9150 11025 9450 11025 9450 11325
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 8850 11025 7725 11025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 9075 11850 9075 12375 8100 12375 8100 11025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 5100 2550 5100 2850
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4950 6150 5100 6000 5250 6150 5100 6300 4950 6150
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 3
+	0 0 1.00 120.00 120.00
+	 5250 6150 7275 6150 7275 6075
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4950 4425 5100 4275 5250 4425 5100 4575 4950 4425
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 5250 4425 7275 4425 7275 4650
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 4950 4425 4575 4425 4575 6150 4950 6150
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 7425 4800 8325 4800 8325 5100
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 7125 4800 6225 4800 6225 5100
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 8325 5700 8325 5925 7425 5925
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 6225 5700 6225 5925 7125 5925
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 7425 5925 7275 5775 7125 5925 7275 6075 7425 5925
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 7425 4800 7275 4650 7125 4800 7275 4950 7425 4800
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 5100 3900 5100 4275
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 5100 6300 5100 6600 6975 6600 6975 7275
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 5
+	0 0 1.00 120.00 120.00
+	 2550 8250 2550 8550 3375 8550 3375 7425 6075 7425
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 2550 4875 2550 5100
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2400 5250 2550 5100 2700 5250 2550 5400 2400 5250
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2400 5250 1050 5250 1050 5550
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2400 6000 2550 5850 2700 6000 2550 6150 2400 6000
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 3
+	0 0 1.00 120.00 120.00
+	 2400 6000 1050 6000 1050 5850
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 2700 5250 3075 5250 3075 6000 2700 6000
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 2550 6150 2550 6675
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2700 6825 2550 6675 2400 6825 2550 6975 2700 6825
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2400 6825 1125 6825 1125 7125
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 2700 6825 3150 6825 3150 8100 2700 8100
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 3
+	0 0 1.00 120.00 120.00
+	 2400 8100 1125 8100 1125 7725
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2700 8100 2550 7950 2400 8100 2550 8250 2700 8100
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 8100 9225 8100 9600
+4 1 0 50 0 0 12 0.0000 4 180 1995 8625 8325 [Is the region distributed?]\001
+4 1 0 50 0 0 12 0.0000 4 180 435 7200 8475 [else]\001
+4 1 0 50 0 0 12 0.0000 4 180 435 6750 8475 [else]\001
+4 1 0 50 0 0 12 0.0000 4 180 435 3150 1800 [else]\001
+4 1 0 50 0 0 12 0.0000 4 180 1665 4725 1800 [Is the entry defined?]\001
+4 1 0 50 0 0 12 0.0000 4 180 435 3000 3225 [else]\001
+4 1 0 50 0 0 12 0.0000 4 180 1230 8925 9600 [Wait for acks?]\001
+4 1 0 50 0 0 12 0.0000 4 180 435 7650 9600 [else]\001
+4 1 0 50 0 0 12 0.0000 4 180 2715 8700 4725 [Was the value previously defined?]\001
+4 1 0 50 0 0 12 0.0000 4 180 3390 6825 4275 [Does the region have a capacity controller?]\001
+4 1 0 50 0 0 12 0.0000 4 180 1350 1650 5100 [Is region global?]\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/jcache-put-flow.pdf
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/jcache-put-flow.pdf b/geode-core/src/main/resources/javadoc-images/jcache-put-flow.pdf
new file mode 100644
index 0000000..7fa4390
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/jcache-put-flow.pdf differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/jcache-update-message-flow.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/jcache-update-message-flow.fig b/geode-core/src/main/resources/javadoc-images/jcache-update-message-flow.fig
new file mode 100644
index 0000000..6bbff07
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/jcache-update-message-flow.fig
@@ -0,0 +1,334 @@
+#FIG 3.2
+Portrait
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 5625 3150 6975 3675
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 5625 3675 5625 3150 6975 3150 6975 3675 5625 3675
+4 1 0 50 0 0 12 0.0000 4 180 1260 6300 3375 Define entry and\001
+4 1 0 50 0 0 12 0.0000 4 180 705 6300 3615 store key\001
+-6
+6 6675 4800 8325 5325
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 6675 5325 6675 4800 8325 4800 8325 5325 6675 5325
+4 1 0 50 0 0 12 0.0000 4 135 1530 7500 5025 Invoke the listener's\001
+4 1 0 50 0 0 12 0.0000 4 180 915 7500 5265 keyAdded()\001
+-6
+6 6675 3825 8475 4275
+4 1 0 50 0 0 12 0.0000 4 180 1800 7575 3975 [Does the region have a\001
+4 1 0 50 0 0 12 0.0000 4 180 1680 7575 4215 region event listener?]\001
+-6
+6 2700 5925 4050 6450
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 4050 6450 4050 5925 2700 5925 2700 6450 4050 6450
+4 1 0 50 0 0 12 0.0000 4 180 645 3375 6390 in region\001
+4 1 0 50 0 0 12 0.0000 4 180 1170 3375 6150 Store key/value\001
+-6
+6 3825 11400 4575 11700
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 3825 11700 3825 11400 4575 11400 4575 11700 3825 11700
+4 1 0 50 0 0 12 0.0000 4 135 690 4200 11625 Send ack\001
+-6
+6 3225 300 4875 1350
+6 3225 825 4875 1350
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 3300 1350 3300 825 4800 825 4800 1350 3300 1350
+4 1 0 50 0 0 12 0.0000 4 180 1215 4050 1050 An entry update\001
+4 1 0 50 0 0 12 0.0000 4 180 1545 4050 1290 message is received\001
+-6
+1 3 0 1 0 0 50 0 20 0.000 0 -0.0000 4050 450 106 106 4050 450 3944 450
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4050 825 4050 525
+-6
+6 5100 375 10725 1200
+2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 5100 375 9900 375 9900 1200 5100 1200 5100 375
+4 0 0 50 0 0 12 0.0000 4 135 4560 5175 600 This flowchart describes the series of actions that are taken\001
+4 0 0 50 0 0 12 0.0000 6 195 5505 5175 1080 \001
+4 0 0 50 0 0 12 0.0000 4 180 4365 5175 840 when an JCache region entry update message is received.\001
+-6
+6 225 4050 2325 4650
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 2325 4650 2325 4050 225 4050 225 4650 2325 4650
+4 1 0 50 0 0 12 0.0000 4 135 1680 1275 4275 Invoke the controller's\001
+4 1 0 50 0 0 12 0.0000 4 180 1845 1275 4515 beforeObjectReplaced()\001
+-6
+6 2550 4050 4500 4650
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 4500 4650 4500 4050 2550 4050 2550 4650 4500 4650
+4 1 0 50 0 0 12 0.0000 4 135 1680 3525 4275 Invoke the controller's\001
+4 1 0 50 0 0 12 0.0000 4 180 1635 3525 4515 beforeObjectAdded()\001
+-6
+6 6525 6000 7875 6450
+4 1 0 50 0 0 12 0.0000 4 180 1260 7200 6150 [Does the region\001
+4 1 0 50 0 0 12 0.0000 4 180 1125 7200 6390 mirror objects?\001
+-6
+6 7500 6600 9150 7050
+4 1 0 50 0 0 12 0.0000 4 180 1515 8325 6750 [Does region have a\001
+4 1 0 50 0 0 12 0.0000 4 180 1500 8325 6990 capacitycontroller?]\001
+-6
+6 7725 7500 9750 8025
+6 7875 7575 9675 7725
+4 1 0 50 0 0 12 0.0000 4 135 1680 8775 7725 Invoke the controller's\001
+-6
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 9750 8025 9750 7500 7725 7500 7725 8025 9750 8025
+4 1 0 50 0 0 12 0.0000 4 180 1635 8775 7965 beforeObjectAdded()\001
+-6
+6 6525 8775 8175 9300
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 6600 9300 6600 8775 8100 8775 8100 9300 6600 9300
+4 1 0 50 0 0 12 0.0000 4 180 1530 7350 9000 (Request and) store\001
+4 1 0 50 0 0 12 0.0000 4 180 1095 7350 9240 value in region\001
+-6
+6 4575 12375 5025 13050
+6 4575 12600 5025 13050
+6 4650 12675 4950 12975
+1 3 0 1 0 0 50 0 20 0.000 1 0.0000 4800 12825 106 106 4800 12825 4906 12825
+-6
+1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 4800 12825 168 168 4800 12825 4725 12675
+-6
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4800 12375 4800 12675
+-6
+6 6900 9900 9450 12000
+6 7200 10875 9150 11400
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 9150 10875 9150 11400 7200 11400 7200 10875 9150 10875
+4 1 0 50 0 0 12 0.0000 4 135 1530 8175 11100 Invoke the listener's\001
+4 1 0 50 0 0 12 0.0000 4 180 1710 8175 11340 objectAdded() method\001
+-6
+6 7500 9900 9450 10350
+6 7500 9900 9450 10350
+4 1 0 50 0 0 12 0.0000 4 180 1860 8475 10050 [Does this entry have an\001
+4 1 0 50 0 0 12 0.0000 4 180 1680 8475 10290 object event listener?]\001
+-6
+-6
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 7575 10425 7425 10275 7275 10425 7425 10575 7575 10425
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 7575 10425 8100 10425 8100 10875
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 7575 11850 7425 11700 7275 11850 7425 12000 7575 11850
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 8100 11400 8100 11850 7575 11850
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 7275 10425 6900 10425 6900 11850 7275 11850
+-6
+6 225 7650 1875 8100
+4 1 0 50 0 0 12 0.0000 4 180 1140 1050 7800 [Was the entry\001
+4 1 0 50 0 0 12 0.0000 4 180 1530 1050 8040 previously present?]\001
+-6
+6 150 8625 1950 9150
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 1950 9150 1950 8625 150 8625 150 9150 1950 9150
+4 1 0 50 0 0 12 0.0000 4 135 1530 1050 8850 Invoke the listener's\001
+4 1 0 50 0 0 12 0.0000 4 180 1320 1050 9090 objectReplaced()\001
+-6
+6 2250 8625 3900 9150
+2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 2250 8625 2250 9150 3900 9150 3900 8625 2250 8625
+4 1 0 50 0 0 12 0.0000 4 135 1530 3075 8850 Invoke the listener's\001
+4 1 0 50 0 0 12 0.0000 4 180 1110 3075 9090 objectAdded()\001
+-6
+6 1200 6975 3150 7425
+6 1200 6975 3150 7425
+4 1 0 50 0 0 12 0.0000 4 180 1860 2175 7125 [Does this entry have an\001
+4 1 0 50 0 0 12 0.0000 4 180 1680 2175 7365 object event listener?]\001
+-6
+-6
+6 3675 10575 4725 11025
+4 1 0 50 0 0 12 0.0000 4 180 960 4200 10725 [Was an ack\001
+4 1 0 50 0 0 12 0.0000 4 180 810 4200 10965 requested]\001
+-6
+6 1650 2100 3300 2550
+4 1 0 50 0 0 12 0.0000 4 180 1605 2475 2250 [Does region have an\001
+4 1 0 50 0 0 12 0.0000 4 180 1500 2475 2490 eviction controller?]\001
+-6
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3900 2025 3375 2025 3375 2550
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5550 2700 5400 2550 5250 2700 5400 2850 5550 2700
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 4200 2025 5400 2025 5400 2550
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 5550 2700 6375 2700 6375 3150
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 6525 4350 6375 4200 6225 4350 6375 4500 6525 4350
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 6525 4350 7500 4350 7500 4800
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 6375 4200 6375 3675
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 6525 5700 6375 5550 6225 5700 6375 5850 6525 5700
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 7500 5325 7500 5700 6525 5700
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 6375 5850 6375 6450
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 6225 4350 5850 4350 5850 5700 6225 5700
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 5250 2700 4800 2700 4800 10200
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3525 2700 3375 2550 3225 2700 3375 2850 3525 2700
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3225 2700 2400 2700 2400 3375
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 6225 6600 5850 6600 5850 10350 4950 10350
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 3375 6825 3375 6450
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4950 10350 4800 10200 4650 10350 4800 10500 4950 10350
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 4800 10500 4800 10950
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4950 11100 4800 10950 4650 11100 4800 11250 4950 11100
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 4650 11100 4200 11100 4200 11400
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4950 12000 4800 11850 4650 12000 4800 12150 4950 12000
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 4200 11700 4200 12000 4650 12000
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 4950 11100 5325 11100 5325 12000 4950 12000
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3900 2025 4050 1875 4200 2025 4050 2175 3900 2025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 4050 1875 4050 1350
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3525 5475 3375 5325 3225 5475 3375 5625 3525 5475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2550 3525 2400 3375 2250 3525 2400 3675 2550 3525
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2250 3525 1275 3525 1275 4050
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2550 3525 3450 3525 3450 4050
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2550 5025 2400 4875 2250 5025 2400 5175 2550 5025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 1275 4650 1275 5025 2250 5025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3525 4650 3525 5025 2550 5025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 3525 2700 4650 2700 4650 5475 3525 5475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2400 5175 2400 5475 3225 5475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 3375 5625 3375 5925
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 6525 6600 6375 6450 6225 6600 6375 6750 6525 6600
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 6525 6600 7350 6600 7350 6975
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 7500 7125 7350 6975 7200 7125 7350 7275 7500 7125
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 7500 7125 8700 7125 8700 7500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 7500 8250 7350 8100 7200 8250 7350 8400 7500 8250
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 8700 8025 8700 8250 7500 8250
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 7200 7125 6900 7125 6900 8250 7200 8250
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 7350 8400 7350 8775
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 7350 9825 7350 9300
+2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4575 12375 5100 12375
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 4800 12150 4800 12375
+2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 7050 9825 7575 9825
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 7425 10275 7425 9825
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 7125 9825 7125 10125 5850 10125
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 4
+	0 0 1.00 120.00 120.00
+	 5025 12375 5025 12150 7425 12150 7425 12000
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 3225 7350 3225 6825
+2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3075 6825 3600 6825
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3075 7500 3225 7350 3375 7500 3225 7650 3075 7500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 3375 7500 4050 7500 4050 9900 3225 9900
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 1950 8175 2100 8025 2250 8175 2100 8325 1950 8175
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2250 8175 3000 8175 3000 8625
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 1950 8175 1050 8175 1050 8625
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 1050 9150 1050 9375 1950 9375
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3000 9150 3000 9375 2250 9375
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 1950 9375 2100 9225 2250 9375 2100 9525 1950 9375
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 2925 9900 3075 9750 3225 9900 3075 10050 2925 9900
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 2100 9525 2100 9900 2925 9900
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 5
+	0 0 1.00 120.00 120.00
+	 3450 6825 3450 7125 4350 7125 4350 10350 4650 10350
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
+	0 0 1.00 120.00 120.00
+	 3075 7500 2100 7500 2100 8025
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
+	0 0 1.00 120.00 120.00
+	 3075 10050 3075 12150 4650 12150 4650 12375
+4 1 0 50 0 0 12 0.0000 4 180 1815 6450 2550 [Is the region mirrored?]\001
+4 1 0 50 0 0 12 0.0000 4 180 1665 3000 1800 [Is the entry defined?]\001
+4 1 0 50 0 0 12 0.0000 4 180 435 4500 1800 [else]\001
+4 1 0 50 0 0 12 0.0000 4 180 1680 1350 3375 [Is the entry present?]\001
+4 1 0 50 0 0 12 0.0000 4 180 435 3600 7425 [else]\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/jcache-update-message-flow.pdf
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/jcache-update-message-flow.pdf b/geode-core/src/main/resources/javadoc-images/jcache-update-message-flow.pdf
new file mode 100644
index 0000000..70c38ff
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/jcache-update-message-flow.pdf differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/merge-log-files.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/merge-log-files.fig b/geode-core/src/main/resources/javadoc-images/merge-log-files.fig
new file mode 100644
index 0000000..50dfcc0
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/merge-log-files.fig
@@ -0,0 +1,153 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 3000 2775 6075 3600
+6 4725 2775 5325 3075
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4725 2775 5325 2775 5325 3075 4725 3075 4725 2775
+4 0 0 50 0 -1 12 0.0000 4 135 495 4800 3000 Reader\001
+-6
+6 5625 3300 6075 3600
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5625 3300 6075 3300 6075 3600 5625 3600 5625 3300
+4 0 0 50 0 -1 12 0.0000 4 135 270 5700 3525 File\001
+-6
+6 3000 3300 4200 3525
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3150 3300 3150 3525
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3300 3300 3300 3525
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3450 3300 3450 3525
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3600 3300 3600 3525
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3750 3300 3750 3525
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3900 3300 3900 3525
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4050 3300 4050 3525
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3000 3300 4200 3300 4200 3525 3000 3525 3000 3300
+-6
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 5850 3300 5325 2925
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 4725 2925 4200 3375
+-6
+6 3000 3750 6075 4575
+6 4725 3750 5325 4050
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4725 3750 5325 3750 5325 4050 4725 4050 4725 3750
+4 0 0 50 0 -1 12 0.0000 4 135 495 4800 3975 Reader\001
+-6
+6 5625 4275 6075 4575
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5625 4275 6075 4275 6075 4575 5625 4575 5625 4275
+4 0 0 50 0 -1 12 0.0000 4 135 270 5700 4500 File\001
+-6
+6 3000 4275 4200 4500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3150 4275 3150 4500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3300 4275 3300 4500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3450 4275 3450 4500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3600 4275 3600 4500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3750 4275 3750 4500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3900 4275 3900 4500
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4050 4275 4050 4500
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3000 4275 4200 4275 4200 4500 3000 4500 3000 4275
+-6
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 5850 4275 5325 3900
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 4725 3900 4200 4350
+-6
+6 3000 4725 6075 5550
+6 4725 4725 5325 5025
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 4725 4725 5325 4725 5325 5025 4725 5025 4725 4725
+4 0 0 50 0 -1 12 0.0000 4 135 495 4800 4950 Reader\001
+-6
+6 5625 5250 6075 5550
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5625 5250 6075 5250 6075 5550 5625 5550 5625 5250
+4 0 0 50 0 -1 12 0.0000 4 135 270 5700 5475 File\001
+-6
+6 3000 5250 4200 5475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3150 5250 3150 5475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3300 5250 3300 5475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3450 5250 3450 5475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3600 5250 3600 5475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3750 5250 3750 5475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 3900 5250 3900 5475
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
+	 4050 5250 4050 5475
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3000 5250 4200 5250 4200 5475 3000 5475 3000 5250
+-6
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 5850 5250 5325 4875
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 4725 4875 4200 5325
+-6
+6 1050 4275 1650 4575
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 1050 4275 1650 4275 1650 4575 1050 4575 1050 4275
+4 0 0 50 0 -1 12 0.0000 4 135 435 1125 4500 Sorter\001
+-6
+6 900 5700 1950 6000
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 900 5700 1950 5700 1950 6000 900 6000 900 5700
+4 0 0 50 0 -1 12 0.0000 4 180 870 975 5925 Merged File\001
+-6
+6 2325 5925 5400 6375
+4 0 0 50 0 1 12 0.0000 4 180 3045 2325 6315 keep the VM's heap from getting too large.\001
+4 0 0 50 0 1 12 0.0000 4 180 2685 2325 6075 The size of the queues are bounded to\001
+-6
+6 1650 3600 2175 3900
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 1650 3600 2175 3600 2175 3900 1650 3900 1650 3600
+4 0 0 50 0 -1 12 0.0000 4 180 390 1725 3825 Entry\001
+-6
+6 3900 2775 4425 3075
+2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3900 2775 4425 2775 4425 3075 3900 3075 3900 2775
+4 0 0 50 0 -1 12 0.0000 4 180 390 3975 3000 Entry\001
+-6
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 3000 3375 1650 4425
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 3000 4425 1650 4425
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 3000 5325 1650 4425
+2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 1350 4575 1350 5700

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/merge-log-files.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/merge-log-files.gif b/geode-core/src/main/resources/javadoc-images/merge-log-files.gif
new file mode 100644
index 0000000..59b9ec5
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/merge-log-files.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/partitioned-regions.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/partitioned-regions.fig b/geode-core/src/main/resources/javadoc-images/partitioned-regions.fig
new file mode 100644
index 0000000..bef603d
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/partitioned-regions.fig
@@ -0,0 +1,255 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 8925 1800 11175 4125
+6 9150 2250 10950 3675
+6 9225 2775 9975 3450
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
+	 9225 2775 9975 2775 9975 3450 9225 3450 9225 2775
+4 0 0 50 -1 0 12 0.0000 4 135 615 9300 3000 Bucket0\001
+-6
+6 10125 2775 10875 3450
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
+	 10125 2775 10875 2775 10875 3450 10125 3450 10125 2775
+4 0 0 50 -1 0 12 0.0000 4 135 615 10200 3000 Bucket2\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 9150 2250 10950 2250 10950 3675 9150 3675 9150 2250
+4 0 0 50 -1 0 12 0.0000 4 135 735 9675 2475 Partition1\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 8925 1800 11175 1800 11175 4125 8925 4125 8925 1800
+4 0 0 50 -1 0 12 0.0000 4 135 1350 9225 2025 Cache Server VM\001
+4 0 0 50 -1 0 12 0.0000 4 135 2070 9075 3975 maxPartitionedData = 1000\001
+-6
+6 6750 4200 7950 4875
+2 4 0 2 0 7 50 -1 -1 0.000 0 0 7 0 0 5
+	 7875 4800 6825 4800 6825 4275 7875 4275 7875 4800
+4 1 0 50 -1 0 12 0.0000 4 135 855 7350 4500 Distributed\001
+4 1 0 50 -1 0 12 0.0000 4 180 570 7350 4725 System\001
+-6
+6 4200 1800 8250 3975
+6 6225 2175 8175 3600
+6 6300 2475 7125 3525
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 6525 2775 6825 2775 6825 3225 6525 3225 6525 2775
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6675 2775 6675 3225
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6525 2850 6825 2850
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6525 2925 6825 2925
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6525 3000 6825 3000
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6525 3075 6825 3075
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6525 3150 6825 3150
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 6300 2475 7125 2475 7125 3525 6300 3525 6300 2475
+4 0 0 50 -1 0 12 0.0000 4 135 615 6375 2700 Bucket0\001
+4 0 0 50 -1 0 12 0.0000 4 135 690 6375 3450 size = 20\001
+-6
+6 7275 2475 8100 3525
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7500 2775 7800 2775 7800 3225 7500 3225 7500 2775
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7650 2775 7650 3225
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7500 2850 7800 2850
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7500 2925 7800 2925
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7500 3000 7800 3000
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7500 3075 7800 3075
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7500 3150 7800 3150
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7275 2475 8100 2475 8100 3525 7275 3525 7275 2475
+4 0 0 50 -1 0 12 0.0000 4 135 615 7350 2700 Bucket2\001
+4 0 0 50 -1 0 12 0.0000 4 135 690 7350 3450 size = 45\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 6225 2175 8175 2175 8175 3600 6225 3600 6225 2175
+4 0 0 50 -1 0 12 0.0000 4 135 735 6345 2400 Partition1\001
+-6
+6 4350 3150 5850 3825
+6 4350 3150 5850 3825
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 5100 3525 5100 3750
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4650 3525 5550 3525 5550 3750 4650 3750 4650 3525
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4350 3150 5850 3150 5850 3825 4350 3825 4350 3150
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 4875 3525 4875 3750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 5325 3525 5325 3750
+4 0 0 50 -1 0 12 0.0000 4 180 1230 4485 3375 BucketDirectory\001
+-6
+-6
+6 4800 2325 5250 2925
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 4800 2475 5250 2475
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 4800 2625 5250 2625
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 4800 2775 5250 2775
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 5025 2325 5025 2925
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4800 2325 5250 2325 5250 2925 4800 2925 4800 2325
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4200 1800 8250 1800 8250 3975 4200 3975 4200 1800
+4 0 0 50 -1 0 12 0.0000 4 180 1200 5550 2025 Application VM\001
+4 0 0 50 -1 0 12 0.0000 4 135 2070 6000 3825 maxPartitionedData = 1000\001
+-6
+6 5400 5250 8250 7425
+6 6225 5625 8175 7050
+6 6300 5925 7125 6975
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 6525 6225 6825 6225 6825 6675 6525 6675 6525 6225
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6675 6225 6675 6675
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6525 6300 6825 6300
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6525 6375 6825 6375
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6525 6450 6825 6450
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6525 6525 6825 6525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6525 6600 6825 6600
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 6300 5925 7125 5925 7125 6975 6300 6975 6300 5925
+4 0 0 50 -1 0 12 0.0000 4 135 615 6375 6150 Bucket1\001
+4 0 0 50 -1 0 12 0.0000 4 135 690 6375 6900 size = 34\001
+-6
+6 7275 5925 8100 6975
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7500 6225 7800 6225 7800 6675 7500 6675 7500 6225
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7650 6225 7650 6675
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7500 6300 7800 6300
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7500 6375 7800 6375
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7500 6450 7800 6450
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7500 6525 7800 6525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7500 6600 7800 6600
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7275 5925 8100 5925 8100 6975 7275 6975 7275 5925
+4 0 0 50 -1 0 12 0.0000 4 135 615 7350 6150 Bucket3\001
+4 0 0 50 -1 0 12 0.0000 4 135 690 7350 6900 size = 12\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 6225 5625 8175 5625 8175 7050 6225 7050 6225 5625
+4 0 0 50 -1 0 12 0.0000 4 135 735 6345 5850 Partition2\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 5400 5250 8250 5250 8250 7425 5400 7425 5400 5250
+4 0 0 50 -1 0 12 0.0000 4 135 1350 5550 5475 Cache Server VM\001
+4 0 0 50 -1 0 12 0.0000 4 135 2070 6000 7275 maxPartitionedData = 1000\001
+-6
+6 2325 4125 4875 5775
+6 3225 4575 4725 5250
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 3975 4950 3975 5175
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 3525 4950 4425 4950 4425 5175 3525 5175 3525 4950
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 3225 4575 4725 4575 4725 5250 3225 5250 3225 4575
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 3750 4950 3750 5175
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 4200 4950 4200 5175
+4 0 0 50 -1 0 12 0.0000 4 180 1230 3360 4800 BucketDirectory\001
+-6
+6 2625 4575 3075 5175
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 2625 4725 3075 4725
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 2625 4875 3075 4875
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 2625 5025 3075 5025
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 2850 4575 2850 5175
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 2625 4575 3075 4575 3075 5175 2625 5175 2625 4575
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 2325 4125 4875 4125 4875 5775 2325 5775 2325 4125
+4 0 0 50 -1 0 12 0.0000 4 180 1200 2475 4350 Application VM\001
+4 0 0 50 -1 0 12 0.0000 4 135 1800 2550 5550 maxPartitionedData = 0\001
+-6
+6 8925 5100 11175 7425
+6 9150 5550 10950 6975
+6 9225 6075 9975 6750
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
+	 9225 6075 9975 6075 9975 6750 9225 6750 9225 6075
+4 0 0 50 -1 0 12 0.0000 4 135 615 9300 6300 Bucket1\001
+-6
+6 10125 6075 10875 6750
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
+	 10125 6075 10875 6075 10875 6750 10125 6750 10125 6075
+4 0 0 50 -1 0 12 0.0000 4 135 615 10200 6300 Bucket3\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 9150 5550 10950 5550 10950 6975 9150 6975 9150 5550
+4 0 0 50 -1 0 12 0.0000 4 135 735 9675 5775 Partition2\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 8925 5100 11175 5100 11175 7425 8925 7425 8925 5100
+4 0 0 50 -1 0 12 0.0000 4 135 1350 9225 5325 Cache Server VM\001
+4 0 0 50 -1 0 12 0.0000 4 135 2070 9075 7275 maxPartitionedData = 1000\001
+-6
+2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
+	 6825 4500 4875 4500
+2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
+	 7275 4275 7275 3975
+2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
+	 7275 4800 7275 5250
+2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
+	 7875 4350 8925 3825
+2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
+	 7875 4800 8925 5400
+2 1 1 2 0 7 50 -1 -1 4.500 0 0 -1 0 0 2
+	 8475 975 8475 8175
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 4725 3600 6300 2625
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 4950 3600 6525 5925
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 5400 3600 7650 5925
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 5175 3600 7275 2700
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 3675 5025 6300 2850
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 3825 5100 6300 6825
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 4350 5100 7275 6675
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 4125 5025 7275 3000
+4 0 0 50 -1 0 12 0.0000 4 135 735 7650 1125 Machine1\001
+4 0 0 50 -1 0 12 0.0000 4 135 735 8625 1125 Machine2\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/partitioned-regions.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/partitioned-regions.gif b/geode-core/src/main/resources/javadoc-images/partitioned-regions.gif
new file mode 100644
index 0000000..b3a2baf
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/partitioned-regions.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/turks.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/turks.fig b/geode-core/src/main/resources/javadoc-images/turks.fig
new file mode 100644
index 0000000..f45177c
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/turks.fig
@@ -0,0 +1,128 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 3825 2025 5025 3225
+6 4050 2625 4800 3150
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4050 3150 4800 3150 4800 2625 4050 2625 4050 3150
+4 1 0 50 -1 -1 12 0.0000 4 135 540 4425 2850 Current\001
+4 1 0 50 -1 -1 12 0.0000 4 135 555 4425 3090 Grantor\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 3825 2025 5025 2025 5025 3225 3825 3225 3825 2025
+4 0 0 50 -1 -1 12 0.0000 4 180 945 3975 2250 pippin:12002\001
+-6
+6 5625 2025 6825 3225
+6 5925 2550 6525 3000
+4 1 0 50 -1 -1 12 0.0000 4 180 495 6225 2700 Young\001
+4 1 0 50 -1 -1 12 0.0000 4 135 480 6225 2940 Turk 1\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 5850 2475 6600 2475 6600 3075 5850 3075 5850 2475
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 5625 2025 6825 2025 6825 3225 5625 3225 5625 2025
+4 0 0 50 -1 -1 12 0.0000 4 180 945 5775 2250 pippin:12003\001
+-6
+6 7425 2025 8625 3225
+6 7725 2550 8325 3000
+4 1 0 50 -1 -1 12 0.0000 4 180 495 8025 2700 Young\001
+4 1 0 50 -1 -1 12 0.0000 4 135 480 8025 2940 Turk 2\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7650 2475 8400 2475 8400 3075 7650 3075 7650 2475
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7425 2025 8625 2025 8625 3225 7425 3225 7425 2025
+4 0 0 50 -1 -1 12 0.0000 4 180 945 7575 2250 pippin:12004\001
+-6
+6 9225 2025 10425 3225
+6 9525 2550 10125 3000
+4 1 0 50 -1 -1 12 0.0000 4 180 495 9825 2700 Young\001
+4 1 0 50 -1 -1 12 0.0000 4 135 480 9825 2940 Turk 3\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 9450 2475 10200 2475 10200 3075 9450 3075 9450 2475
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 9225 2025 10425 2025 10425 3225 9225 3225 9225 2025
+4 0 0 50 -1 -1 12 0.0000 4 180 945 9375 2250 pippin:12005\001
+-6
+6 1050 2100 3075 2925
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 1050 2925 3075 2925 3075 2100 1050 2100 1050 2925
+4 0 0 50 -1 -1 12 0.0000 4 180 1860 1125 2850 "locks1" -> pippin:12005\001
+4 0 0 50 -1 -1 16 0.0000 4 165 510 1725 2400 Elder\001
+-6
+6 3825 4125 5025 5325
+6 4050 4725 4800 5250
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4050 5250 4800 5250 4800 4725 4050 4725 4050 5250
+4 1 0 50 -1 -1 12 0.0000 4 135 540 4425 4950 Current\001
+4 1 0 50 -1 -1 12 0.0000 4 135 555 4425 5190 Grantor\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 3825 4125 5025 4125 5025 5325 3825 5325 3825 4125
+4 0 0 50 -1 -1 12 0.0000 4 180 945 3975 4350 pippin:12002\001
+-6
+6 5625 4125 6825 5325
+6 5925 4650 6525 5100
+4 1 0 50 -1 -1 12 0.0000 4 180 495 6225 4800 Young\001
+4 1 0 50 -1 -1 12 0.0000 4 135 480 6225 5040 Turk 1\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 5850 4575 6600 4575 6600 5175 5850 5175 5850 4575
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 5625 4125 6825 4125 6825 5325 5625 5325 5625 4125
+4 0 0 50 -1 -1 12 0.0000 4 180 945 5775 4350 pippin:12003\001
+-6
+6 9225 4125 10425 5325
+6 9525 4650 10125 5100
+4 1 0 50 -1 -1 12 0.0000 4 180 495 9825 4800 Young\001
+4 1 0 50 -1 -1 12 0.0000 4 135 480 9825 5040 Turk 3\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 9450 4575 10200 4575 10200 5175 9450 5175 9450 4575
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 9225 4125 10425 4125 10425 5325 9225 5325 9225 4125
+4 0 0 50 -1 -1 12 0.0000 4 180 945 9375 4350 pippin:12005\001
+-6
+6 1050 4200 3075 5025
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 1050 5025 3075 5025 3075 4200 1050 4200 1050 5025
+4 0 0 50 -1 -1 12 0.0000 4 180 1860 1125 4950 "locks1" -> pippin:12005\001
+4 0 0 50 -1 -1 16 0.0000 4 165 510 1725 4500 Elder\001
+-6
+6 7500 4425 8550 4875
+4 1 0 50 -1 1 12 0.0000 4 180 960 8025 4575 pippin:12004\001
+4 1 0 50 -1 1 12 0.0000 4 135 555 8025 4815 crashes\001
+-6
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 5475 1950 5475 1800 8775 1800 8775 1950
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 5850 2850 4800 2850
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 7650 2850 6600 2850
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 9450 2850 8400 2850
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 5850 4950 4800 4950
+2 1 0 5 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 975 3675 10650 3675
+4 0 0 50 -1 1 12 0.0000 4 180 3045 5625 1650 Have given up dreams of bcoming grantor\001
+4 0 0 50 -1 -1 12 0.0000 4 135 285 5175 2700 xfer\001
+4 0 0 50 -1 -1 12 0.0000 4 135 285 7050 2700 xfer\001
+4 0 0 50 -1 -1 12 0.0000 4 135 285 8775 2700 xfer\001
+4 0 0 50 -1 -1 12 0.0000 4 135 285 5175 4800 xfer\001
+4 0 0 50 -1 1 12 0.0000 4 180 1245 5775 5700 Stops xfer. knows\001
+4 0 0 50 -1 1 12 0.0000 4 135 1035 5775 5940 it will never be\001
+4 0 0 50 -1 1 12 0.0000 4 150 555 5775 6180 grantor\001
+4 0 0 50 -1 1 12 0.0000 4 180 1275 9300 5700 Initiates recovery,\001
+4 0 0 50 -1 1 12 0.0000 4 180 1215 9300 5940 becomes grantor\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/turks.jpg
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/turks.jpg b/geode-core/src/main/resources/javadoc-images/turks.jpg
new file mode 100644
index 0000000..5c66385
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/turks.jpg differ


[53/54] [abbrv] incubator-geode git commit: GEODE-17: WIP integrating Pulse with new security

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTest.java
deleted file mode 100644
index d65d893..0000000
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTest.java
+++ /dev/null
@@ -1,1038 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package com.vmware.gemfire.tools.pulse.tests;
-
-import com.gemstone.gemfire.management.internal.JettyHelper;
-import com.gemstone.gemfire.test.junit.categories.UITest;
-import junit.framework.Assert;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.FixMethodOrder;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runners.MethodSorters;
-import org.openqa.selenium.By;
-import org.openqa.selenium.JavascriptExecutor;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.firefox.FirefoxDriver;
-import org.openqa.selenium.interactions.Actions;
-import org.openqa.selenium.support.ui.ExpectedCondition;
-import org.openqa.selenium.support.ui.ExpectedConditions;
-import org.openqa.selenium.support.ui.WebDriverWait;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.DecimalFormat;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-@Category(UITest.class)
-@FixMethodOrder(MethodSorters.JVM)
-public class PulseTest {
-  private static String jmxPropertiesFile;
-  private static String path;
-
-  private static org.eclipse.jetty.server.Server jetty = null;
-  private static Server server = null;
-  private static String pulseURL = null;
-  public static WebDriver driver;
-  private static final String userName = "admin";
-  private static final String pasword = "admin";
-
-  /* Constants for executing Data Browser queries */
-  public static final String QUERY_TYPE_ONE = "query1";
-  public static final String QUERY_TYPE_TWO = "query2";
-  public static final String QUERY_TYPE_THREE = "query3";
-  public static final String QUERY_TYPE_FOUR = "query4";
-  public static final String QUERY_TYPE_FIVE = "query5";
-  public static final String QUERY_TYPE_SIX = "query6";
-  public static final String QUERY_TYPE_SEVENE = "query7";
-
-  private static final String DATA_VIEW_LABEL = "Data View";
-  private static final String CLUSTER_VIEW_MEMBERS_ID = "clusterTotalMembersText";
-  private static final String CLUSTER_VIEW_SERVERS_ID = "clusterServersText";
-  private static final String CLUSTER_VIEW_LOCATORS_ID = "clusterLocatorsText";
-  private static final String CLUSTER_VIEW_REGIONS_ID = "clusterTotalRegionsText";
-  private static final String CLUSTER_CLIENTS_ID = "clusterClientsText";
-  private static final String CLUSTER_FUNCTIONS_ID = "clusterFunctions";
-  private static final String CLUSTER_UNIQUECQS_ID = "clusterUniqueCQs";
-  private static final String CLUSTER_SUBSCRIPTION_ID = "clusterSubscriptionsText";
-  private static final String CLUSTER_MEMORY_USAGE_ID = "currentMemoryUsage";
-  private static final String CLUSTER_THROUGHPUT_WRITES_ID = "currentThroughoutWrites";
-  private static final String CLUSTER_GCPAUSES_ID = "currentGCPauses";
-  private static final String CLUSTER_WRITEPERSEC_ID = "writePerSec";
-  private static final String CLUSTER_READPERSEC_ID = "readPerSec";
-  private static final String CLUSTER_QUERIESPERSEC_ID = "queriesPerSec";
-  private static final String CLUSTER_PROCEDURE_ID = "clusterTxnCommittedText";
-  private static final String CLUSTER_TXNCOMMITTED_ID = "clusterTxnCommittedText";
-  private static final String CLUSTER_TXNROLLBACK_ID = "clusterTxnRollbackText";
-  private static final String MEMBER_VIEW_MEMBERNAME_ID = "memberName";
-  private static final String MEMBER_VIEW_REGION_ID = "memberRegionsCount";
-  private static final String MEMBER_VIEW_THREAD_ID = "threads";
-  private static final String MEMBER_VIEW_SOCKETS_ID = "sockets";
-  private static final String MEMBER_VIEW_LOADAVG_ID = "loadAverage";
-  private static final String MEMBER_VIEW_LISTENINGPORT_ID = "receiverListeningPort";
-  private static final String MEMBER_VIEW_LINKTHROUGHPUT_ID = "receiverLinkThroughput";
-  private static final String MEMBER_VIEW_AVGBATCHLATENCY_ID = "receiverAvgBatchLatency";
-  private static final String MEMBER_VIEW_HEAPUSAGE_ID = "memberHeapUsageAvg";
-  private static final String MEMBER_VIEW_JVMPAUSES_ID = "memberGcPausesAvg";
-  private static final String MEMBER_VIEW_CPUUSAGE_ID = "memberCPUUsageValue";
-  private static final String MEMBER_VIEW_READPERSEC_ID = "memberGetsPerSecValue";
-  private static final String MEMBER_VIEW_WRITEPERSEC_ID = "memberPutsPerSecValue";
-  private static final String MEMBER_VIEW_OFFHEAPFREESIZE_ID = "offHeapFreeSize";
-  private static final String MEMBER_VIEW_OFFHEAPUSEDSIZE_ID = "offHeapUsedSize";
-  private static final String MEMBER_VIEW_CLIENTS_ID = "clusterClientsText";
-
-  private static final String REGION_NAME_LABEL = "regionName";
-  private static final String REGION_PATH_LABEL = "regionPath";
-  private static final String REGION_TYPE_LABEL = "regionType";
-  private static final String DATA_VIEW_WRITEPERSEC = "regionWrites";
-  private static final String DATA_VIEW_READPERSEC = "regionReads";
-  private static final String DATA_VIEW_EMPTYNODES = "regionEmptyNodes";
-  private static final String DATA_VIEW_ENTRYCOUNT = "regionEntryCount";
-  private static final String REGION_PERSISTENCE_LABEL = "regionPersistence";
-  private static final String DATA_VIEW_USEDMEMORY = "memoryUsed";
-  private static final String DATA_VIEW_TOTALMEMORY = "totalMemory";
-  
-  private static final String DATA_BROWSER_LABEL = "Data Browser";
-  private static final String DATA_BROWSER_REGIONName1 = "treeDemo_1_span";
-  private static final String DATA_BROWSER_REGIONName2 = "treeDemo_2_span";
-  private static final String DATA_BROWSER_REGIONName3 = "treeDemo_3_span";
-  private static final String DATA_BROWSER_REGION1_CHECKBOX = "treeDemo_1_check";
-  private static final String DATA_BROWSER_REGION2_CHECKBOX = "treeDemo_2_check";
-  private static final String DATA_BROWSER_REGION3_CHECKBOX = "treeDemo_3_check";
-  private static final String DATA_BROWSER_COLOCATED_REGION = "Colocated Regions";
-  private static final String DATA_BROWSER_COLOCATED_REGION_NAME1 = "treeDemo_1_span";
-  private static final String DATA_BROWSER_COLOCATED_REGION_NAME2 = "treeDemo_2_span";
-  private static final String DATA_BROWSER_COLOCATED_REGION_NAME3 = "treeDemo_3_span";
-
-  private static final String QUERY_STATISTICS_LABEL = "Query Statistics";
-  private static final String CLUSTER_VIEW_LABEL = "Cluster View";
-  private static final String CLUSTER_VIEW_GRID_ID = "default_treemap_button";
-  private static final String SERVER_GROUP_GRID_ID = "servergroups_treemap_button";
-  private static final String REDUNDANCY_GRID_ID = "redundancyzones_treemap_button";
-  private static final String MEMBER_DROPDOWN_ID = "Members";
-  private static final String DATA_DROPDOWN_ID = "Data";
-
-  @BeforeClass
-  public static void setUpBeforeClass() throws Exception {
-    System.setProperty("spring.profiles.active", "pulse.authentication.gemfire");
-
-    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-    jmxPropertiesFile = classLoader.getResource("test.properties").getPath();
-    path = getPulseWarPath();
-    server = Server.createServer(9999, jmxPropertiesFile);
-
-    String host = "localhost";// InetAddress.getLocalHost().getHostAddress();
-    int port = 8080;
-    String context = "/pulse";
-
-    jetty = JettyHelper.initJetty(host, port, false, false, null, null, null);
-    JettyHelper.addWebApplication(jetty, context, getPulseWarPath());
-    jetty.start();
-
-    pulseURL = "http://" + host + ":" + port + context;
-
-    Thread.sleep(5000); // wait till the container settles down
-
-    driver = new FirefoxDriver();
-    driver.manage().window().maximize();
-    driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
-    driver.get(pulseURL);
-    WebElement userNameElement = driver.findElement(By.id("user_name"));
-    WebElement passwordElement = driver.findElement(By.id("user_password"));
-    userNameElement.sendKeys(userName);
-    passwordElement.sendKeys(pasword);
-    passwordElement.submit();
-
-    Thread.sleep(3000);
-    WebElement userNameOnPulsePage = (new WebDriverWait(driver, 10))
-        .until(new ExpectedCondition<WebElement>() {
-          @Override
-          public WebElement apply(WebDriver d) {
-            return d.findElement(By.id("userName"));
-          }
-        });
-    Assert.assertNotNull(userNameOnPulsePage);
-    driver.navigate().refresh();
-    Thread.sleep(7000);
-  }
-
-  @AfterClass
-  public static void tearDownAfterClass() throws Exception {
-    driver.close();
-    jetty.stop();
-  }
-
-  public static String getPulseWarPath() throws Exception {
-    String warPath = null;
-    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-    InputStream inputStream = classLoader.getResourceAsStream("GemFireVersion.properties");
-    Properties properties = new Properties();
-    properties.load(inputStream);
-    String version = properties.getProperty("Product-Version");
-    warPath = "geode-pulse-" + version + ".war";
-    String propFilePath = classLoader.getResource("GemFireVersion.properties").getPath();
-    warPath = propFilePath.substring(0, propFilePath.indexOf("generated-resources")) + "libs/" + warPath;
-    return warPath;
-  }
-
-  protected void searchByLinkAndClick(String linkText) {
-    WebElement element = By.linkText(linkText).findElement(driver);
-    Assert.assertNotNull(element);
-    element.click();
-  }
-
-  protected void searchByIdAndClick(String id) {
-    WebElement element = driver.findElement(By.id(id));
-    Assert.assertNotNull(element);
-    element.click();
-  }
-
-  protected void searchByClassAndClick(String Class) {
-    WebElement element = driver.findElement(By.className(Class));
-    Assert.assertNotNull(element);
-    element.click();
-  }
-
-  protected void searchByXPathAndClick(String xpath) {
-	WebElement element = driver.findElement(By.xpath(xpath));
-     Assert.assertNotNull(element);
-    element.click();
-  }
-
-  protected void waitForElementByClassName(final String className, int seconds) {
-    WebElement linkTextOnPulsePage1 = (new WebDriverWait(driver, seconds))
-        .until(new ExpectedCondition<WebElement>() {
-          @Override
-          public WebElement apply(WebDriver d) {
-            return d.findElement(By.className(className));
-          }
-        });
-    Assert.assertNotNull(linkTextOnPulsePage1);
-  }
-
-  protected void waitForElementById(final String id, int seconds) {
-    WebElement element = (new WebDriverWait(driver, 10))
-        .until(new ExpectedCondition<WebElement>() {
-          @Override
-          public WebElement apply(WebDriver d) {
-            return d.findElement(By.id(id));
-          }
-        });
-    Assert.assertNotNull(element);
-  }
-  
-  protected void scrollbarVerticalDownScroll() {
-    JavascriptExecutor js = (JavascriptExecutor) driver;
-    js.executeScript("javascript:window.scrollBy(250,700)");
-    WebElement pickerScroll = driver.findElement(By.className("jspDrag"));
-    WebElement pickerScrollCorner = driver.findElement(By
-        .className("jspCorner"));
-    Actions builder = new Actions(driver);
-    Actions movePicker = builder.dragAndDrop(pickerScroll, pickerScrollCorner); // pickerscroll
-                                                                                // is
-                                                                                // the
-                                                                                // webelement
-    movePicker.perform();
-  }
-
-  protected void scrollbarHorizontalRightScroll() {
-    JavascriptExecutor js = (JavascriptExecutor) driver;
-    js.executeScript("javascript:window.scrollBy(250,700)");
-    WebElement pickerScroll = driver
-        .findElement(By
-            .xpath("//div[@id='gview_queryStatisticsList']/div[3]/div/div[3]/div[2]/div"));
-    WebElement pickerScrollCorner = driver.findElement(By
-        .className("jspCorner"));
-    Actions builder = new Actions(driver);
-    Actions movePicker = builder.dragAndDrop(pickerScroll, pickerScrollCorner); // pickerscroll
-                                                                                // is
-                                                                                // the
-                                                                                // webelement
-    movePicker.perform();
-  }
-
-  
-  
-  @Test
-  public void testClusterLocatorCount() throws IOException {
-	searchByXPathAndClick(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
-    String clusterLocators = driver
-        .findElement(By.id(CLUSTER_VIEW_LOCATORS_ID)).getText();
-   
-    String totallocators = JMXProperties.getInstance().getProperty("server.S1.locatorCount");  
-    Assert.assertEquals(totallocators, clusterLocators);
-  }
-
- @Test
-  public void testClusterRegionCount() {
-    String clusterRegions = driver.findElement(By.id(CLUSTER_VIEW_REGIONS_ID))
-        .getText();
-    String totalregions = JMXProperties.getInstance().getProperty(
-        "server.S1.totalRegionCount");
-    Assert.assertEquals(totalregions, clusterRegions);
-  }
-
- @Test
-  public void testClusterMemberCount() {
-    String clusterMembers = driver.findElement(By.id(CLUSTER_VIEW_MEMBERS_ID))
-        .getText();
-    String totalMembers = JMXProperties.getInstance().getProperty(
-        "server.S1.memberCount");
-    Assert.assertEquals(totalMembers, clusterMembers);
-  }
-
- @Test
-  public void testClusterNumClient() {
-    String clusterClients = driver.findElement(By.id(CLUSTER_CLIENTS_ID))
-        .getText();
-    String totalclients = JMXProperties.getInstance().getProperty(
-        "server.S1.numClients");
-    Assert.assertEquals(totalclients, clusterClients);
-  }
-
-  @Test
-  public void testClusterNumRunningFunction() {
-    String clusterFunctions = driver.findElement(By.id(CLUSTER_FUNCTIONS_ID))
-        .getText();
-    String totalfunctions = JMXProperties.getInstance().getProperty(
-        "server.S1.numRunningFunctions");
-    Assert.assertEquals(totalfunctions, clusterFunctions);
-  }
-
-@Test
-  public void testClusterRegisteredCQCount() {
-    String clusterUniqueCQs = driver.findElement(By.id(CLUSTER_UNIQUECQS_ID))
-        .getText();
-    String totaluniqueCQs = JMXProperties.getInstance().getProperty(
-        "server.S1.registeredCQCount");
-    Assert.assertEquals(totaluniqueCQs, clusterUniqueCQs);
-  }
-
- @Test
-  public void testClusterNumSubscriptions() {
-    String clusterSubscriptions = driver.findElement(
-        By.id(CLUSTER_SUBSCRIPTION_ID)).getText();
-    String totalSubscriptions = JMXProperties.getInstance().getProperty(
-        "server.S1.numSubscriptions");
-    Assert.assertEquals(totalSubscriptions, clusterSubscriptions);
-  }
-
- @Test
-  public void testClusterJVMPausesWidget() {
-    String clusterJVMPauses = driver.findElement(By.id(CLUSTER_GCPAUSES_ID))
-        .getText();
-    String totalgcpauses = JMXProperties.getInstance().getProperty(
-        "server.S1.jvmPauses");
-    Assert.assertEquals(totalgcpauses, clusterJVMPauses);
-  }
-
-  @Test
-  public void testClusterAverageWritesWidget() {
-    String clusterWritePerSec = driver.findElement(
-        By.id(CLUSTER_WRITEPERSEC_ID)).getText();
-    String totalwritepersec = JMXProperties.getInstance().getProperty(
-        "server.S1.averageWrites");
-    Assert.assertEquals(totalwritepersec, clusterWritePerSec);
-  }
-
-  @Test
-  public void testClusterAverageReadsWidget() {
-    String clusterReadPerSec = driver.findElement(By.id(CLUSTER_READPERSEC_ID))
-        .getText();
-    String totalreadpersec = JMXProperties.getInstance().getProperty(
-        "server.S1.averageReads");
-    Assert.assertEquals(totalreadpersec, clusterReadPerSec);
-  }
-
-  @Test
-  public void testClusterQuerRequestRateWidget() {
-    String clusterQueriesPerSec = driver.findElement(
-        By.id(CLUSTER_QUERIESPERSEC_ID)).getText();
-    String totalqueriespersec = JMXProperties.getInstance().getProperty(
-        "server.S1.queryRequestRate");
-    Assert.assertEquals(totalqueriespersec, clusterQueriesPerSec);
-  }
-  
-  @Test
-  public void testClusterGridViewMemberID() throws InterruptedException {
-	  
-	 searchByIdAndClick("default_grid_button");	
-	 List<WebElement> elements = driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr")); //gives me 11 rows
-	 
-	 for(int memberCount = 1; memberCount<elements.size(); memberCount++){		  
-		  String memberId = driver.findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (memberCount + 1) + "]/td")).getText();		  
-		  String propertMemeberId= JMXProperties.getInstance().getProperty("member.M" + memberCount + ".id");		  
-		  Assert.assertEquals(memberId, propertMemeberId);
-	  }	 
-  }
-
-  @Test
-  public void testClusterGridViewMemberName() {
-	  searchByIdAndClick("default_grid_button"); 
-	  List<WebElement> elements = driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr"));  	  
-	  for (int memberNameCount = 1; memberNameCount < elements.size(); memberNameCount++) {
-		  String gridMemberName = driver.findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (memberNameCount + 1) + "]/td[2]")).getText();
-		  String memberName = JMXProperties.getInstance().getProperty("member.M" + memberNameCount + ".member");
-		  Assert.assertEquals(gridMemberName, memberName);
-    }
-  }
-  
-
-  @Test
-  public void testClusterGridViewMemberHost() {
-	  searchByIdAndClick("default_grid_button"); 
-	  List<WebElement> elements = driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr")); 	  
-    for (int memberHostCount = 1; memberHostCount < elements.size(); memberHostCount++) {
-      String MemberHost = driver.findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (memberHostCount + 1) + "]/td[3]")).getText();     
-      String gridMemberHost = JMXProperties.getInstance().getProperty("member.M" + memberHostCount + ".host");
-      Assert.assertEquals(gridMemberHost, MemberHost);
-    }
-  }
-
-  @Test
-  public void testClusterGridViewHeapUsage() {
-	searchByIdAndClick("default_grid_button"); 
-    for (int i = 1; i <= 3; i++) {
-      Float HeapUsage = Float.parseFloat(driver
-          .findElement(
-              By.xpath("//table[@id='memberList']/tbody/tr[" + (i + 1) + "]/td[5]")).getText());
-      Float gridHeapUsagestring = Float.parseFloat(JMXProperties.getInstance()
-          .getProperty("member.M" + i + ".UsedMemory"));
-     Assert.assertEquals(gridHeapUsagestring, HeapUsage);
-    }
-  }
-   
-  @Test
-  public void testClusterGridViewCPUUsage() {
-	searchByIdAndClick("default_grid_button"); 
-    for (int i = 1; i <= 3; i++) {
-      String CPUUsage = driver.findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (i + 1) + "]/td[6]")).getText();
-      String gridCPUUsage = JMXProperties.getInstance().getProperty("member.M" + i + ".cpuUsage");
-      gridCPUUsage = gridCPUUsage.trim();
-      Assert.assertEquals(gridCPUUsage, CPUUsage);
-    }
-  }
-
-
-  public void testRgraphWidget() throws InterruptedException {
-    searchByIdAndClick("default_rgraph_button");
-    Thread.sleep(7000);
-    searchByIdAndClick("h1");
-    Thread.sleep(500);
-    searchByIdAndClick("M1");
-    Thread.sleep(7000);
-  }
-
-  @Test  // region count in properties file is 2 and UI is 1
-  public void testMemberTotalRegionCount() throws InterruptedException{
-	testRgraphWidget();
-    String RegionCount = driver.findElement(By.id(MEMBER_VIEW_REGION_ID)).getText();  
-    String memberRegionCount = JMXProperties.getInstance().getProperty("member.M1.totalRegionCount");
-    Assert.assertEquals(memberRegionCount, RegionCount);
-  }
-
-  @Test
-  public void testMemberNumThread()throws InterruptedException {
-    String ThreadCount = driver.findElement(By.id(MEMBER_VIEW_THREAD_ID)).getText();    
-    String memberThreadCount = JMXProperties.getInstance().getProperty("member.M1.numThreads");   
-    Assert.assertEquals(memberThreadCount, ThreadCount);
-  }
-
-  @Test
-  public void testMemberTotalFileDescriptorOpen() throws InterruptedException {
-    String SocketCount = driver.findElement(By.id(MEMBER_VIEW_SOCKETS_ID))
-        .getText();
-    String memberSocketCount = JMXProperties.getInstance().getProperty(
-        "member.M1.totalFileDescriptorOpen");
-    Assert.assertEquals(memberSocketCount, SocketCount);
-  }
-
- @Test
-  public void testMemberLoadAverage() throws InterruptedException {	
-    String LoadAvg = driver.findElement(By.id(MEMBER_VIEW_LOADAVG_ID))
-        .getText();
-    String memberLoadAvg = JMXProperties.getInstance().getProperty(
-        "member.M1.loadAverage");
-    Assert.assertEquals(memberLoadAvg, LoadAvg);
-  }
-
-  @Ignore("WIP") // May be useful in near future
-  @Test
-  public void testOffHeapFreeSize(){	  
-	  
-    String OffHeapFreeSizeString = driver.findElement(
-        By.id(MEMBER_VIEW_OFFHEAPFREESIZE_ID)).getText();
-    String OffHeapFreeSizetemp = OffHeapFreeSizeString.replaceAll("[a-zA-Z]",
-        "");
-    float OffHeapFreeSize = Float.parseFloat(OffHeapFreeSizetemp);
-    float memberOffHeapFreeSize = Float.parseFloat(JMXProperties.getInstance()
-        .getProperty("member.M1.OffHeapFreeSize"));
-    if (memberOffHeapFreeSize < 1048576) {
-      memberOffHeapFreeSize = memberOffHeapFreeSize / 1024;
-
-    } else if (memberOffHeapFreeSize < 1073741824) {
-      memberOffHeapFreeSize = memberOffHeapFreeSize / 1024 / 1024;
-    } else {
-      memberOffHeapFreeSize = memberOffHeapFreeSize / 1024 / 1024 / 1024;
-    }
-    memberOffHeapFreeSize = Float.parseFloat(new DecimalFormat("##.##")
-        .format(memberOffHeapFreeSize));
-    Assert.assertEquals(memberOffHeapFreeSize, OffHeapFreeSize); 
- 
-  }
-
-  @Ignore("WIP") // May be useful in near future
-  @Test
-  public void testOffHeapUsedSize() throws InterruptedException {
-	 
-    String OffHeapUsedSizeString = driver.findElement(
-        By.id(MEMBER_VIEW_OFFHEAPUSEDSIZE_ID)).getText();
-    String OffHeapUsedSizetemp = OffHeapUsedSizeString.replaceAll("[a-zA-Z]",
-        "");
-    float OffHeapUsedSize = Float.parseFloat(OffHeapUsedSizetemp);
-    float memberOffHeapUsedSize = Float.parseFloat(JMXProperties.getInstance()
-        .getProperty("member.M1.OffHeapUsedSize"));
-    if (memberOffHeapUsedSize < 1048576) {
-      memberOffHeapUsedSize = memberOffHeapUsedSize / 1024;
-
-    } else if (memberOffHeapUsedSize < 1073741824) {
-      memberOffHeapUsedSize = memberOffHeapUsedSize / 1024 / 1024;
-    } else {
-      memberOffHeapUsedSize = memberOffHeapUsedSize / 1024 / 1024 / 1024;
-    }
-    memberOffHeapUsedSize = Float.parseFloat(new DecimalFormat("##.##")
-        .format(memberOffHeapUsedSize));
-    Assert.assertEquals(memberOffHeapUsedSize, OffHeapUsedSize);
-  }
-
-  @Test
-  public void testMemberJVMPauses(){
-   
-    String JVMPauses = driver.findElement(By.id(MEMBER_VIEW_JVMPAUSES_ID))
-        .getText();
-    String memberGcPausesAvg = JMXProperties.getInstance().getProperty(
-        "member.M1.JVMPauses");
-    Assert.assertEquals(memberGcPausesAvg, JVMPauses);
-  }
-
-  @Test
-  public void testMemberCPUUsage() {  
-    String CPUUsagevalue = driver.findElement(By.id(MEMBER_VIEW_CPUUSAGE_ID))
-        .getText();
-    String memberCPUUsage = JMXProperties.getInstance().getProperty(
-        "member.M1.cpuUsage");
-    Assert.assertEquals(memberCPUUsage, CPUUsagevalue);
-  }
-
-  @Test  // difference between UI and properties file
-  public void testMemberAverageReads() {	  
-    float ReadPerSec = Float.parseFloat(driver.findElement(By.id(MEMBER_VIEW_READPERSEC_ID)).getText());    
-    float memberReadPerSec = Float.parseFloat(JMXProperties.getInstance().getProperty("member.M1.averageReads"));
-    memberReadPerSec = Float.parseFloat(new DecimalFormat("##.##")
-    .format(memberReadPerSec));
-    Assert.assertEquals(memberReadPerSec, ReadPerSec);
-  }
-
- @Test
-  public void testMemberAverageWrites() throws InterruptedException {  
-    String WritePerSec = driver.findElement(By.id(MEMBER_VIEW_WRITEPERSEC_ID))
-        .getText();
-    String memberWritePerSec = JMXProperties.getInstance().getProperty(
-        "member.M1.averageWrites");
-    Assert.assertEquals(memberWritePerSec, WritePerSec);
-  }
- 
-
- @Test
-  public void testMemberGridViewData() throws InterruptedException {
-   searchByXPathAndClick(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
-   testRgraphWidget();
-   searchByXPathAndClick(PulseTestLocators.MemberDetailsView.gridButtonXpath);
-   // get the number of rows on the grid
-    List<WebElement> noOfRows = driver.findElements(By.xpath("//table[@id='memberRegionsList']/tbody/tr"));    
-    String MemberRegionName = driver.findElement(By.xpath("//table[@id='memberRegionsList']/tbody/tr[2]/td[1]")).getText();
-    String memberRegionName = JMXProperties.getInstance().getProperty("region.R1.name");
-    Assert.assertEquals(memberRegionName, MemberRegionName);
-
-    String MemberRegionType = driver.findElement(By.xpath("//table[@id='memberRegionsList']/tbody/tr[2]/td[2]")).getText();
-    String memberRegionType = JMXProperties.getInstance().getProperty("region.R1.regionType");
-    Assert.assertEquals(memberRegionType, MemberRegionType);
-    
-    String MemberRegionEntryCount = driver.findElement(By.xpath("//table[@id='memberRegionsList']/tbody/tr[2]/td[3]")).getText();
-    String memberRegionEntryCount = JMXProperties.getInstance().getProperty("regionOnMember./R1.M1.entryCount");
-    Assert.assertEquals(memberRegionEntryCount, MemberRegionEntryCount);
-  }
-
-@Test
-  public void testDropDownList() throws InterruptedException {
-	searchByIdAndClick("memberName");
-    searchByLinkAndClick("M3");
-    searchByIdAndClick("memberName");
-    searchByLinkAndClick("M2");
-  }
-
-  @Ignore("WIP")
-  @Test
-  public void testDataViewRegionName() throws InterruptedException {
-    searchByLinkAndClick(DATA_VIEW_LABEL);
-    Thread.sleep(7000);
-    searchByIdAndClick("default_grid_button");
-    String regionName = driver.findElement(By.id(REGION_NAME_LABEL)).getText();
-    String dataviewregionname = JMXProperties.getInstance().getProperty("region.R1.name");
-    Assert.assertEquals(dataviewregionname, regionName);
-  }
-
-  @Ignore("WIP")
-  @Test
-  public void testDataViewRegionPath() {
-    String regionPath = driver.findElement(By.id(REGION_PATH_LABEL)).getText();
-    String dataviewregionpath = JMXProperties.getInstance().getProperty(
-        "region.R1.fullPath");
-    Assert.assertEquals(dataviewregionpath, regionPath);
-  }
-
-  @Ignore("WIP")
-  @Test
-  public void testDataViewRegionType() {
-    String regionType = driver.findElement(By.id(REGION_TYPE_LABEL)).getText();
-    String dataviewregiontype = JMXProperties.getInstance().getProperty(
-        "region.R1.regionType");
-    Assert.assertEquals(dataviewregiontype, regionType);
-  }
-
-  @Ignore("WIP")
-  @Test
-  public void testDataViewEmptyNodes() {
-    String regionEmptyNodes = driver.findElement(By.id(DATA_VIEW_EMPTYNODES))
-        .getText();
-    String dataviewEmptyNodes = JMXProperties.getInstance().getProperty(
-        "region.R1.emptyNodes");
-    Assert.assertEquals(dataviewEmptyNodes, regionEmptyNodes);
-  }
-
-  @Ignore("WIP")
-  @Test
-  public void testDataViewSystemRegionEntryCount() {
-    String regionEntryCount = driver.findElement(By.id(DATA_VIEW_ENTRYCOUNT))
-        .getText();
-    String dataviewEntryCount = JMXProperties.getInstance().getProperty(
-        "region.R1.systemRegionEntryCount");
-    Assert.assertEquals(dataviewEntryCount, regionEntryCount);
-  }
-
-  @Ignore("WIP")
-  @Test
-  public void testDataViewPersistentEnabled() {
-    String regionPersistence = driver.findElement(
-        By.id(REGION_PERSISTENCE_LABEL)).getText();
-    String dataviewregionpersistence = JMXProperties.getInstance().getProperty(
-        "region.R1.persistentEnabled");
-    Assert.assertEquals(dataviewregionpersistence, regionPersistence);
-  }
-
-  @Ignore("WIP")
-  @Test
-  public void testDataViewDiskWritesRate() {
-    String regionWrites = driver.findElement(By.id(DATA_VIEW_WRITEPERSEC))
-        .getText();
-    String dataviewRegionWrites = JMXProperties.getInstance().getProperty(
-        "region.R1.diskWritesRate");
-    Assert.assertEquals(dataviewRegionWrites, regionWrites);
-  }
-
-  @Ignore("WIP")
-  @Test
-  public void testDataViewDiskReadsRate() {
-    String regionReads = driver.findElement(By.id(DATA_VIEW_READPERSEC))
-        .getText();
-    String dataviewRegionReads = JMXProperties.getInstance().getProperty(
-        "region.R1.diskReadsRate");
-    Assert.assertEquals(dataviewRegionReads, regionReads);
-  }
-
-  @Ignore("WIP")
-  @Test
-  public void testDataViewDiskUsage() {
-    String regionMemoryUsed = driver.findElement(By.id(DATA_VIEW_USEDMEMORY))
-        .getText();
-    String dataviewMemoryUsed = JMXProperties.getInstance().getProperty(
-        "region.R1.diskUsage");
-    Assert.assertEquals(dataviewMemoryUsed, regionMemoryUsed);
-    searchByLinkAndClick(QUERY_STATISTICS_LABEL);
-  }
-
-  @Ignore("WIP")
-  @Test
-  public void testDataViewGridValue() {
-    String DataViewRegionName = driver.findElement(
-        By.xpath("//*[id('6')/x:td[1]]")).getText();
-    String dataViewRegionName = JMXProperties.getInstance().getProperty(
-        "region.R1.name");
-    Assert.assertEquals(dataViewRegionName, DataViewRegionName);
-
-    String DataViewRegionType = driver.findElement(
-        By.xpath("//*[id('6')/x:td[2]")).getText();
-    String dataViewRegionType = JMXProperties.getInstance().getProperty(
-        "region.R2.regionType");
-    Assert.assertEquals(dataViewRegionType, DataViewRegionType);
-
-    String DataViewEntryCount = driver.findElement(
-        By.xpath("//*[id('6')/x:td[3]")).getText();
-    String dataViewEntryCount = JMXProperties.getInstance().getProperty(
-        "region.R2.systemRegionEntryCount");
-    Assert.assertEquals(dataViewEntryCount, DataViewEntryCount);
-
-    String DataViewEntrySize = driver.findElement(
-        By.xpath("//*[id('6')/x:td[4]")).getText();
-    String dataViewEntrySize = JMXProperties.getInstance().getProperty(
-        "region.R2.entrySize");
-    Assert.assertEquals(dataViewEntrySize, DataViewEntrySize);
-
-  }
-  
-  
-  public void loadDataBrowserpage() {
-	  searchByLinkAndClick(DATA_BROWSER_LABEL);
-	  //Thread.sleep(7000);
-  }
-  
-  @Test
-  public void testDataBrowserRegionName() throws InterruptedException {
-	  loadDataBrowserpage();
-	  String DataBrowserRegionName1 = driver.findElement(By.id(DATA_BROWSER_REGIONName1))
-			  .getText();
-	  String databrowserRegionNametemp1 = JMXProperties.getInstance().getProperty(
-		        "region.R1.name");
-	  String databrowserRegionName1 = databrowserRegionNametemp1.replaceAll("[\\/]", "");
-	  Assert.assertEquals(databrowserRegionName1, DataBrowserRegionName1);
-	  
-	  String DataBrowserRegionName2 = driver.findElement(By.id(DATA_BROWSER_REGIONName2))
-			  .getText();
-	  String databrowserRegionNametemp2 = JMXProperties.getInstance().getProperty(
-		        "region.R2.name");
-	  String databrowserRegionName2 = databrowserRegionNametemp2.replaceAll("[\\/]", "");
-	  Assert.assertEquals(databrowserRegionName2, DataBrowserRegionName2);
-	  
-	  String DataBrowserRegionName3 = driver.findElement(By.id(DATA_BROWSER_REGIONName3))
-			  .getText();
-	  String databrowserRegionNametemp3 = JMXProperties.getInstance().getProperty(
-		        "region.R3.name");
-	  String databrowserRegionName3 = databrowserRegionNametemp3.replaceAll("[\\/]", "");
-	  Assert.assertEquals(databrowserRegionName3, DataBrowserRegionName3);
-	        
-  }
-  
-  @Test
-  public void testDataBrowserRegionMembersVerificaition() throws InterruptedException {
-	  loadDataBrowserpage();
-	  searchByIdAndClick(DATA_BROWSER_REGION1_CHECKBOX);
-	  String DataBrowserMember1Name1 = driver.findElement(By.xpath("//label[@for='Member0']"))
-			  .getText();
-	  String DataBrowserMember1Name2 = driver.findElement(By.xpath("//label[@for='Member1']"))
-			  .getText();
-	  String DataBrowserMember1Name3 = driver.findElement(By.xpath("//label[@for='Member2']"))
-			  .getText();
-	  String databrowserMember1Names = JMXProperties.getInstance().getProperty(
-		        "region.R1.members");
-	  
-	  String databrowserMember1Names1 = databrowserMember1Names.substring(0, 2);
-	  Assert.assertEquals(databrowserMember1Names1, DataBrowserMember1Name1);
-	  
-	  String databrowserMember1Names2 = databrowserMember1Names.substring(3, 5);
-	  Assert.assertEquals(databrowserMember1Names2, DataBrowserMember1Name2);
-	  
-	  String databrowserMember1Names3 = databrowserMember1Names.substring(6, 8);
-	  Assert.assertEquals(databrowserMember1Names3, DataBrowserMember1Name3);
-	  searchByIdAndClick(DATA_BROWSER_REGION1_CHECKBOX);
-	  
-	  searchByIdAndClick(DATA_BROWSER_REGION2_CHECKBOX);
-	  String DataBrowserMember2Name1 = driver.findElement(By.xpath("//label[@for='Member0']"))
-			  .getText();
-	  String DataBrowserMember2Name2 = driver.findElement(By.xpath("//label[@for='Member1']"))
-			  .getText();
-	  String databrowserMember2Names = JMXProperties.getInstance().getProperty(
-		        "region.R2.members");
-	  
-	  String databrowserMember2Names1 = databrowserMember2Names.substring(0, 2);
-	  Assert.assertEquals(databrowserMember2Names1, DataBrowserMember2Name1);
-	  
-	  String databrowserMember2Names2 = databrowserMember2Names.substring(3, 5);
-	  Assert.assertEquals(databrowserMember2Names2, DataBrowserMember2Name2);
-	  searchByIdAndClick(DATA_BROWSER_REGION2_CHECKBOX);
-	  
-	  searchByIdAndClick(DATA_BROWSER_REGION3_CHECKBOX);
-	  String DataBrowserMember3Name1 = driver.findElement(By.xpath("//label[@for='Member0']"))
-			  .getText();
-	  String DataBrowserMember3Name2 = driver.findElement(By.xpath("//label[@for='Member1']"))
-			  .getText();
-	  String databrowserMember3Names = JMXProperties.getInstance().getProperty(
-		        "region.R3.members");
-	  
-	  String databrowserMember3Names1 = databrowserMember3Names.substring(0, 2);
-	  Assert.assertEquals(databrowserMember3Names1, DataBrowserMember3Name1);
-	  
-	  String databrowserMember3Names2 = databrowserMember3Names.substring(3, 5);
-	  Assert.assertEquals(databrowserMember3Names2, DataBrowserMember3Name2);
-	  searchByIdAndClick(DATA_BROWSER_REGION3_CHECKBOX);
-  }
-  
-  @Test
-  public void testDataBrowserColocatedRegions() throws InterruptedException {
-	  loadDataBrowserpage();
-	  String databrowserMemberNames1 = JMXProperties.getInstance().getProperty(
-		        "region.R1.members");
-	  String databrowserMemberNames2 = JMXProperties.getInstance().getProperty(
-		        "region.R2.members");
-	  String databrowserMemberNames3 = JMXProperties.getInstance().getProperty(
-		        "region.R3.members");
-	  
-	  if((databrowserMemberNames1.matches(databrowserMemberNames2+"(.*)"))) {
-		  if((databrowserMemberNames1.matches(databrowserMemberNames3+"(.*)"))) {
-			  if((databrowserMemberNames2.matches(databrowserMemberNames3+"(.*)"))) {
-				  System.out.println("R1, R2 and R3 are colocated regions");
-			  }   
-		  }
-	  }
-	  searchByIdAndClick(DATA_BROWSER_REGION1_CHECKBOX);
-	  searchByLinkAndClick(DATA_BROWSER_COLOCATED_REGION);
-	  String DataBrowserColocatedRegion1 = driver.findElement(By.id(DATA_BROWSER_COLOCATED_REGION_NAME1))
-			  .getText();
-	  String DataBrowserColocatedRegion2 = driver.findElement(By.id(DATA_BROWSER_COLOCATED_REGION_NAME2))
-			  .getText();
-	  String DataBrowserColocatedRegion3 = driver.findElement(By.id(DATA_BROWSER_COLOCATED_REGION_NAME3))
-			  .getText();
-	  
-	  String databrowserColocatedRegiontemp1 = JMXProperties.getInstance().getProperty(
-		        "region.R1.name");
-	  String databrowserColocatedRegion1 = databrowserColocatedRegiontemp1.replaceAll("[\\/]", "");
-	  
-	  String databrowserColocatedRegiontemp2 = JMXProperties.getInstance().getProperty(
-		        "region.R2.name");
-	  String databrowserColocatedRegion2 = databrowserColocatedRegiontemp2.replaceAll("[\\/]", "");
-	  
-	  String databrowserColocatedRegiontemp3 = JMXProperties.getInstance().getProperty(
-		        "region.R3.name");
-	  String databrowserColocatedRegion3 = databrowserColocatedRegiontemp3.replaceAll("[\\/]", "");
-	  
-	  Assert.assertEquals(databrowserColocatedRegion1, DataBrowserColocatedRegion1);
-	  Assert.assertEquals(databrowserColocatedRegion2, DataBrowserColocatedRegion2);
-	  Assert.assertEquals(databrowserColocatedRegion3, DataBrowserColocatedRegion3);
-	  
-  }
-
-  @Ignore("WIP") // clusterDetails element not found on Data Browser page. No assertions in test
-  @Test
-  public void testDataBrowserQueryValidation() throws IOException, InterruptedException {
-	  loadDataBrowserpage();
-	  WebElement textArea = driver.findElement(By.id("dataBrowserQueryText"));
-	  textArea.sendKeys("query1");
-	  WebElement executeButton = driver.findElement(By.id("btnExecuteQuery"));
-	  executeButton.click();
-	  String QueryResultHeader1 = driver.findElement(By.xpath("//div[@id='clusterDetails']/div/div/span[@class='n-title']")).getText();
-	  double count = 0,countBuffer=0,countLine=0;
-	  String lineNumber = "";
-	  String filePath = "E:\\springsource\\springsourceWS\\Pulse-Cedar\\src\\main\\resources\\testQueryResultSmall.txt";
-	  BufferedReader br;
-	  String line = "";
-	  br = new BufferedReader(new FileReader(filePath));
-	  while((line = br.readLine()) != null)
-	  {
-		  countLine++;
-          String[] words = line.split(" ");
-
-          for (String word : words) {
-            if (word.equals(QueryResultHeader1)) {
-              count++;
-              countBuffer++;
-            }
-          }
-	  }  
-  }
-  
- public void testTreeMapPopUpData(String S1, String gridIcon) {
-	  for (int i = 1; i <=3; i++) {
-		  searchByLinkAndClick(CLUSTER_VIEW_LABEL);
-		  if (gridIcon.equals(SERVER_GROUP_GRID_ID)) {
-			  WebElement ServerGroupRadio = driver.findElement(By.xpath("//label[@for='radio-servergroups']"));
-			  ServerGroupRadio.click();
-		  }
-		  if (gridIcon.equals(REDUNDANCY_GRID_ID)) {
-			  WebElement ServerGroupRadio = driver.findElement(By.xpath("//label[@for='radio-redundancyzones']"));
-			  ServerGroupRadio.click();
-		  }
-		  searchByIdAndClick(gridIcon);
-		  WebElement TreeMapMember = driver.findElement(By.xpath("//div[@id='" + S1 + "M"+ (i) + "']/div"));
-		  Actions builder = new Actions(driver);
-		  builder.clickAndHold(TreeMapMember).perform();
-		  int j = 1;
-		  String CPUUsageM1temp = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div/div[2]/div"))
-				  .getText();
-		  String CPUUsageM1 = CPUUsageM1temp.replaceAll("[\\%]", "");
-		  String cpuUsageM1 = JMXProperties.getInstance().getProperty(
-			        "member.M" + (i) + ".cpuUsage");
-		  Assert.assertEquals(cpuUsageM1, CPUUsageM1);
-			  
-		  String MemoryUsageM1temp = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 1) + "]/div[2]/div"))
-				  .getText();
-		  String MemoryUsageM1 = MemoryUsageM1temp.replaceAll("MB", "");
-		  String memoryUsageM1 = JMXProperties.getInstance().getProperty(
-				  "member.M" + (i) + ".UsedMemory");
-		  Assert.assertEquals(memoryUsageM1, MemoryUsageM1);
-		  
-		  String LoadAvgM1 = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 2) + "]/div[2]/div"))
-				  .getText();
-		  String loadAvgM1 = JMXProperties.getInstance().getProperty(
-				  "member.M" + (i) + ".loadAverage");
-		  Assert.assertEquals(loadAvgM1, LoadAvgM1);
-		  
-		  
-		  String ThreadsM1 = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 3) + "]/div[2]/div"))
-				  .getText();
-		  String threadsM1 = JMXProperties.getInstance().getProperty(
-				  "member.M" + (i) + ".numThreads");
-		  Assert.assertEquals(threadsM1, ThreadsM1);
-		  
-		  String SocketsM1 = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 4) + "]/div[2]/div"))
-				  .getText();
-		  String socketsM1 = JMXProperties.getInstance().getProperty(
-				  "member.M" + (i) + ".totalFileDescriptorOpen");
-		  Assert.assertEquals(socketsM1, SocketsM1);
-          builder.moveToElement(TreeMapMember).release().perform();
-		  }
-	  }
-  
-  @Test
-  public void testTopologyPopUpData() {
-	  testTreeMapPopUpData("", CLUSTER_VIEW_GRID_ID); 
-  }
-  
-  @Test
-  public void testServerGroupTreeMapPopUpData() {
-	  testTreeMapPopUpData("SG1(!)", SERVER_GROUP_GRID_ID);
-  }
-  
-  @Test
-  public void testDataViewTreeMapPopUpData() {
-	  searchByLinkAndClick(CLUSTER_VIEW_LABEL);
-	  searchByLinkAndClick(DATA_DROPDOWN_ID);
-	  WebElement TreeMapMember = driver.findElement(By.id("GraphTreeMapClusterData-canvas"));
-	  Actions builder = new Actions(driver);
-	  builder.clickAndHold(TreeMapMember).perform();
-	  String RegionType = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div/div[2]/div"))
-			  .getText();
-	  String regionType = JMXProperties.getInstance().getProperty(
-			  "region.R2.regionType");
-	  Assert.assertEquals(regionType, RegionType);
-	  
-	  String EntryCount = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[2]/div[2]/div"))
-			  .getText();
-	  String entryCount = JMXProperties.getInstance().getProperty(
-			  "region.R2.systemRegionEntryCount");
-	  Assert.assertEquals(entryCount, EntryCount);
-	  
-	  String EntrySizetemp = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[3]/div[2]/div"))
-			  .getText();
-	  float EntrySize = Float.parseFloat(EntrySizetemp);
-	  float entrySize = Float.parseFloat(JMXProperties.getInstance().getProperty(
-			  "region.R2.entrySize"));
-	  entrySize = entrySize / 1024 / 1024;
-	  entrySize = Float.parseFloat(new DecimalFormat("##.####")
-      .format(entrySize));
-	  Assert.assertEquals(entrySize, EntrySize);  
-	  builder.moveToElement(TreeMapMember).release().perform();
-  }
-  
-  @Test
-  public void testRegionViewTreeMapPopUpData() {
-	  searchByLinkAndClick(CLUSTER_VIEW_LABEL);
-	  searchByLinkAndClick(DATA_DROPDOWN_ID);
-	  WebElement TreeMapMember = driver.findElement(By.id("GraphTreeMapClusterData-canvas"));
-	  TreeMapMember.click();
-  }
-
-  @Ignore("WIP")
-  @Test
-  public void testNumberOfRegions() throws InterruptedException{
-	  
-		driver.findElement(By.xpath("//a[text()='Data Browser']")).click();
-		
-		 Thread.sleep(1000);
-		 List<WebElement> regionList = driver.findElements(By.xpath("//ul[@id='treeDemo']/li"));		 
-		 String regions = JMXProperties.getInstance().getProperty("regions");
-		 String []regionName = regions.split(" ");
-		 for (String string : regionName) {
-		}
-		 //JMXProperties.getInstance().getProperty("region.R1.regionType");
-		int i=1; 
-		for (WebElement webElement : regionList) {
-			//webElement.getAttribute(arg0)
-			i++;
-		}
-		
-		driver.findElement(By.id("treeDemo_1_check")).click();		
-		
-		List<WebElement> memeberList = driver.findElements(By.xpath("//ul[@id='membersList']/li"));
-		int j=0;
-		for (WebElement webElement : memeberList) {
-			j++;
-		}  
-  }
-
-  @Ignore("WIP")
-  @Test
-  public void testDataBrowser(){
-	  
-	  driver.findElement(By.linkText("Data Browser")).click();
-	 // WebElement dataBrowserLabel = driver.findElement(By.xpath(""));
-	  WebDriverWait wait = new WebDriverWait(driver, 20);
-	  wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath("//label[text()='Data Browser']"))));
-	  
-	
-	// Verify all elements must be displayed on data browser screen 
-	  Assert.assertTrue(driver.findElement(By.xpath("//a[text()='Data Regions']")).isDisplayed());	
-	  Assert.assertTrue(driver.findElement(By.id("linkColocatedRegions")).isDisplayed());	  
-	  Assert.assertTrue(driver.findElement(By.linkText("All Regions")).isDisplayed());
-	  
-	  Assert.assertTrue(driver.findElement(By.xpath("//a[text()='Region Members']")).isDisplayed());
-	  
-	  Assert.assertTrue(driver.findElement(By.xpath("//a[text()='Queries']")).isDisplayed());
-	  Assert.assertTrue(driver.findElement(By.xpath("//label[text()='Query Editor']")).isDisplayed());
-	  Assert.assertTrue(driver.findElement(By.xpath("//label[text()='Result']")).isDisplayed());
-	  Assert.assertTrue(driver.findElement(By.xpath("//input[@value='Export Result']")).isDisplayed());
-	  Assert.assertTrue(driver.findElement(By.id("btnExecuteQuery")).isDisplayed());
-	  Assert.assertTrue(driver.findElement(By.xpath("//input[@value='Clear']")).isDisplayed());
-	  Assert.assertTrue(driver.findElement(By.id("dataBrowserQueryText")).isDisplayed());
-	  
-	  Assert.assertTrue(driver.findElement(By.id("historyIcon")).isDisplayed());
-	  
-	  //Actual query execution
-	  
-	  driver.findElement(By.id("dataBrowserQueryText")).sendKeys("Query1");
-
-	  // Assert data regions are displayed 
-	  Assert.assertTrue(driver.findElement(By.id("treeDemo_1")).isDisplayed());
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
index d84d0df..86504b0 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
@@ -28,7 +28,6 @@ import org.json.JSONException;
 import javax.management.InstanceAlreadyExistsException;
 import javax.management.MBeanRegistrationException;
 import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
 import javax.management.MalformedObjectNameException;
 import javax.management.NotCompliantMBeanException;
 import javax.management.ObjectName;
@@ -36,35 +35,48 @@ import javax.management.remote.JMXConnectorServer;
 import javax.management.remote.JMXConnectorServerFactory;
 import javax.management.remote.JMXServiceURL;
 import java.io.IOException;
+import java.lang.management.ManagementFactory;
 import java.net.Inet4Address;
 import java.net.Inet6Address;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
 public class Server {
   private static final String DEFAULT_HOST = "127.0.0.1"; //"localhost"
   private static final int DEFAULT_PORT = 9999;
-  private final MBeanServer mbs;
   private final JMXServiceURL url;
-  private final JMXConnectorServer cs;
+  private MBeanServer mbs;
+  private JMXConnectorServer cs;
   private String propFile = null;
 
-  public Server(int port, String properties, boolean secure) throws IOException, JSONException {
-    Properties props = new Properties();
-    props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, JSONAuthorization.class.getName() + ".create");
-    props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
-    JSONAuthorization.setUpWithJsonFile("cacheServer.json");
-    ManagementInterceptor interceptor = new ManagementInterceptor(props);
-    MBeanServerWrapper wrapper = new MBeanServerWrapper(interceptor);
+  public Server(int port, String properties, String jsonAuthFile) throws IOException, JSONException {
+    this.propFile = properties;
+    mbs = ManagementFactory.getPlatformMBeanServer();
+    url = new JMXServiceURL(formJMXServiceURLString(DEFAULT_HOST, port));
+
+    // Load the beans first, otherwise we get access denied
+    loadMBeans();
 
-    if(secure){
-      //System.setProperty(JMXConnectorServer.AUTHENTICATOR, interceptor);
+    if (jsonAuthFile != null) {
+      Properties props = new Properties();
+      props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, JSONAuthorization.class.getName() + ".create");
+      props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
+      JSONAuthorization.setUpWithJsonFile(jsonAuthFile);
+      Map<String, Object> env = new HashMap<>();
+
+      ManagementInterceptor interceptor = new ManagementInterceptor(props);
+      env.put(JMXConnectorServer.AUTHENTICATOR, interceptor);
+      cs = JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);
+      cs.setMBeanServerForwarder(new MBeanServerWrapper(interceptor));
+    } else {
+      cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
     }
 
     try {
-
       java.rmi.registry.LocateRegistry.createRegistry(port);
       System.out.println("RMI registry ready.");
     } catch (Exception e) {
@@ -72,37 +84,19 @@ public class Server {
       e.printStackTrace();
     }
 
-    this.propFile = properties;
-    mbs = MBeanServerFactory.createMBeanServer();
-    url = new JMXServiceURL(formJMXServiceURLString(DEFAULT_HOST, "" + port));
-    cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
-
-    if(secure) {
-      cs.setMBeanServerForwarder(wrapper);
-    }
-
     cs.start();
-
-    loadMBeans();
   }
 
-  private String formJMXServiceURLString(String host, String port)
-      throws UnknownHostException {
-    /*
-     * String jmxSerURL = "service:jmx:rmi://" + serverName + "/jndi/rmi://" +
-     * serverName + ":" + port + "/jmxrmi";
-     */
+  private String formJMXServiceURLString(String host, int port) throws UnknownHostException {
     String jmxSerURL = "";
 
     InetAddress inetAddr = InetAddress.getByName(host);
     if (inetAddr instanceof Inet4Address) {
       // Create jmx service url for IPv4 address
-      jmxSerURL = "service:jmx:rmi://" + host + "/jndi/rmi://" + host + ":"
-          + port + "/jmxrmi";
+      jmxSerURL = "service:jmx:rmi://" + host + "/jndi/rmi://" + host + ":" + port + "/jmxrmi";
     } else if (inetAddr instanceof Inet6Address) {
       // Create jmx service url for IPv6 address
-      jmxSerURL = "service:jmx:rmi://[" + host + "]/jndi/rmi://[" + host + "]:"
-          + port + "/jmxrmi";
+      jmxSerURL = "service:jmx:rmi://[" + host + "]/jndi/rmi://[" + host + "]:" + port + "/jmxrmi";
     }
 
     return jmxSerURL;
@@ -117,8 +111,6 @@ public class Server {
   }
 
   private synchronized void loadMBeans() {
-    unregisterAll();
-
     JMXProperties props = JMXProperties.getInstance();
     try {
       props.load(propFile);
@@ -181,41 +173,33 @@ public class Server {
     }
   }
 
-  private void addMemberMBean(String m) throws InstanceAlreadyExistsException,
-      MBeanRegistrationException, NotCompliantMBeanException,
-      MalformedObjectNameException, NullPointerException {
+  private void addMemberMBean(
+      String m) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException, MalformedObjectNameException, NullPointerException {
     Member m1 = new Member(m);
     mbs.registerMBean(m1, new ObjectName(Member.OBJECT_NAME + ",member=" + m));
   }
 
   // For GemFire XD
-  private void addGemFireXDMemberMBean(String xdm)
-      throws InstanceAlreadyExistsException, MBeanRegistrationException,
-      NotCompliantMBeanException, MalformedObjectNameException,
-      NullPointerException {
+  private void addGemFireXDMemberMBean(
+      String xdm) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException, MalformedObjectNameException, NullPointerException {
     GemFireXDMember xdmo = new GemFireXDMember(xdm);
-    mbs.registerMBean(xdmo, new ObjectName(GemFireXDMember.OBJECT_NAME
-        + ",member=" + xdm));
+    mbs.registerMBean(xdmo, new ObjectName(GemFireXDMember.OBJECT_NAME + ",member=" + xdm));
   }
 
-  private void addRegionMBean(String reg)
-      throws InstanceAlreadyExistsException, MBeanRegistrationException,
-      NotCompliantMBeanException, MalformedObjectNameException,
-      NullPointerException {
+  private void addRegionMBean(
+      String reg) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException, MalformedObjectNameException, NullPointerException {
     Region regionObject = new Region(reg);
     mbs.registerMBean(regionObject, new ObjectName(Region.OBJECT_NAME + ",name=/" + reg));
 
     for (String member : regionObject.getMembers()) {
       RegionOnMember regionOnMemberObject = new RegionOnMember(regionObject.getFullPath(), member);
       mbs.registerMBean(regionOnMemberObject, new ObjectName(
-              PulseConstants.OBJECT_NAME_REGION_ON_MEMBER_REGION + regionObject.getFullPath() + PulseConstants.OBJECT_NAME_REGION_ON_MEMBER_MEMBER + member));
+          PulseConstants.OBJECT_NAME_REGION_ON_MEMBER_REGION + regionObject.getFullPath() + PulseConstants.OBJECT_NAME_REGION_ON_MEMBER_MEMBER + member));
     }
   }
 
-  private void addServerMBean(String server)
-      throws InstanceAlreadyExistsException, MBeanRegistrationException,
-      NotCompliantMBeanException, MalformedObjectNameException,
-      NullPointerException {
+  private void addServerMBean(
+      String server) throws InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException, MalformedObjectNameException, NullPointerException {
     ServerObject so = new ServerObject(server);
     mbs.registerMBean(so, new ObjectName(ServerObject.OBJECT_NAME));
   }
@@ -225,45 +209,11 @@ public class Server {
     return propVal.split(" ");
   }
 
-  private void unregisterAll() {
-    Set<ObjectName> thisSet = mbs.queryNames(null, null);
-    for (ObjectName objectName : thisSet) {
-//      System.out.println("Removing ..." + objectName.getCanonicalName());
-
-      /*try {
-        mbs.unregisterMBean(objectName);
-      } catch (MBeanRegistrationException e) {
-        e.printStackTrace();
-      } catch (InstanceNotFoundException e) {
-        e.printStackTrace();
-      }*/
-    }
-  }
-
-  public static void main(String[] args) throws MalformedObjectNameException,
-      NullPointerException {
-    int port = DEFAULT_PORT;
-    String props = null;
-    if (args.length >= 2) {
-      try {
-        port = Integer.parseInt(args[0]);
-        props = args[1];
-
-      } catch (NumberFormatException nfe) {
-        port = DEFAULT_PORT;
-        props = null;
-        nfe.printStackTrace();
-      }
-    }
-
-    createServer(port, props);
-  }
-
-  public static Server createServer(int port, String properties)
+  public static Server createServer(int port, String properties, String jsonAuthFile)
       throws MalformedObjectNameException {
     Server s = null;
     try {
-      s = new Server(port, properties, true);
+      s = new Server(port, properties, jsonAuthFile);
     } catch (Exception e) {
       e.printStackTrace();
       return null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/test/resources/pulse-auth.json
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/resources/pulse-auth.json b/geode-pulse/src/test/resources/pulse-auth.json
new file mode 100644
index 0000000..248016f
--- /dev/null
+++ b/geode-pulse/src/test/resources/pulse-auth.json
@@ -0,0 +1,21 @@
+{
+  "roles": [
+    {
+      "name": "pulse",
+      "operationsAllowed": [
+        "PULSE:PULSE_DASHBOARD",
+        "PULSE:PULSE_DATABROWSER",
+        "JMX:GET"
+      ]
+    }
+  ],
+  "users": [
+    {
+      "name": "admin",
+      "password": "admin",
+      "roles": [
+        "pulse"
+      ]
+    }
+  ]
+}


[09/54] [abbrv] incubator-geode git commit: GEODE-1031 Added some test related logging.

Posted by je...@apache.org.
GEODE-1031 Added some test related logging.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/dc9e28a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/dc9e28a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/dc9e28a5

Branch: refs/heads/feature/GEODE-17-2
Commit: dc9e28a5fe1f9bdb7c70a831f657c3c0e159b146
Parents: 6c069d2
Author: Hitesh Khamesra <hk...@pivotal.io>
Authored: Fri Mar 11 17:16:31 2016 -0800
Committer: Hitesh Khamesra <hk...@pivotal.io>
Committed: Fri Mar 11 17:20:41 2016 -0800

----------------------------------------------------------------------
 .../internal/cache/tier/sockets/CacheClientProxy.java       | 8 +++++++-
 .../internal/cache/tier/sockets/DurableClientTestCase.java  | 9 +++++----
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc9e28a5/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
index f650fee..6edb570 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
@@ -98,6 +98,7 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.command.Get70;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.logging.LogWriterImpl;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
@@ -139,7 +140,7 @@ public class CacheClientProxy implements ClientSession {
   /**
    * Concurrency: protected by synchronization of {@link #isMarkedForRemovalLock}
    */
-  protected boolean isMarkedForRemoval = false;
+  protected volatile boolean isMarkedForRemoval = false;
   
   /**
    * @see #isMarkedForRemoval
@@ -1880,6 +1881,11 @@ public class CacheClientProxy implements ClientSession {
       .append("; connected=").append(isConnected())
       .append("; isMarkedForRemoval=").append(isMarkedForRemoval)
       .append("]");
+    
+    if(_messageDispatcher != null && isAlive()) {
+     buffer.append( LogWriterImpl.getStackTrace(_messageDispatcher));
+    }
+      
     return buffer.toString();
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc9e28a5/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
index 1fc2e9f..1a37fbb 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
@@ -118,7 +118,7 @@ public class DurableClientTestCase extends DistributedTestCase {
   
   protected void preTearDownDurableClientTestCase() throws Exception {
   }
-
+  
   /**
    * Test that starting a durable client is correctly processed by the server.
    */
@@ -264,9 +264,10 @@ public class DurableClientTestCase extends DistributedTestCase {
     server1VM.invoke(s);
   }
   
-  private String printMap(Map m) {
+  private static String printMap(Map m) {
     Iterator<Map.Entry> itr = m.entrySet().iterator();
     StringBuffer sb = new StringBuffer();
+    sb.append("size = ").append(m.size()).append(" ");
     while(itr.hasNext()){
       sb.append("{");
       Map.Entry entry = itr.next();
@@ -278,7 +279,7 @@ public class DurableClientTestCase extends DistributedTestCase {
     return sb.toString();    
   }
   
-  private void printMapValue(Object value, StringBuffer sb) {
+  private static void printMapValue(Object value, StringBuffer sb) {
     if(value.getClass().isArray()) {
       
       sb.append("{");
@@ -1648,7 +1649,7 @@ public class DurableClientTestCase extends DistributedTestCase {
         
         if(ccp != null)
           result += " ccp: " + ccp.toString();*/
-        return getAllClientProxyState();
+        return getAllClientProxyState() + " CHM state: " + printMap(ClientHealthMonitor._instance.getConnectedClients(null));
       }
     };
     Wait.waitForCriterion(ev, 50 * 1000, 200, true);


[32/54] [abbrv] incubator-geode git commit: GEODE-1096: HeapMemoryMonitor to consider testBytesUsedForThresholdSet

Posted by je...@apache.org.
GEODE-1096: HeapMemoryMonitor to consider testBytesUsedForThresholdSet

   HeapMemoryMonitor facilitates to instrument used bytes for testing,
   but updateStateAndSendEvent ignores the instrudmented value.
   Fix is to consider testBytesUsedForThresholdSet (if it is set)
   while sending a new memory event.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d8f28d23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d8f28d23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d8f28d23

Branch: refs/heads/feature/GEODE-17-2
Commit: d8f28d23ebcae788a9390fc428310c37a9ef7744
Parents: f4b2037
Author: Sai Boorlagadda <sb...@pivotal.io>
Authored: Mon Mar 14 14:42:27 2016 -0700
Committer: Sai Boorlagadda <sb...@pivotal.io>
Committed: Wed Mar 16 14:24:05 2016 -0700

----------------------------------------------------------------------
 .../internal/cache/control/HeapMemoryMonitor.java     | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d8f28d23/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
index 27a6dff..ffd940e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
@@ -385,11 +385,7 @@ public void stopMonitoring() {
       this.thresholds = new MemoryThresholds(this.thresholds.getMaxMemoryBytes(), criticalThreshold, this.thresholds
           .getEvictionThreshold());
 
-      if (testBytesUsedForThresholdSet != -1) {
-        updateStateAndSendEvent(testBytesUsedForThresholdSet);
-      } else {
-        updateStateAndSendEvent(getBytesUsed());
-      }
+      updateStateAndSendEvent();
       
       // Start or stop monitoring based upon whether a threshold has been set
       if (this.thresholds.isEvictionThresholdEnabled() || this.thresholds.isCriticalThresholdEnabled()) {
@@ -437,11 +433,7 @@ public void stopMonitoring() {
       this.thresholds = new MemoryThresholds(this.thresholds.getMaxMemoryBytes(), this.thresholds.getCriticalThreshold(),
           evictionThreshold);
 
-      if (testBytesUsedForThresholdSet != -1) {
-        updateStateAndSendEvent(testBytesUsedForThresholdSet);
-      } else {
-        updateStateAndSendEvent(getBytesUsed());
-      }
+      updateStateAndSendEvent();
 
       // Start or stop monitoring based upon whether a threshold has been set
       if (this.thresholds.isEvictionThresholdEnabled() || this.thresholds.isCriticalThresholdEnabled()) {
@@ -463,7 +455,7 @@ public void stopMonitoring() {
    * If necessary, change the state and send an event for the state change.
    */
   public void updateStateAndSendEvent() {
-    updateStateAndSendEvent(getBytesUsed());
+    updateStateAndSendEvent(testBytesUsedForThresholdSet != -1 ? testBytesUsedForThresholdSet : getBytesUsed());
   }
   
   /**


[02/54] [abbrv] incubator-geode git commit: GEODE-573: Fix broken image links in javadocs

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/doc-files/communication-architecture.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/doc-files/communication-architecture.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/doc-files/communication-architecture.fig
deleted file mode 100644
index b334ebb..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/doc-files/communication-architecture.fig
+++ /dev/null
@@ -1,158 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 9000 2175 10200 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9000 2550 10200 2550
-# HREF="../Acceptor.html" ALT="Acceptor"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9000 2175 10200 2175 10200 2925 9000 2925 9000 2175
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9000 2475 10200 2475
-4 0 0 50 -1 0 12 0.0000 4 135 945 9150 2775 ServerSocket\001
-4 0 0 50 -1 0 12 0.0000 4 180 645 9300 2400 Acceptor\001
--6
-6 7350 2475 8775 2775
-# HREF="ServerConnection.html" ALT="ServerConnection"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7350 2475 8775 2475 8775 2775 7350 2775 7350 2475
-4 0 0 50 -1 0 12 0.0000 4 135 1275 7425 2700 ServerConnection\001
--6
-6 7350 3375 8775 3675
-# HREF="ServerConnection.html" ALT="ServerConnection"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7350 3375 8775 3375 8775 3675 7350 3675 7350 3375
-4 0 0 50 -1 0 12 0.0000 4 135 1275 7425 3600 ServerConnection\001
--6
-6 7350 2925 8775 3225
-# HREF="ServerConnection.html" ALT="ServerConnection"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7350 2925 8775 2925 8775 3225 7350 3225 7350 2925
-4 0 0 50 -1 0 12 0.0000 4 135 1275 7425 3150 ServerConnection\001
--6
-6 2850 2475 5475 3675
-6 2850 2925 3675 3225
-# HREF="../Endpoint.html" ALT="Endpoint"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2850 2925 3675 2925 3675 3225 2850 3225 2850 2925
-4 0 0 50 -1 0 12 0.0000 4 180 645 2925 3150 Endpoint\001
--6
-6 4500 3375 5475 3675
-# HREF="../Connection.html" ALT="Connection"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4500 3375 5475 3375 5475 3675 4500 3675 4500 3375
-4 0 0 50 -1 0 12 0.0000 4 135 810 4575 3600 Connection\001
--6
-6 4500 2925 5475 3225
-# HREF="../Connection.html" ALT="Connection"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4500 2925 5475 2925 5475 3225 4500 3225 4500 2925
-4 0 0 50 -1 0 12 0.0000 4 135 810 4575 3150 Connection\001
--6
-6 4500 2475 5475 2775
-# HREF="../Connection.html" ALT="Connection"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4500 2475 5475 2475 5475 2775 4500 2775 4500 2475
-4 0 0 50 -1 0 12 0.0000 4 135 810 4575 2700 Connection\001
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3675 3075 4500 3075
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3675 3075 4500 2625
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3675 3075 4500 3525
--6
-6 2850 4650 5475 5850
-6 2850 5100 3675 5400
-# HREF="../Endpoint.html" ALT="EndPoint"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2850 5100 3675 5100 3675 5400 2850 5400 2850 5100
-4 0 0 50 -1 0 12 0.0000 4 180 645 2925 5325 Endpoint\001
--6
-6 4500 5550 5475 5850
-# HREF="../Connection.html" ALT="Connection"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4500 5550 5475 5550 5475 5850 4500 5850 4500 5550
-4 0 0 50 -1 0 12 0.0000 4 135 810 4575 5775 Connection\001
--6
-6 4500 5100 5475 5400
-# HREF="../Connection.html" ALT="Connection"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4500 5100 5475 5100 5475 5400 4500 5400 4500 5100
-4 0 0 50 -1 0 12 0.0000 4 135 810 4575 5325 Connection\001
--6
-6 4500 4650 5475 4950
-# HREF="../Connection.html" ALT="Connection"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4500 4650 5475 4650 5475 4950 4500 4950 4500 4650
-4 0 0 50 -1 0 12 0.0000 4 135 810 4575 4875 Connection\001
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3675 5250 4500 5250
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3675 5250 4500 4800
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3675 5250 4500 5700
--6
-6 10650 2175 12375 3075
-4 0 0 50 -1 16 12 0.0000 4 180 1710 10650 2325 The Acceptor Thread\001
-4 0 0 50 -1 16 12 0.0000 4 180 1620 10650 2565 services requests to\001
-4 0 0 50 -1 16 12 0.0000 4 120 1275 10650 2805 create a remote\001
-4 0 0 50 -1 16 12 0.0000 4 135 990 10650 3045 Connection.\001
--6
-6 450 3675 1950 4650
-6 600 4200 1800 4500
-# HREF="ServerMonitor.html" ALT="ServerMonitor"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 600 4200 1800 4200 1800 4500 600 4500 600 4200
-4 0 0 50 -1 0 12 0.0000 4 135 1050 675 4425 ServerMonitor\001
--6
-# HREF="../ConnectionProxy.html" ALT="ConnectionProxy"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 450 3675 1950 3675 1950 4650 450 4650 450 3675
-4 0 0 50 -1 0 12 0.0000 4 180 1245 600 3900 ConnectionProxy\001
--6
-6 600 2775 1725 3075
-# HREF="../../../../cache/client/Pool.html" ALT="ClientPool"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 600 2775 1725 2775 1725 3075 600 3075 600 2775
-4 0 0 50 -1 -1 12 0.0000 4 180 975 675 3000 ClientPool\001
--6
-2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2
-	 6450 375 6450 6750
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7200 3825 10425 3825 10425 1650 7200 1650 7200 3825
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
-	 5475 2625 7350 2625
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
-	 5475 3525 7350 3525
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
-	 5475 3075 7350 3075
-# HREF="../../../../cache/util/CacheServer.html" ALT="CacheServer"
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8025 4500 9675 4500 9675 5850 8025 5850 8025 4500
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1950 4125 2850 3075
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1950 4125 2850 5250
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
-	 5475 4800 8025 4800
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
-	 5475 5250 8025 5250
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
-	 5475 5700 8025 5700
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1125 3075 1125 3675
-4 0 0 50 -1 0 16 0.0000 4 165 615 8775 825 Server\001
-4 0 0 50 -1 0 12 0.0000 4 180 945 8400 1875 CacheServer\001
-4 0 0 50 -1 0 12 0.0000 4 135 480 6225 2550 Socket\001
-4 0 0 50 -1 0 12 0.0000 4 135 480 6225 3450 Socket\001
-4 0 0 50 -1 0 12 0.0000 4 135 480 6225 3000 Socket\001
-4 0 0 50 -1 0 16 0.0000 4 165 570 2700 825 Client\001
-4 0 0 50 -1 0 12 0.0000 4 180 945 8400 4725 CacheServer\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/doc-files/communication-architecture.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/doc-files/communication-architecture.gif b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/doc-files/communication-architecture.gif
deleted file mode 100644
index 3ecc5c4..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/doc-files/communication-architecture.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/cs-maps.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/cs-maps.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/cs-maps.fig
deleted file mode 100644
index 2d615a6..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/cs-maps.fig
+++ /dev/null
@@ -1,150 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-# Describes how direct shared
-# objects are mapped into JOM
-1200 2
-6 1125 1650 5625 3975
-6 1725 2400 2325 3150
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 1725 2550 2325 2550
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 1725 2700 2325 2700
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 1725 2850 2325 2850
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 1725 3000 2325 3000
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 2025 2400 2025 3150
-2 2 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 1725 2400 2325 2400 2325 3150 1725 3150 1725 2400
--6
-6 3075 2775 3900 3675
-2 2 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3300 2775 3450 2775 3450 2925 3300 2925 3300 2775
-2 2 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3075 3150 3225 3150 3225 3300 3075 3300 3075 3150
-2 2 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3525 3150 3675 3150 3675 3300 3525 3300 3525 3150
-2 2 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3300 3525 3450 3525 3450 3675 3300 3675 3300 3525
-2 1 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3450 2925 3600 3150
-2 1 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3525 3300 3375 3525
-2 1 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3300 2925 3150 3150
-2 2 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3750 3525 3900 3525 3900 3675 3750 3675 3750 3525
-2 1 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3675 3300 3825 3525
--6
-6 4575 2400 5175 3150
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4575 2550 5175 2550
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4575 2700 5175 2700
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4575 2850 5175 2850
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4575 3000 5175 3000
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4875 2400 4875 3150
-2 2 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4575 2400 5175 2400 5175 3150 4575 3150 4575 2400
--6
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2175 2475 3300 2775
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2175 2625 3525 3150
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2175 2775 3075 3150
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2175 2925 3750 3525
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4725 2475 3450 2775
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4725 2625 3225 3150
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4725 2775 3675 3150
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4725 2925 3450 3525
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2175 3075 3300 3525
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4725 3075 3900 3525
-2 2 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 1125 1650 5625 1650 5625 3975 1125 3975 1125 1650
-4 0 2 50 0 0 12 0.0000 4 180 705 1725 2250 objIdMap\001
-4 0 1 50 0 0 12 0.0000 4 135 660 1275 1875 Java VM\001
-4 0 2 50 0 0 12 0.0000 4 180 810 4500 2250 specialMap\001
--6
-6 5625 2550 7650 3000
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 5625 2550 7650 2550
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 5625 3000 7650 3000
-4 0 4 50 0 0 12 0.0000 4 135 1440 5925 2850 GemFireConnection\001
--6
-6 7650 1950 9375 3675
-6 8025 2550 8850 3450
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 8250 2550 8400 2550 8400 2700 8250 2700 8250 2550
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 8025 2925 8175 2925 8175 3075 8025 3075 8025 2925
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 8475 2925 8625 2925 8625 3075 8475 3075 8475 2925
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 8250 3300 8400 3300 8400 3450 8250 3450 8250 3300
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 8700 3300 8850 3300 8850 3450 8700 3450 8700 3300
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 8250 2700 8100 2925
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 8400 2700 8550 2925
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 8475 3075 8325 3300
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 8625 3075 8775 3300
--6
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7650 1950 9375 1950 9375 3675 7650 3675 7650 1950
-4 0 4 50 0 0 12 0.0000 4 180 1155 7800 2175 Shared Memory\001
--6
-6 1125 4200 7875 4650
-4 0 0 50 0 1 12 0.0000 4 180 6750 1125 4350 Unlike direct shared objects that are enhanced to know their object id, the "special object map"\001
-4 0 0 50 0 1 12 0.0000 4 180 6195 1125 4590 is required to keep track of the id of the JOM representation of the copy shared objects.\001
--6
-6 6450 4950 9450 6150
-6 6450 4950 9450 6150
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 6600 5475 7275 5475
-2 1 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 6600 5700 7275 5700
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 6600 5925 7275 5925
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6450 4950 9450 4950 9450 6150 6450 6150 6450 4950
-4 0 0 50 0 -1 12 0.0000 4 135 1515 7500 5550 Weak JOM reference\001
-4 0 0 50 0 -1 12 0.0000 4 180 1590 7500 5775 Strong JOM reference\001
-4 0 0 50 0 -1 12 0.0000 4 180 1815 7500 6000 Shared memory reference\001
-4 0 0 50 0 2 12 0.0000 4 180 570 6600 5175 Legend\001
--6
--6
-4 0 0 50 0 2 12 0.0000 4 180 1650 5100 1275 Copy Shared Objects\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/cs-maps.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/cs-maps.gif b/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/cs-maps.gif
deleted file mode 100644
index dce7de3..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/cs-maps.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/ds-map.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/ds-map.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/ds-map.fig
deleted file mode 100644
index 6456b56..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/ds-map.fig
+++ /dev/null
@@ -1,105 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-# Describes how direct shared
-# objects are mapped into JOM
-1200 2
-6 1125 1650 3975 3975
-6 1725 2400 2325 3150
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 1725 2550 2325 2550
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 1725 2700 2325 2700
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 1725 2850 2325 2850
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 1725 3000 2325 3000
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 2025 2400 2025 3150
-2 2 0 1 2 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 1725 2400 2325 2400 2325 3150 1725 3150 1725 2400
--6
-6 3075 2775 3675 3675
-2 2 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3300 2775 3450 2775 3450 2925 3300 2925 3300 2775
-2 2 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3075 3150 3225 3150 3225 3300 3075 3300 3075 3150
-2 2 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3525 3150 3675 3150 3675 3300 3525 3300 3525 3150
-2 2 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3300 3525 3450 3525 3450 3675 3300 3675 3300 3525
--6
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2175 2475 3300 2775
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2175 2625 3525 3150
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2175 2775 3075 3150
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2175 2925 3300 3525
-2 2 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 1125 1650 3975 1650 3975 3975 1125 3975 1125 1650
-4 0 2 50 0 0 12 0.0000 4 180 705 1725 2250 objIdMap\001
-4 0 1 50 0 0 12 0.0000 4 135 660 1275 1875 Java VM\001
--6
-6 6000 1950 7725 3675
-6 6375 2550 7200 3450
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6600 2550 6750 2550 6750 2700 6600 2700 6600 2550
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6375 2925 6525 2925 6525 3075 6375 3075 6375 2925
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6825 2925 6975 2925 6975 3075 6825 3075 6825 2925
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6600 3300 6750 3300 6750 3450 6600 3450 6600 3300
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7050 3300 7200 3300 7200 3450 7050 3450 7050 3300
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 6600 2700 6450 2925
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 6750 2700 6900 2925
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 6825 3075 6675 3300
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 6975 3075 7125 3300
--6
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6000 1950 7725 1950 7725 3675 6000 3675 6000 1950
-4 0 4 50 0 0 12 0.0000 4 180 1155 6150 2175 Shared Memory\001
--6
-6 1350 4200 6900 4650
-4 0 0 50 0 1 12 0.0000 4 180 5130 1350 4350 The objIdMap maps the id of a shared object to its JOM representation.\001
-4 0 0 50 0 1 12 0.0000 4 180 5550 1350 4590 Note that JOM objects are created lazily when the shared object is referenced.\001
--6
-6 4725 5025 7725 6225
-6 4725 5025 7725 6225
-2 1 0 1 2 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4875 5550 5550 5550
-2 1 0 1 1 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4875 5775 5550 5775
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4875 6000 5550 6000
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4725 5025 7725 5025 7725 6225 4725 6225 4725 5025
-4 0 0 50 0 -1 12 0.0000 4 135 1515 5775 5625 Weak JOM reference\001
-4 0 0 50 0 -1 12 0.0000 4 180 1590 5775 5850 Strong JOM reference\001
-4 0 0 50 0 -1 12 0.0000 4 180 1815 5775 6075 Shared memory reference\001
-4 0 0 50 0 2 12 0.0000 4 180 570 4875 5250 Legend\001
--6
--6
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3975 2550 6000 2550
-2 1 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3975 3000 6000 3000
-4 0 0 50 0 2 12 0.0000 4 180 1695 4125 1125 Direct Shared Objects\001
-4 0 4 50 0 0 12 0.0000 4 135 1440 4275 2850 GemFireConnection\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/ds-map.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/ds-map.gif b/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/ds-map.gif
deleted file mode 100644
index a712b52..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/ds-map.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/merge-log-files.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/merge-log-files.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/merge-log-files.fig
deleted file mode 100644
index 50dfcc0..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/merge-log-files.fig
+++ /dev/null
@@ -1,153 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 3000 2775 6075 3600
-6 4725 2775 5325 3075
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4725 2775 5325 2775 5325 3075 4725 3075 4725 2775
-4 0 0 50 0 -1 12 0.0000 4 135 495 4800 3000 Reader\001
--6
-6 5625 3300 6075 3600
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 5625 3300 6075 3300 6075 3600 5625 3600 5625 3300
-4 0 0 50 0 -1 12 0.0000 4 135 270 5700 3525 File\001
--6
-6 3000 3300 4200 3525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3150 3300 3150 3525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3300 3300 3300 3525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3450 3300 3450 3525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3600 3300 3600 3525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3750 3300 3750 3525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3900 3300 3900 3525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4050 3300 4050 3525
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3000 3300 4200 3300 4200 3525 3000 3525 3000 3300
--6
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 5850 3300 5325 2925
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4725 2925 4200 3375
--6
-6 3000 3750 6075 4575
-6 4725 3750 5325 4050
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4725 3750 5325 3750 5325 4050 4725 4050 4725 3750
-4 0 0 50 0 -1 12 0.0000 4 135 495 4800 3975 Reader\001
--6
-6 5625 4275 6075 4575
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 5625 4275 6075 4275 6075 4575 5625 4575 5625 4275
-4 0 0 50 0 -1 12 0.0000 4 135 270 5700 4500 File\001
--6
-6 3000 4275 4200 4500
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3150 4275 3150 4500
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3300 4275 3300 4500
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3450 4275 3450 4500
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3600 4275 3600 4500
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3750 4275 3750 4500
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3900 4275 3900 4500
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4050 4275 4050 4500
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3000 4275 4200 4275 4200 4500 3000 4500 3000 4275
--6
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 5850 4275 5325 3900
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4725 3900 4200 4350
--6
-6 3000 4725 6075 5550
-6 4725 4725 5325 5025
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4725 4725 5325 4725 5325 5025 4725 5025 4725 4725
-4 0 0 50 0 -1 12 0.0000 4 135 495 4800 4950 Reader\001
--6
-6 5625 5250 6075 5550
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 5625 5250 6075 5250 6075 5550 5625 5550 5625 5250
-4 0 0 50 0 -1 12 0.0000 4 135 270 5700 5475 File\001
--6
-6 3000 5250 4200 5475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3150 5250 3150 5475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3300 5250 3300 5475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3450 5250 3450 5475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3600 5250 3600 5475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3750 5250 3750 5475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3900 5250 3900 5475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4050 5250 4050 5475
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3000 5250 4200 5250 4200 5475 3000 5475 3000 5250
--6
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 5850 5250 5325 4875
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4725 4875 4200 5325
--6
-6 1050 4275 1650 4575
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 1050 4275 1650 4275 1650 4575 1050 4575 1050 4275
-4 0 0 50 0 -1 12 0.0000 4 135 435 1125 4500 Sorter\001
--6
-6 900 5700 1950 6000
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 900 5700 1950 5700 1950 6000 900 6000 900 5700
-4 0 0 50 0 -1 12 0.0000 4 180 870 975 5925 Merged File\001
--6
-6 2325 5925 5400 6375
-4 0 0 50 0 1 12 0.0000 4 180 3045 2325 6315 keep the VM's heap from getting too large.\001
-4 0 0 50 0 1 12 0.0000 4 180 2685 2325 6075 The size of the queues are bounded to\001
--6
-6 1650 3600 2175 3900
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 1650 3600 2175 3600 2175 3900 1650 3900 1650 3600
-4 0 0 50 0 -1 12 0.0000 4 180 390 1725 3825 Entry\001
--6
-6 3900 2775 4425 3075
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3900 2775 4425 2775 4425 3075 3900 3075 3900 2775
-4 0 0 50 0 -1 12 0.0000 4 180 390 3975 3000 Entry\001
--6
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 3000 3375 1650 4425
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 3000 4425 1650 4425
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 3000 5325 1650 4425
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 1350 4575 1350 5700

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/merge-log-files.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/merge-log-files.gif b/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/merge-log-files.gif
deleted file mode 100644
index 59b9ec5..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/internal/doc-files/merge-log-files.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/MergeLogFiles.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/MergeLogFiles.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/MergeLogFiles.java
index 1f19ff3..cd82958 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/MergeLogFiles.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/MergeLogFiles.java
@@ -87,7 +87,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
  * use this option.<p>
  *
  * <CENTER>
- * <IMG SRC="doc-files/merge-log-files.gif"
+ * <IMG SRC="{@docRoot}/javadoc-images/merge-log-files.gif"
  *      WIDTH="353" HEIGHT="246"/>
  * </CENTER>
  *

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/util/doc-files/call-stack.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/util/doc-files/call-stack.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/util/doc-files/call-stack.fig
deleted file mode 100644
index 5b052c2..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/util/doc-files/call-stack.fig
+++ /dev/null
@@ -1,34 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 3750 2850 9600 4275
-5 1 0 1 1 7 50 -1 -1 0.000 0 0 1 0 6337.500 3337.500 6300 3225 6450 3375 6300 3450
-	0 0 1.00 60.00 60.00
-5 1 0 1 1 7 50 -1 -1 0.000 0 0 1 0 6337.500 3037.500 6300 2925 6450 3075 6300 3150
-	0 0 1.00 60.00 60.00
-4 0 -1 50 -1 0 12 0.0000 4 180 2400 3750 3000 ObjectInputStream.resolveClass()\001
-4 0 -1 50 -1 0 12 0.0000 4 180 2265 3750 3240 ObjectInputStream.readObject()\001
-4 0 -1 50 -1 0 12 0.0000 4 180 2355 3750 3480 DeserializerDelegate.deserialize()\001
-4 0 -1 50 -1 0 12 0.0000 4 180 885 3750 3720 Region.get()\001
-4 0 -1 50 -1 0 12 0.0000 4 165 1380 3750 3960 UserServlet.serve()\001
-4 0 0 50 -1 0 12 0.0000 4 165 1695 3750 4200 ServletContainer.main()\001
-4 0 1 50 -1 0 12 0.0000 4 180 2835 6675 3000 Java Serialization looks up the call stack\001
-4 0 1 50 -1 0 12 0.0000 4 135 2805 6675 3240 and finds the first non-null class loader\001
-4 0 1 50 -1 0 12 0.0000 4 135 2865 6675 3480 which is the current context class loader.\001
--6
-6 1800 2850 3000 4200
-4 0 1 50 -1 0 12 0.0000 4 135 345 1800 3000 Boot\001
-4 0 1 50 -1 0 12 0.0000 4 135 345 1800 3240 Boot\001
-4 0 1 50 -1 0 12 0.0000 4 135 1140 1800 3480 Current Context\001
-4 0 1 50 -1 0 12 0.0000 4 135 630 1800 3720 GemFire\001
-4 0 1 50 -1 0 12 0.0000 4 135 1140 1800 3960 Current Context\001
-4 0 1 50 -1 0 12 0.0000 4 135 690 1800 4200 Container\001
--6
-4 1 1 50 -1 2 12 0.0000 4 135 1095 2400 2475 Class Loaders\001
-4 1 0 50 -1 2 12 0.0000 4 135 795 4875 2550 Call Stack\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/util/doc-files/class-loaders.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/util/doc-files/class-loaders.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/util/doc-files/class-loaders.fig
deleted file mode 100644
index 3ca6d06..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/util/doc-files/class-loaders.fig
+++ /dev/null
@@ -1,49 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 2400 1125 4800 4125
-6 3225 2925 3975 3225
-2 4 0 1 1 7 50 -1 -1 0.000 0 0 7 0 0 5
-	 3975 3225 3975 2925 3225 2925 3225 3225 3975 3225
-4 0 1 50 -1 0 12 0.0000 4 135 630 3300 3150 GemFire\001
--6
-6 3412 2025 3787 2325
-2 4 0 1 1 7 50 -1 -1 0.000 0 0 7 0 0 5
-	 3787 2325 3787 2025 3412 2025 3412 2325 3787 2325
-4 0 1 50 -1 0 12 0.0000 4 120 210 3487 2250 ext\001
--6
-6 3337 1125 3862 1425
-2 4 0 1 1 7 50 -1 -1 0.000 0 0 7 0 0 5
-	 3862 1425 3862 1125 3337 1125 3337 1425 3862 1425
-4 0 1 50 -1 0 12 0.0000 4 135 345 3412 1350 Boot\001
--6
-6 2400 3825 4800 4125
-2 4 0 1 1 7 50 -1 -1 0.000 0 0 7 0 0 5
-	 4800 4125 4800 3825 2400 3825 2400 4125 4800 4125
-4 0 1 50 -1 0 12 0.0000 4 180 2250 2475 4050 User classes & gemfire_j2ee.jar\001
--6
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 3600 2025 3600 1425
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 3600 2925 3600 2325
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 3600 3825 3600 3225
--6
-2 1 0 1 -1 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4425 3600 4125 3825
-4 0 4 50 -1 0 12 0.0000 4 180 1335 4950 1275 ObjectInputStream\001
-4 0 4 50 -1 0 12 0.0000 4 180 1455 4950 4050 DeserializerDelegate\001
-4 1 -1 50 -1 0 12 0.0000 4 180 2610 6225 600 Classes Loaded by that Class Loader\001
-4 1 -1 50 -1 0 12 0.0000 4 135 1005 3600 600 Class Loaders\001
-4 0 4 50 -1 0 12 0.0000 4 180 2700 4950 3075 Deserializer, DeserializerImpl, Region\001
-4 1 -1 50 -1 0 12 0.0000 4 135 2115 5475 3525 Current Context Class Loader\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/BucketAdvisor-state.png
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/BucketAdvisor-state.png b/geode-core/src/main/resources/javadoc-images/BucketAdvisor-state.png
new file mode 100644
index 0000000..7f58ca0
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/BucketAdvisor-state.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/ConnectionManagerImpl.dia
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/ConnectionManagerImpl.dia b/geode-core/src/main/resources/javadoc-images/ConnectionManagerImpl.dia
new file mode 100644
index 0000000..39d8f3d
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/ConnectionManagerImpl.dia differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/ConnectionManagerImpl.png
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/ConnectionManagerImpl.png b/geode-core/src/main/resources/javadoc-images/ConnectionManagerImpl.png
new file mode 100644
index 0000000..773fabe
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/ConnectionManagerImpl.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/QueueManagerImpl.dia
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/QueueManagerImpl.dia b/geode-core/src/main/resources/javadoc-images/QueueManagerImpl.dia
new file mode 100644
index 0000000..8cc7d0e
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/QueueManagerImpl.dia differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/QueueManagerImpl.png
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/QueueManagerImpl.png b/geode-core/src/main/resources/javadoc-images/QueueManagerImpl.png
new file mode 100644
index 0000000..d48bbf6
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/QueueManagerImpl.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/class-hierarchy.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/class-hierarchy.fig b/geode-core/src/main/resources/javadoc-images/class-hierarchy.fig
new file mode 100644
index 0000000..85756e6
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/class-hierarchy.fig
@@ -0,0 +1,224 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 225 5550 10500 9450
+6 225 7800 2550 9450
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 225 7800 2550 7800 2550 9450 225 9450 225 7800
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 225 8175 2550 8175
+4 0 0 50 -1 2 12 0.0000 4 180 2055 375 8025 RemoteApplicationProcess\001
+4 0 0 50 -1 -1 12 0.0000 4 180 585 450 8400 id : long\001
+4 0 0 50 -1 -1 12 0.0000 4 180 1005 450 8640 processId : int\001
+4 0 0 50 -1 -1 12 0.0000 4 180 1530 450 8880 javaProcess : boolean\001
+4 0 0 50 -1 -1 12 0.0000 4 135 1365 450 9120 hasCache : boolean\001
+4 0 0 50 -1 -1 12 0.0000 4 180 945 450 9360 name : String\001
+-6
+6 2550 7800 4500 8025
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 2550 8025 4500 8025
+4 0 0 50 -1 -1 12 0.0000 4 75 90 2625 7950 *\001
+4 0 0 50 -1 -1 12 0.0000 4 135 1410 3000 7950 connectedProcesses\001
+-6
+6 4500 7725 7725 9375
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4500 9375 7725 9375 7725 7725 4500 7725 4500 9375
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 4500 8100 7725 8100
+4 0 0 50 -1 -1 12 0.0000 4 180 1185 4575 8325 gemfireDir : File\001
+4 0 0 50 -1 -1 12 0.0000 4 135 1125 4575 8565 birthDate : Date\001
+4 0 0 50 -1 -1 12 0.0000 4 165 1515 4575 8805 lockInfo : LockInfo[]\001
+4 0 0 50 -1 -1 12 0.0000 4 165 2205 4575 9045 lockListeners : LockListeners[]\001
+4 0 0 50 -1 -1 12 0.0000 4 165 3045 4575 9285 connectionListeners : ConnectionListener[]\001
+4 0 0 50 -1 2 12 0.0000 4 180 1470 5400 7950 RemoteGfManager\001
+-6
+6 8550 7725 10500 8625
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 8550 8625 10500 8625 10500 7725 8550 7725 8550 8625
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 8550 8100 10500 8100
+4 0 0 50 -1 2 12 0.0000 4 180 1785 8625 7950 RemoteApplicationVM\001
+4 0 0 50 -1 -1 12 0.0000 4 180 1440 8625 8325 sharedLog : boolean\001
+4 0 0 50 -1 -1 12 0.0000 4 135 1500 8625 8565 sharedStats : boolean\001
+-6
+6 7050 5550 8850 6975
+6 7050 5550 8850 6975
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7050 5850 8850 5850
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7050 6975 8850 6975 8850 5550 7050 5550 7050 6975
+4 0 0 50 -1 3 12 0.0000 4 135 1485 7275 5775 RemoteGemFireVM\001
+4 0 0 50 -1 -1 12 0.0000 4 135 1035 7125 6150 id: Serializable\001
+4 0 0 50 -1 -1 12 0.0000 4 180 945 7125 6390 name : String\001
+4 0 0 50 -1 -1 12 0.0000 4 135 1305 7125 6630 host : InetAddress\001
+4 0 0 50 -1 -1 12 0.0000 4 180 885 7125 6870 sysDir : File\001
+-6
+-6
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
+	 6225 7725 6225 7425 9450 7425 9450 7725
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	1 0 1.00 120.00 120.00
+	 7950 7425 7950 6975
+-6
+6 150 2025 5325 7500
+6 375 2625 1875 2925
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 375 2625 1875 2625 1875 2925 375 2925 375 2625
+4 0 0 50 -1 1 12 0.0000 4 180 1215 450 2850 TransportConfig\001
+-6
+6 150 3825 2250 4800
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 150 3825 2250 3825 2250 4800 150 4800 150 3825
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 150 4200 2250 4200
+4 0 0 50 -1 0 12 0.0000 4 165 1365 450 4425 isMcast() : boolean\001
+4 0 0 50 -1 2 12 0.0000 4 180 1905 225 4050 RemoteTransportConfig\001
+4 0 0 50 -1 0 12 0.0000 4 180 1485 450 4665 bindAddress : String\001
+-6
+6 3225 3825 5250 5100
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 3225 4200 5250 4200
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 3225 3825 5250 3825 5250 5100 3225 5100 3225 3825
+4 0 0 50 -1 0 12 0.0000 4 135 1305 3450 4500 host : InetAddress\001
+4 0 0 50 -1 0 12 0.0000 4 180 600 3450 4740 port : int\001
+4 0 0 50 -1 0 12 0.0000 4 180 1485 3450 4980 bindAddress : String\001
+4 0 0 50 -1 2 12 0.0000 4 135 1725 3300 4050 DistributionLocatorId\001
+-6
+6 1875 5850 3600 7500
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 1875 6150 3600 6150
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 1875 7500 3600 7500 3600 5850 1875 5850 1875 7500
+4 0 0 50 -1 -1 12 0.0000 4 135 1230 1950 6450 enabled : boolean\001
+4 0 0 50 -1 -1 12 0.0000 4 180 1230 1950 6690 protocols : String\001
+4 0 0 50 -1 -1 12 0.0000 4 180 1080 1950 6930 ciphers : String\001
+4 0 0 50 -1 -1 12 0.0000 4 180 1545 1950 7170 boolean : requireAuth\001
+4 0 0 50 -1 -1 12 0.0000 4 180 1560 1950 7410 properties : Properties\001
+4 0 0 50 -1 2 12 0.0000 4 180 855 2325 6075 SSLConfig\001
+-6
+6 3150 2025 5325 3450
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 3150 2025 5325 2025 5325 3450 3150 3450 3150 2025
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 3150 2400 5325 2400
+4 0 0 50 -1 -1 12 0.0000 4 180 1500 3300 2625 displayName : String\001
+4 0 0 50 -1 -1 12 0.0000 4 180 1320 3300 2865 logger : LogWriter\001
+4 0 0 50 -1 -1 12 0.0000 4 180 930 3300 3105 logLevel : int\001
+4 0 0 50 -1 -1 12 0.0000 4 135 1935 3300 3345 alertListener : AlertListener\001
+4 0 0 50 -1 2 12 0.0000 4 180 1875 3300 2250 GfManagerAgentConfig\001
+-6
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	1 0 1.00 120.00 120.00
+	 1050 3825 1050 2925
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 2250 3975 3225 3975
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 2250 4500 3225 4500
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 1800 4800 2250 5850
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 3825 5100 3075 5850
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 60.00 120.00
+	 1875 2775 3150 2775
+4 0 0 50 -1 0 12 0.0000 4 135 210 2400 3900 ids\001
+4 0 0 50 -1 0 12 0.0000 4 75 90 3000 3900 *\001
+4 0 0 50 -1 0 12 0.0000 4 135 555 2325 4425 mcastId\001
+4 0 0 50 -1 -1 12 0.0000 4 180 690 2100 5250 sslConfig\001
+4 0 0 50 -1 -1 12 0.0000 4 180 690 3600 5550 sslConfig\001
+-6
+6 6600 2025 12300 2700
+6 6600 2100 9300 2700
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6600 2400 9300 2400
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 6600 2100 9300 2100 9300 2700 6600 2700 6600 2100
+4 0 0 50 -1 2 12 0.0000 4 180 1935 6975 2325 RemoteGfManagerAgent\001
+4 0 0 50 -1 -1 12 0.0000 4 180 1485 6750 2625 licsenseType : String\001
+-6
+6 9300 2025 10725 2250
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 9300 2250 10725 2250
+4 0 0 50 -1 -1 12 0.0000 4 135 585 9450 2175 listeners\001
+4 0 0 50 -1 -1 12 0.0000 4 75 90 10500 2175 *\001
+-6
+6 10725 2100 12300 2400
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 10725 2100 12300 2100 12300 2400 10725 2400 10725 2100
+4 0 0 50 -1 3 12 0.0000 4 150 1350 10875 2325 JoinLeaveListener\001
+-6
+-6
+6 9450 5550 11025 6150
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 9450 6150 11025 6150 11025 5550 9450 5550 9450 6150
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 9450 5850 11025 5850
+4 0 0 50 -1 2 12 0.0000 4 180 1080 9750 5775 AdminRegion\001
+4 0 0 50 -1 -1 12 0.0000 4 180 1425 9525 6075 globalName : String\001
+-6
+6 9900 4725 10500 5025
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 9900 4725 10500 4725 10500 5025 9900 5025 9900 4725
+4 0 0 50 -1 1 12 0.0000 4 180 495 9975 4950 Region\001
+-6
+6 11475 4725 12825 5025
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 11475 4725 12825 4725 12825 5025 11475 5025 11475 4725
+4 0 0 50 -1 1 12 0.0000 4 180 1185 11550 4950 RegionAttributes\001
+-6
+6 11100 6525 13125 6825
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 11100 6525 13125 6525 13125 6825 11100 6825 11100 6525
+4 0 0 50 -1 2 12 0.0000 4 180 1920 11175 6750 RemoteRegionAttributes\001
+-6
+6 4350 5550 6525 6975
+6 4425 6000 6450 6975
+4 0 0 50 -1 -1 12 0.0000 4 180 945 4425 6150 name : String\001
+4 0 0 50 -1 -1 12 0.0000 4 135 450 4425 6390 id : int\001
+4 0 0 50 -1 -1 12 0.0000 4 135 1140 4425 6630 closed : boolean\001
+4 0 0 50 -1 -1 12 0.0000 4 180 1980 4425 6870 rootRegionNames : String[]\001
+-6
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 4350 5925 6525 5925
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4350 6975 6525 6975 6525 5550 4350 5550 4350 6975
+4 0 0 50 -1 2 12 0.0000 4 135 1395 4725 5775 RemoteCacheInfo\001
+-6
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 6825 2700 6825 7725
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 9075 2700 9075 7725
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 6600 2250 5325 2250
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 7050 5700 6525 5700
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 8850 5700 9450 5700
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	1 0 1.00 120.00 120.00
+	 10200 5550 10200 5025
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	1 0 1.00 120.00 120.00
+	 12075 6525 12075 5025
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 10350 6150 11100 6675
+4 0 0 50 -1 -1 12 0.0000 4 75 90 9150 7725 *\001
+4 0 0 50 -1 -1 12 0.0000 4 75 90 6900 7725 *\001
+4 0 0 50 -1 -1 12 0.0000 4 135 675 6075 3000 managers\001
+4 0 0 50 -1 -1 12 0.0000 4 180 450 6075 2175 config\001
+4 0 0 50 -1 -1 12 0.0000 4 75 90 9300 5625 *\001
+4 0 0 50 -1 -1 12 0.0000 4 135 645 9150 3000 members\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/class-hierarchy.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/class-hierarchy.gif b/geode-core/src/main/resources/javadoc-images/class-hierarchy.gif
new file mode 100644
index 0000000..9cef97a
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/class-hierarchy.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/client_static_diagram.png
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/client_static_diagram.png b/geode-core/src/main/resources/javadoc-images/client_static_diagram.png
new file mode 100644
index 0000000..afbeaa4
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/client_static_diagram.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/data-serialization-exceptions.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/data-serialization-exceptions.fig b/geode-core/src/main/resources/javadoc-images/data-serialization-exceptions.fig
new file mode 100644
index 0000000..8d5eb70
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/data-serialization-exceptions.fig
@@ -0,0 +1,135 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 675 2250 3600 5025
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 1575 4275 168 168 1575 4275 1650 4125
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 2700 4275 168 168 2700 4275 2775 4125
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 900 3375 168 168 900 3375 975 3225
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 2700 4275 168 168 2700 4275 2625 4125
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 3375 3375 168 168 3375 3375 3300 3225
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 1575 2475 168 168 1575 2475 1650 2625
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 2700 2475 168 168 2700 2475 2775 2625
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 900 3375 168 168 900 3375 975 3525
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 2700 2475 168 168 2700 2475 2625 2625
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 3375 3375 168 168 3375 3375 3300 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 975 3525 1425 4200
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 1725 4275 2550 4275
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 3300 3525 2850 4200
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 2550 4275 1725 4275
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 975 3225 1425 2550
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 1725 2475 2550 2475
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 3300 3225 2850 2550
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 2550 2475 1725 2475
+4 0 0 50 -1 0 16 0.0000 4 210 1245 1575 4950 Infinite Loop\001
+-6
+6 4650 2175 6450 4575
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 5550 4350 168 168 5550 4350 5625 4500
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 4875 3375 168 168 4875 3375 4950 3525
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 5550 4350 168 168 5550 4350 5475 4500
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 6225 3375 168 168 6225 3375 6150 3525
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 5550 2400 168 168 5550 2400 5475 2250
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 6225 3375 168 168 6225 3375 6150 3225
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 5550 2400 168 168 5550 2400 5625 2250
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 4875 3375 168 168 4875 3375 4950 3225
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 5475 4200 4950 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 5625 4200 6150 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 5625 2550 6150 3225
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 5475 2550 4950 3225
+-6
+6 9450 2175 11250 4575
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 9675 3375 168 168 9675 3375 9750 3525
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 11025 3375 168 168 11025 3375 10950 3525
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 10350 2400 168 168 10350 2400 10275 2250
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 11025 3375 168 168 11025 3375 10950 3225
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 10350 2400 168 168 10350 2400 10425 2250
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 9675 3375 168 168 9675 3375 9750 3225
+1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 9675 4332 168 168 9675 4332 9600 4482
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 11025 4350 168 168 11025 4350 11100 4500
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 10425 2550 10950 3225
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 10275 2550 9750 3225
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 9675 3525 9675 4200
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 11025 3525 11025 4200
+-6
+6 7200 3300 8475 3525
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7200 3300 8475 3300 8475 3525 7200 3525 7200 3300
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7275 3300 7275 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7350 3300 7350 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7425 3300 7425 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7500 3300 7500 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7575 3300 7575 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7650 3300 7650 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7725 3300 7725 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7800 3300 7800 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7875 3300 7875 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7950 3300 7950 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 8025 3300 8025 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 8100 3300 8100 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 8250 3300 8250 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 8325 3300 8325 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 8400 3300 8400 3525
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 8175 3300 8175 3525
+-6
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
+	0 0 1.00 120.00 120.00
+	 6600 3000 6225 3000
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 120.00 120.00
+	 7725 3750 8025 3750
+2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 4050 2025 4050 5250
+4 0 0 50 -1 0 16 0.0000 4 210 1260 6750 3075 writeObject()\001
+4 0 0 50 -1 0 16 0.0000 4 210 1185 8100 3825 readObject()\001
+4 0 0 50 -1 0 16 0.0000 4 210 4650 5625 4950 readObject() does not maintain referntial integrity\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/data-serialization-exceptions.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/data-serialization-exceptions.gif b/geode-core/src/main/resources/javadoc-images/data-serialization-exceptions.gif
new file mode 100644
index 0000000..f2c98e0
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/data-serialization-exceptions.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/distribution-managers.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/distribution-managers.fig b/geode-core/src/main/resources/javadoc-images/distribution-managers.fig
new file mode 100644
index 0000000..591bf38
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/distribution-managers.fig
@@ -0,0 +1,76 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 3225 4800 4275 5250
+4 1 4 50 0 0 12 0.0000 4 135 660 3750 4950 GemFire\001
+4 1 4 50 0 0 12 0.0000 4 180 1020 3750 5190 Manager VM\001
+-6
+6 3375 5550 4125 5850
+2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3375 5550 4125 5550 4125 5850 3375 5850 3375 5550
+4 1 4 50 0 0 12 0.0000 4 135 300 3750 5775 DM\001
+-6
+6 3450 3525 5400 3975
+2 4 0 3 0 7 50 0 -1 0.000 0 0 7 0 0 5
+	 5325 3900 5325 3600 3525 3600 3525 3900 5325 3900
+4 1 0 50 0 0 12 0.0000 4 135 1560 4425 3825 Distribution Channel\001
+-6
+6 5400 1800 7350 2850
+6 5625 2400 6225 2700
+2 2 0 1 1 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 5625 2400 6225 2400 6225 2700 5625 2700 5625 2400
+4 1 1 50 0 0 12 0.0000 4 135 435 5925 2625 ADM\001
+-6
+2 2 0 1 1 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 5400 1800 7350 1800 7350 2850 5400 2850 5400 1800
+4 1 1 50 0 0 12 0.0000 4 135 1320 6375 2025 GemFire Console\001
+-6
+6 5550 4125 6300 5100
+6 5625 4275 6225 4725
+4 1 23 50 0 0 12 0.0000 4 135 585 5925 4425 Locator\001
+4 1 23 50 0 0 12 0.0000 4 135 300 5925 4665 VM\001
+-6
+2 2 0 1 23 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 5550 4125 6300 4125 6300 5100 5550 5100 5550 4125
+-6
+6 4875 5250 6750 5925
+4 0 23 50 0 1 12 0.0000 4 135 1800 4875 5400 DMs contact the locator\001
+4 0 23 50 0 1 12 0.0000 4 180 1935 4875 5640 to find the other members\001
+4 0 23 50 0 1 12 0.0000 4 180 1920 4875 5880 of the distributed system.\001
+-6
+6 6825 4425 10350 6300
+6 6975 5775 9750 6000
+-6
+6 7050 6000 10275 6150
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
+	 7425 6075 7050 6075
+4 0 0 50 0 0 12 0.0000 4 135 2865 7575 6150 Connection to the distribution channel\001
+-6
+2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
+	 6825 4425 10350 4425 10350 6300 6825 6300 6825 4425
+4 0 0 50 0 2 12 0.0000 4 180 690 6975 4725 Lengend\001
+4 0 4 50 0 0 12 0.0000 4 180 2910 6975 5445 DM - NORMAL DistributionManager\001
+4 0 1 50 0 0 12 0.0000 4 180 3165 6975 5685 ADM - Admin-only DistributionManager\001
+-6
+2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
+	 3075 4725 4350 4725 4350 6000 3075 6000 3075 4725
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 1 2
+	0 0 1.00 60.00 120.00
+	0 0 1.00 60.00 120.00
+	 4125 5700 5025 3900
+2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 1 2
+	0 0 1.00 60.00 120.00
+	0 0 1.00 60.00 120.00
+	 5925 2700 4725 3600
+2 1 0 1 23 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 4125 5775 5550 4575
+2 1 0 1 23 7 50 0 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 5700 2700 5700 4125

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/distribution-managers.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/distribution-managers.gif b/geode-core/src/main/resources/javadoc-images/distribution-managers.gif
new file mode 100644
index 0000000..b245730
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/distribution-managers.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/elder.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/elder.fig b/geode-core/src/main/resources/javadoc-images/elder.fig
new file mode 100644
index 0000000..aa01d0f
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/elder.fig
@@ -0,0 +1,84 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 1125 5475 2625 6600
+6 1275 6150 2475 6450
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 1275 6150 2475 6150 2475 6450 1275 6450 1275 6150
+4 0 0 50 -1 0 12 0.0000 4 135 1005 1350 6375 "locks2" DLS\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 1125 6600 2625 6600 2625 5475 1125 5475 1125 6600
+4 0 0 50 -1 0 12 0.0000 4 135 885 1425 5775 frodo:12004\001
+-6
+6 3225 4500 4275 5100
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 3225 4500 4275 4500 4275 5100 3225 5100 3225 4500
+4 1 0 50 -1 0 12 0.0000 4 135 795 3750 4725 Distributed\001
+4 1 0 50 -1 0 12 0.0000 4 180 525 3750 4965 System\001
+-6
+6 4575 2325 6075 3600
+6 4725 2925 5925 3450
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4725 2925 5925 2925 5925 3450 4725 3450 4725 2925
+4 1 0 50 -1 0 12 0.0000 4 135 1005 5325 3150 "locks1" DLS\001
+4 1 0 50 -1 0 12 0.0000 4 135 885 5325 3390 GRANTOR\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4575 3600 6075 3600 6075 2325 4575 2325 4575 3600
+4 0 0 50 -1 0 12 0.0000 4 135 885 4875 2550 frodo:12002\001
+-6
+6 4650 5025 6000 6600
+6 4725 6000 5925 6525
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4725 6000 5925 6000 5925 6525 4725 6525 4725 6000
+4 1 0 50 -1 0 12 0.0000 4 135 885 5325 6465 GRANTOR\001
+4 1 0 50 -1 0 12 0.0000 4 135 1005 5325 6225 "locks2" DLS\001
+-6
+6 4725 5550 5925 5850
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4725 5550 5925 5550 5925 5850 4725 5850 4725 5550
+4 0 0 50 -1 0 12 0.0000 4 135 1005 4800 5775 "locks1" DLS\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4650 6600 6000 6600 6000 5025 4650 5025 4650 6600
+4 0 0 50 -1 0 12 0.0000 4 135 885 4875 5250 frodo:12003\001
+-6
+6 825 4275 2325 5250
+4 0 0 50 -1 1 12 0.0000 4 180 1455 825 4425 A newly created lock\001
+4 0 0 50 -1 1 12 0.0000 4 135 1290 825 4665 service asks Elder\001
+4 0 0 50 -1 1 12 0.0000 4 135 1125 825 4905 who the current\001
+4 0 0 50 -1 1 12 0.0000 4 180 765 825 5145 grantor is.\001
+-6
+6 5850 3975 7350 4425
+4 0 0 50 -1 1 12 0.0000 4 135 1470 5850 4125 A lock service knows\001
+4 0 0 50 -1 1 12 0.0000 4 180 1320 5850 4365 who its gratnor is.\001
+-6
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 1425 3975 3375 3975 3375 2775 1425 2775 1425 3975
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 1350 4050 3450 4050 3450 2325 1350 2325 1350 4050
+2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 2400 6150 2400 3975
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 3450 4500 3150 4050
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 4050 4500 4725 3600
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 4275 4950 4650 5100
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 3375 5100 2625 5775
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 5775 5550 5775 3450
+4 0 0 50 -1 0 12 0.0000 4 135 1800 1500 3600 "locks1" -> frodo:12002\001
+4 0 0 50 -1 0 12 0.0000 4 135 1800 1500 3840 "locks2" -> frodo:12003\001
+4 0 0 50 -1 0 16 0.0000 4 165 510 2100 3075 Elder\001
+4 0 0 50 -1 0 12 0.0000 4 135 885 1950 2550 frodo:12001\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/elder.jpg
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/elder.jpg b/geode-core/src/main/resources/javadoc-images/elder.jpg
new file mode 100644
index 0000000..09ea45b
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/elder.jpg differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/entry-life-cycle.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/entry-life-cycle.fig b/geode-core/src/main/resources/javadoc-images/entry-life-cycle.fig
new file mode 100644
index 0000000..e3108e5
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/entry-life-cycle.fig
@@ -0,0 +1,64 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+5 1 0 1 0 7 50 -1 -1 0.000 0 1 1 0 8243.750 2775.000 8175 3150 8625 2775 8175 2400
+	0 0 1.00 60.00 120.00
+5 1 0 1 0 7 50 -1 -1 0.000 0 0 1 0 4537.500 11400.000 1575 1875 4500 1425 7500 1875
+	0 0 1.00 60.00 120.00
+5 1 0 1 0 7 50 -1 -1 0.000 0 0 1 0 4575.000 -8137.500 7575 3675 4575 4050 1575 3675
+	0 0 1.00 60.00 120.00
+6 975 1875 2325 3675
+2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 975 1875 2325 1875 2325 3675 975 3675 975 1875
+4 1 1 50 -1 0 12 0.0000 4 180 510 1650 2175 Region\001
+-6
+6 3900 1875 5250 3675
+6 4050 2625 5100 3000
+2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 4050 2625 5100 2625 5100 3000 4050 3000 4050 2625
+2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 4500 2625 4500 3000
+4 1 1 50 -1 0 12 0.0000 4 180 255 4275 2850 key\001
+-6
+2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 3900 1875 5250 1875 5250 3675 3900 3675 3900 1875
+4 1 1 50 -1 0 12 0.0000 4 180 510 4575 2175 Region\001
+-6
+6 6825 1875 8175 3675
+6 6975 2625 8025 3000
+2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 6975 2625 8025 2625 8025 3000 6975 3000 6975 2625
+2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7425 2625 7425 3000
+4 1 1 50 -1 0 12 0.0000 4 180 255 7200 2850 key\001
+4 1 1 50 -1 0 12 0.0000 4 135 375 7725 2850 value\001
+-6
+2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 6825 1875 8175 1875 8175 3675 6825 3675 6825 1875
+4 1 1 50 -1 0 12 0.0000 4 180 510 7500 2175 Region\001
+-6
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 2325 2475 3900 2475
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 3900 3000 2325 3000
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 5250 2400 6825 2400
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 6825 3000 5250 3000
+4 1 0 50 -1 0 12 0.0000 4 180 1140 3075 2325 create(key, null)\001
+4 1 0 50 -1 0 12 0.0000 4 180 900 3075 3300 destroy(key)\001
+4 1 0 50 -1 0 12 0.0000 4 180 1065 6000 2250 put(key, value)\001
+4 1 0 50 -1 0 12 0.0000 4 180 1050 6075 3300 invalidate(key)\001
+4 1 0 50 -1 0 12 0.0000 4 180 2640 4500 1275 create(key, value)  or  put(key, value)\001
+4 1 0 50 -1 0 12 0.0000 4 180 900 4575 4350 destroy(key)\001
+4 1 0 50 -1 0 12 0.0000 4 180 1065 9300 2850 put(key, value)\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/entry-life-cycle.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/entry-life-cycle.gif b/geode-core/src/main/resources/javadoc-images/entry-life-cycle.gif
new file mode 100644
index 0000000..02de9d4
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/entry-life-cycle.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/eventmatrix.xls
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/eventmatrix.xls b/geode-core/src/main/resources/javadoc-images/eventmatrix.xls
new file mode 100644
index 0000000..769698a
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/eventmatrix.xls differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/example-cache.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/example-cache.xml b/geode-core/src/main/resources/javadoc-images/example-cache.xml
new file mode 100644
index 0000000..0061b5c
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/example-cache.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- A sample GemFire declarative caching XML File -->
+
+<cache
+    xmlns="http://schema.pivotal.io/gemfire/cache"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
+    search-timeout="60" lock-lease="300" copy-on-read="false" version="8.1">
+
+  <!-- Create a partition region -->
+  <region name="myPartitionedRegion" refid="PARTITION">
+    <region-attributes>
+      <partition-attributes local-max-memory="32"/>
+
+      <cache-loader>
+        <class-name>com.company.app.DBLoader</class-name>
+      </cache-loader>
+
+      <eviction-attributes>
+        <lru-entry-count maximum="1000" action="local-destroy"/>
+      </eviction-attributes>
+
+    </region-attributes>
+  </region>
+  
+  <!-- Create a replicate region -->
+  <region name="customers" refid="REPLICATE">
+    <region-attributes>
+
+      <entry-time-to-live>
+        <expiration-attributes action="destroy" timeout="3000"/>
+      </entry-time-to-live>
+
+      <entry-idle-time>
+        <expiration-attributes timeout="600"/>
+      </entry-idle-time>
+
+      <cache-loader>
+        <class-name>com.company.app.DBLoader</class-name>
+        <parameter name="URL">
+          <string>jdbc://12.34.56.78/mydb</string>
+        </parameter>
+      </cache-loader>
+
+      <eviction-attributes>
+        <lru-memory-size maximum="1000" action="overflow-to-disk"> 
+          <class-name>com.company.data.MySizer</class-name>
+          <parameter name="name">
+            <string>SuperSizer</string>
+          </parameter>
+        </lru-memory-size>
+      </eviction-attributes>
+
+    </region-attributes>
+
+    <!-- Add an entry whose value is a Declarable object -->
+    <entry>
+      <key><string>Louise Jones</string></key>
+      <value>
+        <declarable>
+          <class-name>com.company.app.Customer</class-name>
+          <parameter name="name">
+            <string>Louise Jones</string>
+          </parameter>
+          <parameter name="address1">
+            <string>123 Main Street</string>
+          </parameter>
+          <parameter name="city">
+            <string>New York</string>
+          </parameter>
+          <parameter name="state">
+            <string>NY</string>
+          </parameter>
+          <parameter name="zip">
+            <string>12345</string>
+          </parameter>
+        </declarable>
+      </value>
+    </entry>
+  </region>
+</cache>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/example-client-cache.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/example-client-cache.xml b/geode-core/src/main/resources/javadoc-images/example-client-cache.xml
new file mode 100644
index 0000000..bddeb9f
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/example-client-cache.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- A sample client GemFire declarative caching XML File -->
+
+<!DOCTYPE client-cache PUBLIC
+  "-//GemStone Systems, Inc.//GemFire Declarative Cache 6.5//EN"
+  "http://www.gemstone.com/dtd/cache6_5.dtd">
+<client-cache copy-on-read="false">
+
+  <pool name="myPool">
+    <locator host="myHostName" port="41111"/>
+  </pool>
+
+  <!-- Create a proxy region -->
+  <region name="region1" refid="PROXY"/>
+
+  <!-- Create a caching proxy region -->
+  <region name="region2" refid="CACHING_PROXY">
+    <region-attributes>
+
+      <entry-time-to-live>
+        <expiration-attributes action="destroy" timeout="3000"/>
+      </entry-time-to-live>
+
+      <entry-idle-time>
+        <expiration-attributes timeout="600"/>
+      </entry-idle-time>
+    </region-attributes>
+  </region>
+</client-cache>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/example2-cache.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/example2-cache.xml b/geode-core/src/main/resources/javadoc-images/example2-cache.xml
new file mode 100644
index 0000000..b65c285
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/example2-cache.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<cache
+    xmlns="http://schema.pivotal.io/gemfire/cache"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
+    is-server="true" search-timeout="60" version="8.1">
+  <cache-transaction-manager>
+    <transaction-listener>
+       <class-name>com.company.data.MyTransactionListener</class-name>
+       <parameter name="URL">
+         <string>jdbc:cloudscape:rmi:MyData</string>
+       </parameter>
+    </transaction-listener>    
+  </cache-transaction-manager>
+
+  <cache-server port="12345" max-connections="256"/>
+
+  <region name="myRegion" refid="REPLICATE">
+    <region-attributes scope="global">
+      <entry-time-to-live>
+        <expiration-attributes action="invalidate" timeout="60"/>
+      </entry-time-to-live>
+      <cache-loader>
+        <class-name>com.company.data.DatabaseLoader</class-name>
+        <parameter name="URL">
+          <string>jdbc:cloudscape:rmi:MyData</string>
+        </parameter>
+      </cache-loader>
+    </region-attributes>
+  </region>
+
+  <region name="myOtherRegion" refid="REPLICATE">
+    <entry>
+      <key><string>MyKey</string></key>
+      <value><string>MyValue</string></value>
+    </entry>
+    <entry>
+      <key><string>MyOtherKey</string></key>
+      <value>
+        <declarable>
+          <class-name>com.company.data.MyDeclarable</class-name>
+        </declarable>
+      </value>
+    </entry>
+  </region>
+</cache>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/example3-cache.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/example3-cache.xml b/geode-core/src/main/resources/javadoc-images/example3-cache.xml
new file mode 100644
index 0000000..803e72e
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/example3-cache.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- A sample GemFire declarative caching XML File that demonstrates
+     the "named region attributes" feature.
+-->
+
+<cache
+    xmlns="http://schema.pivotal.io/gemfire/cache"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
+    version="8.1">
+  <region-attributes id="template" statistics-enabled="true" 
+                     scope="distributed-ack">
+    <key-constraint>java.lang.String</key-constraint>
+    <value-constraint>com.company.app.Customer</value-constraint>
+    <entry-idle-time>
+      <expiration-attributes timeout="60"/>
+    </entry-idle-time>
+  </region-attributes>
+
+  <!-- define a named region-attributes that uses the predefined REPLICATE -->
+  <region-attributes id="distributed" refid="REPLICATE">
+    <cache-loader>
+      <class-name>com.company.app.DBLoader</class-name>
+    </cache-loader>
+  </region-attributes>
+
+  <region-attributes id="persistent" refid="distributed"
+                     data-policy="persistent-replicate"> 
+    <eviction-attributes>
+      <lru-entry-count maximum="1000" action="overflow-to-disk"/>
+    </eviction-attributes>
+  </region-attributes>
+
+  <region name="customers" refid="template"/>
+  <region name="customers-west" refid="template"/>
+  <region name="customers-central" refid="template"/>
+  <region name="customers-east" refid="template"/>
+
+  <region name="orders" refid="template"/>
+  <region name="orders-west" refid="persistent"/>
+  <region name="orders-central" refid="persistent"/>
+  <region name="orders-east" refid="persistent"/>
+</cache>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/extensible-hashing.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/extensible-hashing.fig b/geode-core/src/main/resources/javadoc-images/extensible-hashing.fig
new file mode 100644
index 0000000..1a33d46
--- /dev/null
+++ b/geode-core/src/main/resources/javadoc-images/extensible-hashing.fig
@@ -0,0 +1,159 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter  
+100.00
+Single
+-2
+1200 2
+6 8700 2550 9975 3300
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 8700 2550 9975 2550 9975 3300 8700 3300 8700 2550
+4 0 0 50 -1 0 12 0.0000 4 180 1095 8775 3000 localDepth = 2\001
+4 0 0 50 -1 0 12 0.0000 4 135 1005 8775 3225 locations = ...\001
+4 0 0 50 -1 2 12 0.0000 4 135 1005 8775 2775 BucketInfo2\001
+-6
+6 8700 3450 9975 4200
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 8700 3450 9975 3450 9975 4200 8700 4200 8700 3450
+4 0 0 50 -1 0 12 0.0000 4 180 1095 8775 3900 localDepth = 3\001
+4 0 0 50 -1 0 12 0.0000 4 135 1005 8775 4125 locations = ...\001
+4 0 0 50 -1 2 12 0.0000 4 135 1005 8775 3675 BucketInfo3\001
+-6
+6 8700 1650 9975 2400
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 8700 1650 9975 1650 9975 2400 8700 2400 8700 1650
+4 0 0 50 -1 0 12 0.0000 4 180 1095 8775 2100 localDepth = 2\001
+4 0 0 50 -1 0 12 0.0000 4 135 1005 8775 2325 locations = ...\001
+4 0 0 50 -1 2 12 0.0000 4 135 1005 8775 1875 BucketInfo1\001
+-6
+6 8700 750 9975 1500
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 8700 750 9975 750 9975 1500 8700 1500 8700 750
+4 0 0 50 -1 2 12 0.0000 4 135 1005 8775 975 BucketInfo0\001
+4 0 0 50 -1 0 12 0.0000 4 180 1095 8775 1200 localDepth = 2\001
+4 0 0 50 -1 0 12 0.0000 4 135 1005 8775 1425 locations = ...\001
+-6
+6 900 1875 1800 3075
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 1275 2775 1800 2775
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 1275 1875 1800 1875 1800 3075 1275 3075 1275 1875
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 1275 2175 1800 2175
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 1275 2475 1800 2475
+4 0 0 50 -1 0 12 0.0000 4 135 180 900 3000 11\001
+4 0 0 50 -1 0 12 0.0000 4 135 180 900 2700 10\001
+4 0 0 50 -1 0 12 0.0000 4 135 180 900 2400 01\001
+4 0 0 50 -1 0 12 0.0000 4 135 180 900 2100 00\001
+-6
+6 2250 2550 3525 3300
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 2250 2550 3525 2550 3525 3300 2250 3300 2250 2550
+4 0 0 50 -1 0 12 0.0000 4 180 1095 2325 3000 localDepth = 2\001
+4 0 0 50 -1 0 12 0.0000 4 135 1005 2325 3225 locations = ...\001
+4 0 0 50 -1 2 12 0.0000 4 135 1005 2325 2775 BucketInfo2\001
+-6
+6 2250 3450 3525 4200
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 2250 3450 3525 3450 3525 4200 2250 4200 2250 3450
+4 0 0 50 -1 2 12 0.0000 4 135 1005 2325 3675 BucketInfo3\001
+4 0 0 50 -1 0 12 0.0000 4 180 1095 2325 3900 localDepth = 2\001
+4 0 0 50 -1 0 12 0.0000 4 135 1005 2325 4125 locations = ...\001
+-6
+6 2250 1650 3525 2400
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 2250 1650 3525 1650 3525 2400 2250 2400 2250 1650
+4 0 0 50 -1 2 12 0.0000 4 135 1005 2325 1875 BucketInfo1\001
+4 0 0 50 -1 0 12 0.0000 4 180 1095 2325 2100 localDepth = 2\001
+4 0 0 50 -1 0 12 0.0000 4 135 1005 2325 2325 locations = ...\001
+-6
+6 2250 750 3525 1500
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 2250 750 3525 750 3525 1500 2250 1500 2250 750
+4 0 0 50 -1 2 12 0.0000 4 135 1005 2325 975 BucketInfo0\001
+4 0 0 50 -1 0 12 0.0000 4 180 1095 2325 1200 localDepth = 2\001
+4 0 0 50 -1 0 12 0.0000 4 135 1005 2325 1425 locations = ...\001
+-6
+6 8700 4350 9975 5100
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 8700 4350 9975 4350 9975 5100 8700 5100 8700 4350
+4 0 0 50 -1 2 12 0.0000 4 135 1005 8775 4575 BucketInfo7\001
+4 0 0 50 -1 0 12 0.0000 4 180 1095 8775 4800 localDepth = 3\001
+4 0 0 50 -1 0 12 0.0000 4 135 1005 8775 5025 locations = ...\001
+-6
+6 3975 2250 6225 3300
+4 0 0 50 -1 1 12 0.0000 4 135 1980 3975 2400 When Bucket3 reaches the\001
+4 0 0 50 -1 1 12 0.0000 4 180 2190 3975 2625 maximum size, it is split into\001
+4 0 0 50 -1 1 12 0.0000 4 135 1935 3975 2850 two buckets: Bucket3 and\001
+4 0 0 50 -1 1 12 0.0000 4 135 2190 3975 3075 Bucket7.  Three bits are used\001
+4 0 0 50 -1 1 12 0.0000 4 135 1035 3975 3300 to index data.\001
+-6
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 8250 1950 8700 1125
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 8250 2325 8700 2025
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 8250 2625 8700 2925
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 8250 2925 8700 3750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 1800 1950 2250 1125
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 1800 2325 2250 2025
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 1800 2625 2250 2925
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 1800 2925 2250 3750
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7725 2775 8250 2775
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7725 1875 8250 1875 8250 3075 7725 3075 7725 1875
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7725 2175 8250 2175
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7725 2475 8250 2475
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7725 3975 8250 3975
+2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
+	 7725 3075 8250 3075 8250 4275 7725 4275 7725 3075
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7725 3375 8250 3375
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
+	 7725 3675 8250 3675
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 8250 3225 8700 1200
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 8250 3525 8700 2025
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 8250 3825 8700 2925
+2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
+	0 0 1.00 60.00 120.00
+	 8250 4125 8700 4725
+4 0 0 50 -1 2 12 0.0000 4 180 1365 6825 1275 BucketDirectory\001
+4 0 0 50 -1 0 12 0.0000 4 180 1200 6825 1500 globalDepth = 3\001
+4 0 0 50 -1 2 12 0.0000 4 180 1365 375 1275 BucketDirectory\001
+4 0 0 50 -1 0 12 0.0000 4 180 1200 375 1500 globalDepth = 2\001
+4 0 0 50 -1 0 12 0.0000 4 135 270 7350 3000 011\001
+4 0 0 50 -1 0 12 0.0000 4 135 270 7350 2700 010\001
+4 0 0 50 -1 0 12 0.0000 4 135 270 7350 2400 001\001
+4 0 0 50 -1 0 12 0.0000 4 135 270 7350 2100 000\001
+4 0 0 50 -1 0 12 0.0000 4 135 270 7350 4200 111\001
+4 0 0 50 -1 0 12 0.0000 4 135 270 7350 3900 110\001
+4 0 0 50 -1 0 12 0.0000 4 135 270 7350 3600 101\001
+4 0 0 50 -1 0 12 0.0000 4 135 270 7350 3300 100\001
+4 0 0 50 -1 0 12 0.0000 4 135 405 675 1800 mask\001
+4 0 0 50 -1 0 12 0.0000 4 135 405 7200 1800 mask\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/extensible-hashing.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/extensible-hashing.gif b/geode-core/src/main/resources/javadoc-images/extensible-hashing.gif
new file mode 100644
index 0000000..58366a7
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/extensible-hashing.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/resources/javadoc-images/health-classes.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/javadoc-images/health-classes.gif b/geode-core/src/main/resources/javadoc-images/health-classes.gif
new file mode 100644
index 0000000..131347a
Binary files /dev/null and b/geode-core/src/main/resources/javadoc-images/health-classes.gif differ


[54/54] [abbrv] incubator-geode git commit: GEODE-17: WIP integrating Pulse with new security

Posted by je...@apache.org.
GEODE-17: WIP integrating Pulse with new security

- After refactoring some Pulse test code, various tests are broken as
  they seem to depend on prior test state.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/fed95002
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/fed95002
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/fed95002

Branch: refs/heads/feature/GEODE-17-2
Commit: fed950025ed1008bb0d65f433a94bf39360746bb
Parents: da7a76d
Author: Jens Deppe <jd...@pivotal.io>
Authored: Mon Mar 21 13:37:34 2016 -0700
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Mar 21 13:37:34 2016 -0700

----------------------------------------------------------------------
 .../cache/operations/OperationContext.java      |    2 +
 .../internal/security/MBeanServerWrapper.java   |   13 +-
 .../security/ManagementInterceptor.java         |    4 +-
 .../management/internal/security/Resource.java  |    1 +
 .../internal/security/ResourceConstants.java    |    2 -
 .../gemfire/security/AccessControl.java         |   12 +-
 .../gemfire/security/Authenticator.java         |   17 +-
 geode-pulse/build.gradle                        |    1 +
 .../tools/pulse/internal/data/Cluster.java      |    4 +-
 .../pulse/internal/data/JMXDataUpdater.java     |   53 +-
 .../pulse/internal/data/PulseConstants.java     |    5 +-
 .../pulse/internal/log/PulseLogWriter.java      |    4 -
 .../security/GemFireAuthentication.java         |    9 +-
 .../security/GemFireAuthenticationProvider.java |   82 +-
 .../tools/pulse/testbed/driver/PulseUITest.java |    2 +-
 .../pulse/tests/DataBrowserResultLoader.java    |   14 +-
 .../tools/pulse/tests/PulseAbstractTest.java    | 1038 ++++++++++++++++++
 .../tools/pulse/tests/PulseAuthTest.java        |   33 +
 .../tools/pulse/tests/PulseAutomatedTest.java   |   16 +-
 .../tools/pulse/tests/PulseBaseTest.java        |    4 +-
 .../tools/pulse/tests/PulseNoAuthTest.java      |   33 +
 .../gemfire/tools/pulse/tests/PulseTest.java    | 1038 ------------------
 .../gemfire/tools/pulse/tests/Server.java       |  130 +--
 geode-pulse/src/test/resources/pulse-auth.json  |   21 +
 24 files changed, 1293 insertions(+), 1245 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/OperationContext.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/OperationContext.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/OperationContext.java
index f900796..3bd9bf6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/OperationContext.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/operations/OperationContext.java
@@ -82,6 +82,8 @@ public abstract class OperationContext {
     NETSTAT,
     PAUSE,
     PROCESS_COMMAND,
+    PULSE_DASHBOARD,
+    PULSE_DATABROWSER,
     PUT,
     PUTALL,
     QUERY,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/MBeanServerWrapper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/MBeanServerWrapper.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/MBeanServerWrapper.java
index bbf81d1..dfcae22 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/MBeanServerWrapper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/MBeanServerWrapper.java
@@ -160,12 +160,17 @@ public class MBeanServerWrapper implements MBeanServerForwarder {
   }
 
   @Override
-  public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException,
-      InstanceNotFoundException, ReflectionException {
+  public Object getAttribute(ObjectName name, String attribute) throws MBeanException, InstanceNotFoundException,
+      ReflectionException {
     ResourceOperationContext ctx = getOperationContext(name, attribute, false);
     doAuthorization(ctx);
-    Object result = mbs.getAttribute(name, attribute);
-    if(ctx != null) {
+    Object result;
+    try {
+      result = mbs.getAttribute(name, attribute);
+    } catch (AttributeNotFoundException nex) {
+      return null;
+    }
+    if (ctx != null) {
       ctx.setPostOperationResult(result);
     }
     doAuthorizationPost(ctx);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/ManagementInterceptor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/ManagementInterceptor.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/ManagementInterceptor.java
index 446ec10..639677b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/ManagementInterceptor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/ManagementInterceptor.java
@@ -57,7 +57,7 @@ import static com.gemstone.gemfire.management.internal.security.ResourceConstant
  * @since 9.0
  *
  */
-public class ManagementInterceptor implements JMXAuthenticator{
+public class ManagementInterceptor implements JMXAuthenticator {
 
   // FIXME: Merged from GEODE-17. Are they necessary?
 	public static final String USER_NAME = "security-username";
@@ -163,7 +163,7 @@ public class ManagementInterceptor implements JMXAuthenticator{
     Set<JMXPrincipal> principals = subject.getPrincipals(JMXPrincipal.class);
 
     if (principals == null || principals.isEmpty()) {
-      throw new SecurityException(ACCESS_DENIED_MESSAGE + ": No princial found.");
+      throw new SecurityException(ACCESS_DENIED_MESSAGE + ": No principal found.");
 		}
 
 		Principal principal = principals.iterator().next();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/Resource.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/Resource.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/Resource.java
index 51018cd..4c47e64 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/Resource.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/Resource.java
@@ -35,6 +35,7 @@ public enum Resource {
   MANAGER,
   MEMBER,
   PDX,
+  PULSE,
   QUERY,
   REGION
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java
index bfd8d11..5e072d9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java
@@ -109,8 +109,6 @@ public class ResourceConstants {
 
   public static final String PULSE_DASHBOARD = "PULSE_DASHBOARD";
   public static final String PULSE_DATABROWSER = "PULSE_DATABROWSER";
-  public static final String PULSE_ADMIN_V1 = "PULSE_ADMIN_V1";
-  public static final String PULSE_WEBGFSH = "PULSE_WEBGFSH";
 
   public static final String DATA_READ = "DATA_READ";
   public static final String DATA_WRITE = "DATA_WRITE";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-core/src/main/java/com/gemstone/gemfire/security/AccessControl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/security/AccessControl.java b/geode-core/src/main/java/com/gemstone/gemfire/security/AccessControl.java
index 349ba76..8ecc9c8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/security/AccessControl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/security/AccessControl.java
@@ -67,11 +67,15 @@ public interface AccessControl extends CacheCallback {
    *                 operations on that connection will throw
    *                 <code>NotAuthorizedException</code>
    */
-  public void init(Principal principal, DistributedMember remoteMember,
+  void init(Principal principal, DistributedMember remoteMember,
       Cache cache) throws NotAuthorizedException;
 
-  default public void init(Principal principal, DistributedMember remoteMember) throws NotAuthorizedException {
-    init(principal, remoteMember, CacheFactory.getAnyInstance());
+  default void init(Principal principal, DistributedMember remoteMember) throws NotAuthorizedException {
+    init(principal, remoteMember, null);
+  }
+
+  default void init(Principal principal) throws NotAuthorizedException {
+    init(principal, null, null);
   }
 
   /**
@@ -96,6 +100,6 @@ public interface AccessControl extends CacheCallback {
    * @return true if the operation is authorized and false otherwise
    * 
    */
-  public boolean authorizeOperation(String regionName, OperationContext context);
+  boolean authorizeOperation(String regionName, OperationContext context);
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-core/src/main/java/com/gemstone/gemfire/security/Authenticator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/security/Authenticator.java b/geode-core/src/main/java/com/gemstone/gemfire/security/Authenticator.java
index 4f9b6f2..796733f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/security/Authenticator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/security/Authenticator.java
@@ -18,9 +18,7 @@
 package com.gemstone.gemfire.security;
 
 import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheCallback;
-import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 
@@ -62,12 +60,11 @@ public interface Authenticator extends CacheCallback {
    * @throws AuthenticationFailedException
    *                 if some exception occurs during the initialization
    */
-  public void init(Properties securityProps, LogWriter systemLogger,
+  void init(Properties securityProps, LogWriter systemLogger,
       LogWriter securityLogger) throws AuthenticationFailedException;
 
-  default public void init(Properties securityProps)  throws AuthenticationFailedException{
-    Cache cache = CacheFactory.getAnyInstance();
-    init(securityProps, cache.getLogger(), cache.getSecurityLogger());
+  default void init(Properties securityProps)  throws AuthenticationFailedException{
+    init(securityProps, null, null);
   }
 
   /**
@@ -88,13 +85,11 @@ public interface Authenticator extends CacheCallback {
    * @throws AuthenticationFailedException
    *                 If the authentication of the client/peer fails.
    */
-  public Principal authenticate(Properties props, DistributedMember member)
+  Principal authenticate(Properties props, DistributedMember member)
       throws AuthenticationFailedException;
 
-  default public Principal authenticate(Properties props)
-      throws AuthenticationFailedException{
-    DistributedMember member = CacheFactory.getAnyInstance().getDistributedSystem().getDistributedMember();
-    return authenticate(props, member);
+  default Principal authenticate(Properties props) throws AuthenticationFailedException{
+    return authenticate(props, null);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/build.gradle
----------------------------------------------------------------------
diff --git a/geode-pulse/build.gradle b/geode-pulse/build.gradle
index 6dc7b02..b6c397a 100755
--- a/geode-pulse/build.gradle
+++ b/geode-pulse/build.gradle
@@ -59,6 +59,7 @@ dependencies {
 
   testCompile project(':geode-junit')
   testCompile project(':geode-core')
+  testCompile project(path: ':geode-core', configuration: 'testOutput')
 
   testCompile 'org.seleniumhq.selenium:selenium-firefox-driver:' + project.'selenium.version'
   testCompile 'org.seleniumhq.selenium:selenium-api:' + project.'selenium.version'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
index ce075bd..49ec7b3 100644
--- a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
+++ b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
@@ -2386,7 +2386,7 @@ public class Cluster extends Thread {
         }
       } catch (Exception e) {
         if (LOGGER.infoEnabled()) {
-          LOGGER.info("Exception Occured while updating cluster data : " + e.getMessage());
+          LOGGER.info("Exception Occurred while updating cluster data : " + e.getMessage());
         }
       }
 
@@ -2394,7 +2394,7 @@ public class Cluster extends Thread {
         Thread.sleep(POLL_INTERVAL);
       } catch (InterruptedException e) {
         if (LOGGER.infoEnabled()) {
-          LOGGER.info("InterruptedException Occured : " + e.getMessage());
+          LOGGER.info("InterruptedException Occurred : " + e.getMessage());
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
index bcd48ed..87b6e9c 100644
--- a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
+++ b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
@@ -1928,31 +1928,16 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
     }
   }
 
-  // /**
-  // * function used for creating member key with a combination
-  // * of member id and and member name
-  // * in key we are replacing ":" with "-" for both member id and name
-  // * @param id
-  // * @param name
-  // * @return
-  // */
-  // private String getMemberNameOrId(String id, String name){
-  // String key;
-  // if (id != null) {
-  // id = id.replace(":", "-");
-  // }
-  // if (name != null) {
-  // name = name.replace(":", "-");
-  // }
-  // key = id+name;
-  // return key;
-  // }
   /**
    * function used to handle Float data type if the value for mbean for an
    * attribute is null then return 0.0 as default value else return the
    * attribute value
    */
   private Float getFloatAttribute(Object object, String name) {
+    if (object == null) {
+      return Float.valueOf(0.0f);
+    }
+
     try {
       if (!(object.getClass().equals(Float.class))) {
         if (LOGGER.infoEnabled()) {
@@ -1967,7 +1952,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       }
     } catch (Exception e) {
       if (LOGGER.infoEnabled()) {
-        LOGGER.info("Exception Occured: " + e.getMessage());
+        LOGGER.info("Exception occurred: " + e.getMessage());
       }
       return Float.valueOf(0.0f);
     }
@@ -1979,6 +1964,10 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
    * value
    */
   private Integer getIntegerAttribute(Object object, String name) {
+    if (object == null) {
+      return Integer.valueOf(0);
+    }
+
     try {
       if (!(object.getClass().equals(Integer.class))) {
         if (LOGGER.infoEnabled()) {
@@ -1993,7 +1982,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       }
     } catch (Exception e) {
       if (LOGGER.infoEnabled()) {
-        LOGGER.info("Exception Occured: " + e.getMessage());
+        LOGGER.info("Exception occurred: " + e.getMessage());
       }
       return Integer.valueOf(0);
     }
@@ -2005,6 +1994,10 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
    * value
    */
   private Long getLongAttribute(Object object, String name) {
+    if (object == null) {
+      return Long.valueOf(0);
+    }
+
     try {
       if (!(object.getClass().equals(Long.class))) {
         if (LOGGER.infoEnabled()) {
@@ -2019,7 +2012,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       }
     } catch (Exception e) {
       if (LOGGER.infoEnabled()) {
-        LOGGER.info("Exception Occured: " + e.getMessage());
+        LOGGER.info("Exception occurred: " + e.getMessage());
       }
       return Long.valueOf(0);
     }
@@ -2032,6 +2025,10 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
    * the attribute value
    */
   private String getStringAttribute(Object object, String name) {
+    if (object == null) {
+      return "";
+    }
+
     try {
       if (!(object.getClass().equals(String.class))) {
         if (LOGGER.infoEnabled()) {
@@ -2046,7 +2043,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       }
     } catch (Exception e) {
       if (LOGGER.infoEnabled()) {
-        LOGGER.info("Exception Occured: " + e.getMessage());
+        LOGGER.info("Exception occurred: " + e.getMessage());
       }
       return "";
     }
@@ -2058,6 +2055,10 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
    * attribute value
    */
   private Boolean getBooleanAttribute(Object object, String name) {
+    if (object == null) {
+      return Boolean.FALSE;
+    }
+
     try {
       if (!(object.getClass().equals(Boolean.class))) {
         if (LOGGER.infoEnabled()) {
@@ -2084,6 +2085,10 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
    * attribute value
    */
   private Double getDoubleAttribute(Object object, String name) {
+    if (object == null) {
+      return Double.valueOf(0);
+    }
+
     try {
       if (!(object.getClass().equals(Double.class))) {
         if (LOGGER.infoEnabled()) {
@@ -2098,7 +2103,7 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
       }
     } catch (Exception e) {
       if (LOGGER.infoEnabled()) {
-        LOGGER.info("Exception Occured: " + e.getMessage());
+        LOGGER.info("Exception occurred: " + e.getMessage());
       }
       return Double.valueOf(0);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
index b06d2e5..e5e3b66 100644
--- a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
+++ b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
@@ -415,10 +415,7 @@ public class PulseConstants {
   
   public static final String PULSE_ROLES[] = {
     "PULSE_DASHBOARD", 
-    "PULSE_DATABROWSER", 
-    "PULSE_WEBGFSH", 
-    "PULSE_ADMIN_V1",
-    "PULSE_ADMIN_V2"
+    "PULSE_DATABROWSER"
   };
 
   // SSL Related attributes

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogWriter.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogWriter.java b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogWriter.java
index 9c7358a..ee1dd86 100644
--- a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogWriter.java
+++ b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogWriter.java
@@ -74,10 +74,6 @@ public class PulseLogWriter implements LogWriter {
         fileHandler.setFormatter(messageformatter);
       }
 
-      // Remove any existing handlers
-      // e.g. consoleHandler
-      logger.setUseParentHandlers(false);
-
       // Add File Handler to logger object
       logger.addHandler(fileHandler);
     } catch (SecurityException e) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java
index 99dcc15..308776b 100644
--- a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java
+++ b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java
@@ -34,6 +34,7 @@ import javax.management.remote.JMXConnector;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Set;
 
 /**
  * Spring security authentication object for GemFire
@@ -121,12 +122,12 @@ public class GemFireAuthentication extends UsernamePasswordAuthenticationToken {
 		ObjectName name;
 		try {
 			name = new ObjectName(PulseConstants.OBJECT_NAME_ACCESSCONTROL_MBEAN);
-			MBeanServerConnection mbeanServer = jmxc.getMBeanServerConnection();			
-			ArrayList<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>();
+			MBeanServerConnection mbeanServer = jmxc.getMBeanServerConnection();
+			ArrayList<GrantedAuthority> authorities = new ArrayList<>();
 			authorities.add(new SimpleGrantedAuthority("ROLE_USER"));
 			for(String role : PulseConstants.PULSE_ROLES){
-				Object[] params = new Object[] {role};
-				String[] signature = new String[] {String.class.getCanonicalName()};
+				Object[] params = new Object[] {"PULSE", role};
+				String[] signature = new String[] {String.class.getCanonicalName(), String.class.getCanonicalName()};
 				boolean result = (Boolean)mbeanServer.invoke(name, "authorize", params, signature);
 				if(result){
 				  //spring sec require ROLE_ prefix

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthenticationProvider.java b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthenticationProvider.java
index d98bba8..723f093 100644
--- a/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthenticationProvider.java
+++ b/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthenticationProvider.java
@@ -30,56 +30,52 @@ import javax.management.remote.JMXConnector;
 import java.util.Collection;
 
 /**
- * Spring security AuthenticationProvider for GemFire. It connects to 
- * gemfire manager using given credentials. Successful connect is treated
- * as successful authentication and web user is authenticated
+ * Spring security AuthenticationProvider for GemFire. It connects to gemfire manager using given credentials.
+ * Successful connect is treated as successful authentication and web user is authenticated
  *
  * @author Tushar Khairnar
  * @since version 9.0
  */
 public class GemFireAuthenticationProvider implements AuthenticationProvider {
-	
-  private final static PulseLogWriter LOGGER = PulseLogWriter.getLogger();	
 
-	public GemFireAuthenticationProvider(){
-		System.out.println("here");
-	}
-	
-	@Override
-	public Authentication authenticate(Authentication authentication)
-			throws AuthenticationException {
-			  
-		if (authentication instanceof GemFireAuthentication) {
-			GemFireAuthentication gemAuth = (GemFireAuthentication) authentication;
-			LOGGER.fine("GemAuthentication is connected? = "
-					+ gemAuth.getJmxc());
-			if(gemAuth.getJmxc()!=null && gemAuth.isAuthenticated())
-				return gemAuth;
-		}
-		
-		String name = authentication.getName();
-		String password = authentication.getCredentials().toString();
+  private final static PulseLogWriter LOGGER = PulseLogWriter.getLogger();
 
-		try {
-		  LOGGER.fine("Connecting to GemFire with user=" + name);
-		  JMXConnector jmxc = Repository.get().getCluster().connectToGemFire(name, password);
-		  if(jmxc!=null) {
-  			Collection<GrantedAuthority> list = GemFireAuthentication.populateAuthorities(jmxc);
-  			GemFireAuthentication auth = new GemFireAuthentication(
-  					authentication.getPrincipal(),
-  					authentication.getCredentials(), list, jmxc);
-  			LOGGER.fine("For user " + name + " authList="+ list);
-  			return auth;
-		  } else 
-		    throw new AuthenticationServiceException("JMX Connection unavailable");
-		} catch (Exception e) {
-		  throw new BadCredentialsException("Error connecting to GemFire JMX Server", e);			
-		}
-	}
+  public GemFireAuthenticationProvider() {
+    System.out.println("here");
+  }
 
-	@Override
-	public boolean supports(Class<?> authentication) {
-		return authentication.equals(UsernamePasswordAuthenticationToken.class);
-	}	
+  @Override
+  public Authentication authenticate(Authentication authentication) throws AuthenticationException {
+
+    if (authentication instanceof GemFireAuthentication) {
+      GemFireAuthentication gemAuth = (GemFireAuthentication) authentication;
+      LOGGER.fine("GemAuthentication is connected? = " + gemAuth.getJmxc());
+      if (gemAuth.getJmxc() != null && gemAuth.isAuthenticated()) return gemAuth;
+    }
+
+    String name = authentication.getName();
+    String password = authentication.getCredentials().toString();
+
+    try {
+      LOGGER.fine("Connecting to GemFire with user=" + name);
+      JMXConnector jmxc = Repository.get().getCluster().connectToGemFire(name, password);
+      if (jmxc != null) {
+        Collection<GrantedAuthority> list = GemFireAuthentication.populateAuthorities(jmxc);
+        GemFireAuthentication auth = new GemFireAuthentication(authentication.getPrincipal(),
+            authentication.getCredentials(), list, jmxc);
+        LOGGER.fine("For user " + name + " authList=" + list);
+        return auth;
+      } else {
+        throw new AuthenticationServiceException("JMX Connection unavailable");
+      }
+    } catch (Exception e) {
+      throw new BadCredentialsException("Error connecting to GemFire JMX Server", e);
+    }
+  }
+
+  @Override
+  public boolean supports(Class<?> authentication) {
+    return authentication.equals(UsernamePasswordAuthenticationToken.class);
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
index 452a536..645629f 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
@@ -40,7 +40,7 @@ import org.openqa.selenium.support.ui.WebDriverWait;
 import java.net.InetAddress;
 import java.util.List;
 
-import static com.vmware.gemfire.tools.pulse.tests.PulseTest.getPulseWarPath;
+import static com.vmware.gemfire.tools.pulse.tests.PulseAbstractTest.getPulseWarPath;
 
 /**
  * @author Sushant Rawal

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/DataBrowserResultLoader.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/DataBrowserResultLoader.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/DataBrowserResultLoader.java
index 3583bba..e595ef2 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/DataBrowserResultLoader.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/DataBrowserResultLoader.java
@@ -44,19 +44,19 @@ public class DataBrowserResultLoader {
     try {
       ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
 
-      if (queryString.equals(PulseTest.QUERY_TYPE_ONE)) {
+      if (queryString.equals(PulseAbstractTest.QUERY_TYPE_ONE)) {
         url = classLoader.getResource("testQueryResultClusterSmall.txt");
-      } else if (queryString.equals(PulseTest.QUERY_TYPE_TWO)) {
+      } else if (queryString.equals(PulseAbstractTest.QUERY_TYPE_TWO)) {
         url = classLoader.getResource("testQueryResultSmall.txt");
-      } else if (queryString.equals(PulseTest.QUERY_TYPE_THREE)) {
+      } else if (queryString.equals(PulseAbstractTest.QUERY_TYPE_THREE)) {
         url = classLoader.getResource("testQueryResult.txt");
-      } else if (queryString.equals(PulseTest.QUERY_TYPE_FOUR)) {
+      } else if (queryString.equals(PulseAbstractTest.QUERY_TYPE_FOUR)) {
         url = classLoader.getResource("testQueryResultWithStructSmall.txt");
-      } else if (queryString.equals(PulseTest.QUERY_TYPE_FIVE)) {
+      } else if (queryString.equals(PulseAbstractTest.QUERY_TYPE_FIVE)) {
         url = classLoader.getResource("testQueryResultClusterWithStruct.txt");
-      } else if (queryString.equals(PulseTest.QUERY_TYPE_SIX)) {
+      } else if (queryString.equals(PulseAbstractTest.QUERY_TYPE_SIX)) {
         url = classLoader.getResource("testQueryResultHashMapSmall.txt");
-      } else if (queryString.equals(PulseTest.QUERY_TYPE_SEVENE)) {
+      } else if (queryString.equals(PulseAbstractTest.QUERY_TYPE_SEVENE)) {
         url = classLoader.getResource("testQueryResult1000.txt");
       } else {
         url = classLoader.getResource("testQueryResult.txt");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java
new file mode 100644
index 0000000..3c0f866
--- /dev/null
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAbstractTest.java
@@ -0,0 +1,1038 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+import com.gemstone.gemfire.management.internal.JettyHelper;
+import com.gemstone.gemfire.test.junit.categories.UITest;
+import junit.framework.Assert;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.FixMethodOrder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
+import org.openqa.selenium.By;
+import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.interactions.Actions;
+import org.openqa.selenium.support.ui.ExpectedCondition;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.DecimalFormat;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+//@Category(UITest.class)
+//@FixMethodOrder(MethodSorters.JVM)
+public abstract class PulseAbstractTest extends PulseBaseTest {
+  private static String jmxPropertiesFile;
+  private static String path;
+
+  private static org.eclipse.jetty.server.Server jetty = null;
+  private static Server server = null;
+  private static String pulseURL = null;
+  public static WebDriver driver;
+  private static final String userName = "admin";
+  private static final String pasword = "admin";
+
+  /* Constants for executing Data Browser queries */
+  public static final String QUERY_TYPE_ONE = "query1";
+  public static final String QUERY_TYPE_TWO = "query2";
+  public static final String QUERY_TYPE_THREE = "query3";
+  public static final String QUERY_TYPE_FOUR = "query4";
+  public static final String QUERY_TYPE_FIVE = "query5";
+  public static final String QUERY_TYPE_SIX = "query6";
+  public static final String QUERY_TYPE_SEVENE = "query7";
+
+  private static final String DATA_VIEW_LABEL = "Data View";
+  private static final String CLUSTER_VIEW_MEMBERS_ID = "clusterTotalMembersText";
+  private static final String CLUSTER_VIEW_SERVERS_ID = "clusterServersText";
+  private static final String CLUSTER_VIEW_LOCATORS_ID = "clusterLocatorsText";
+  private static final String CLUSTER_VIEW_REGIONS_ID = "clusterTotalRegionsText";
+  private static final String CLUSTER_CLIENTS_ID = "clusterClientsText";
+  private static final String CLUSTER_FUNCTIONS_ID = "clusterFunctions";
+  private static final String CLUSTER_UNIQUECQS_ID = "clusterUniqueCQs";
+  private static final String CLUSTER_SUBSCRIPTION_ID = "clusterSubscriptionsText";
+  private static final String CLUSTER_MEMORY_USAGE_ID = "currentMemoryUsage";
+  private static final String CLUSTER_THROUGHPUT_WRITES_ID = "currentThroughputWrites";
+  private static final String CLUSTER_GCPAUSES_ID = "currentGCPauses";
+  private static final String CLUSTER_WRITEPERSEC_ID = "writePerSec";
+  private static final String CLUSTER_READPERSEC_ID = "readPerSec";
+  private static final String CLUSTER_QUERIESPERSEC_ID = "queriesPerSec";
+  private static final String CLUSTER_PROCEDURE_ID = "clusterTxnCommittedText";
+  private static final String CLUSTER_TXNCOMMITTED_ID = "clusterTxnCommittedText";
+  private static final String CLUSTER_TXNROLLBACK_ID = "clusterTxnRollbackText";
+  private static final String MEMBER_VIEW_MEMBERNAME_ID = "memberName";
+  private static final String MEMBER_VIEW_REGION_ID = "memberRegionsCount";
+  private static final String MEMBER_VIEW_THREAD_ID = "threads";
+  private static final String MEMBER_VIEW_SOCKETS_ID = "sockets";
+  private static final String MEMBER_VIEW_LOADAVG_ID = "loadAverage";
+  private static final String MEMBER_VIEW_LISTENINGPORT_ID = "receiverListeningPort";
+  private static final String MEMBER_VIEW_LINKTHROUGHPUT_ID = "receiverLinkThroughput";
+  private static final String MEMBER_VIEW_AVGBATCHLATENCY_ID = "receiverAvgBatchLatency";
+  private static final String MEMBER_VIEW_HEAPUSAGE_ID = "memberHeapUsageAvg";
+  private static final String MEMBER_VIEW_JVMPAUSES_ID = "memberGcPausesAvg";
+  private static final String MEMBER_VIEW_CPUUSAGE_ID = "memberCPUUsageValue";
+  private static final String MEMBER_VIEW_READPERSEC_ID = "memberGetsPerSecValue";
+  private static final String MEMBER_VIEW_WRITEPERSEC_ID = "memberPutsPerSecValue";
+  private static final String MEMBER_VIEW_OFFHEAPFREESIZE_ID = "offHeapFreeSize";
+  private static final String MEMBER_VIEW_OFFHEAPUSEDSIZE_ID = "offHeapUsedSize";
+  private static final String MEMBER_VIEW_CLIENTS_ID = "clusterClientsText";
+
+  private static final String REGION_NAME_LABEL = "regionName";
+  private static final String REGION_PATH_LABEL = "regionPath";
+  private static final String REGION_TYPE_LABEL = "regionType";
+  private static final String DATA_VIEW_WRITEPERSEC = "regionWrites";
+  private static final String DATA_VIEW_READPERSEC = "regionReads";
+  private static final String DATA_VIEW_EMPTYNODES = "regionEmptyNodes";
+  private static final String DATA_VIEW_ENTRYCOUNT = "regionEntryCount";
+  private static final String REGION_PERSISTENCE_LABEL = "regionPersistence";
+  private static final String DATA_VIEW_USEDMEMORY = "memoryUsed";
+  private static final String DATA_VIEW_TOTALMEMORY = "totalMemory";
+  
+  private static final String DATA_BROWSER_LABEL = "Data Browser";
+  private static final String DATA_BROWSER_REGIONName1 = "treeDemo_1_span";
+  private static final String DATA_BROWSER_REGIONName2 = "treeDemo_2_span";
+  private static final String DATA_BROWSER_REGIONName3 = "treeDemo_3_span";
+  private static final String DATA_BROWSER_REGION1_CHECKBOX = "treeDemo_1_check";
+  private static final String DATA_BROWSER_REGION2_CHECKBOX = "treeDemo_2_check";
+  private static final String DATA_BROWSER_REGION3_CHECKBOX = "treeDemo_3_check";
+  private static final String DATA_BROWSER_COLOCATED_REGION = "Colocated Regions";
+  private static final String DATA_BROWSER_COLOCATED_REGION_NAME1 = "treeDemo_1_span";
+  private static final String DATA_BROWSER_COLOCATED_REGION_NAME2 = "treeDemo_2_span";
+  private static final String DATA_BROWSER_COLOCATED_REGION_NAME3 = "treeDemo_3_span";
+
+  private static final String QUERY_STATISTICS_LABEL = "Query Statistics";
+  private static final String CLUSTER_VIEW_LABEL = "Cluster View";
+  private static final String CLUSTER_VIEW_GRID_ID = "default_treemap_button";
+  private static final String SERVER_GROUP_GRID_ID = "servergroups_treemap_button";
+  private static final String REDUNDANCY_GRID_ID = "redundancyzones_treemap_button";
+  private static final String MEMBER_DROPDOWN_ID = "Members";
+  private static final String DATA_DROPDOWN_ID = "Data";
+
+  public static void setUpServer(String jsonAuthFile) throws Exception {
+    System.setProperty("spring.profiles.active", "pulse.authentication.gemfire");
+
+    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+    jmxPropertiesFile = classLoader.getResource("test.properties").getPath();
+    path = getPulseWarPath();
+    server = Server.createServer(9999, jmxPropertiesFile, jsonAuthFile);
+
+    String host = "localhost";// InetAddress.getLocalHost().getHostAddress();
+    int port = 8080;
+    String context = "/pulse";
+
+    jetty = JettyHelper.initJetty(host, port, false, false, null, null, null);
+    JettyHelper.addWebApplication(jetty, context, getPulseWarPath());
+    jetty.start();
+
+    pulseURL = "http://" + host + ":" + port + context;
+
+    Thread.sleep(5000); // wait till the container settles down
+
+    driver = new FirefoxDriver();
+    driver.manage().window().maximize();
+    driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
+    driver.get(pulseURL);
+    WebElement userNameElement = driver.findElement(By.id("user_name"));
+    WebElement passwordElement = driver.findElement(By.id("user_password"));
+    userNameElement.sendKeys(userName);
+    passwordElement.sendKeys(pasword);
+    passwordElement.submit();
+
+    Thread.sleep(3000);
+    WebElement userNameOnPulsePage = (new WebDriverWait(driver, 10))
+        .until(new ExpectedCondition<WebElement>() {
+          @Override
+          public WebElement apply(WebDriver d) {
+            return d.findElement(By.id("userName"));
+          }
+        });
+    Assert.assertNotNull(userNameOnPulsePage);
+    driver.navigate().refresh();
+    Thread.sleep(7000);
+  }
+
+  @AfterClass
+  public static void tearDownAfterClass() throws Exception {
+    driver.close();
+    jetty.stop();
+  }
+
+  public static String getPulseWarPath() throws Exception {
+    String warPath = null;
+    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+    InputStream inputStream = classLoader.getResourceAsStream("GemFireVersion.properties");
+    Properties properties = new Properties();
+    properties.load(inputStream);
+    String version = properties.getProperty("Product-Version");
+    warPath = "geode-pulse-" + version + ".war";
+    String propFilePath = classLoader.getResource("GemFireVersion.properties").getPath();
+    warPath = propFilePath.substring(0, propFilePath.indexOf("generated-resources")) + "libs/" + warPath;
+    return warPath;
+  }
+
+  protected void searchByLinkAndClick(String linkText) {
+    WebElement element = By.linkText(linkText).findElement(driver);
+    Assert.assertNotNull(element);
+    element.click();
+  }
+
+  protected void searchByIdAndClick(String id) {
+    WebElement element = driver.findElement(By.id(id));
+    Assert.assertNotNull(element);
+    element.click();
+  }
+
+  protected void searchByClassAndClick(String Class) {
+    WebElement element = driver.findElement(By.className(Class));
+    Assert.assertNotNull(element);
+    element.click();
+  }
+
+  protected void searchByXPathAndClick(String xpath) {
+	WebElement element = driver.findElement(By.xpath(xpath));
+     Assert.assertNotNull(element);
+    element.click();
+  }
+
+  protected void waitForElementByClassName(final String className, int seconds) {
+    WebElement linkTextOnPulsePage1 = (new WebDriverWait(driver, seconds))
+        .until(new ExpectedCondition<WebElement>() {
+          @Override
+          public WebElement apply(WebDriver d) {
+            return d.findElement(By.className(className));
+          }
+        });
+    Assert.assertNotNull(linkTextOnPulsePage1);
+  }
+
+  protected void waitForElementById(final String id, int seconds) {
+    WebElement element = (new WebDriverWait(driver, 10))
+        .until(new ExpectedCondition<WebElement>() {
+          @Override
+          public WebElement apply(WebDriver d) {
+            return d.findElement(By.id(id));
+          }
+        });
+    Assert.assertNotNull(element);
+  }
+  
+  protected void scrollbarVerticalDownScroll() {
+    JavascriptExecutor js = (JavascriptExecutor) driver;
+    js.executeScript("javascript:window.scrollBy(250,700)");
+    WebElement pickerScroll = driver.findElement(By.className("jspDrag"));
+    WebElement pickerScrollCorner = driver.findElement(By
+        .className("jspCorner"));
+    Actions builder = new Actions(driver);
+    Actions movePicker = builder.dragAndDrop(pickerScroll, pickerScrollCorner); // pickerscroll
+                                                                                // is
+                                                                                // the
+                                                                                // webelement
+    movePicker.perform();
+  }
+
+  protected void scrollbarHorizontalRightScroll() {
+    JavascriptExecutor js = (JavascriptExecutor) driver;
+    js.executeScript("javascript:window.scrollBy(250,700)");
+    WebElement pickerScroll = driver
+        .findElement(By
+            .xpath("//div[@id='gview_queryStatisticsList']/div[3]/div/div[3]/div[2]/div"));
+    WebElement pickerScrollCorner = driver.findElement(By
+        .className("jspCorner"));
+    Actions builder = new Actions(driver);
+    Actions movePicker = builder.dragAndDrop(pickerScroll, pickerScrollCorner); // pickerscroll
+                                                                                // is
+                                                                                // the
+                                                                                // webelement
+    movePicker.perform();
+  }
+
+  
+  
+  @Test
+  public void testClusterLocatorCount() throws IOException {
+	searchByXPathAndClick(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+    String clusterLocators = driver
+        .findElement(By.id(CLUSTER_VIEW_LOCATORS_ID)).getText();
+   
+    String totallocators = JMXProperties.getInstance().getProperty("server.S1.locatorCount");  
+    Assert.assertEquals(totallocators, clusterLocators);
+  }
+
+ @Test
+  public void testClusterRegionCount() {
+    String clusterRegions = driver.findElement(By.id(CLUSTER_VIEW_REGIONS_ID))
+        .getText();
+    String totalregions = JMXProperties.getInstance().getProperty(
+        "server.S1.totalRegionCount");
+    Assert.assertEquals(totalregions, clusterRegions);
+  }
+
+ @Test
+  public void testClusterMemberCount() {
+    String clusterMembers = driver.findElement(By.id(CLUSTER_VIEW_MEMBERS_ID))
+        .getText();
+    String totalMembers = JMXProperties.getInstance().getProperty(
+        "server.S1.memberCount");
+    Assert.assertEquals(totalMembers, clusterMembers);
+  }
+
+ @Test
+  public void testClusterNumClient() {
+    String clusterClients = driver.findElement(By.id(CLUSTER_CLIENTS_ID))
+        .getText();
+    String totalclients = JMXProperties.getInstance().getProperty(
+        "server.S1.numClients");
+    Assert.assertEquals(totalclients, clusterClients);
+  }
+
+  @Test
+  public void testClusterNumRunningFunction() {
+    String clusterFunctions = driver.findElement(By.id(CLUSTER_FUNCTIONS_ID))
+        .getText();
+    String totalfunctions = JMXProperties.getInstance().getProperty(
+        "server.S1.numRunningFunctions");
+    Assert.assertEquals(totalfunctions, clusterFunctions);
+  }
+
+@Test
+  public void testClusterRegisteredCQCount() {
+    String clusterUniqueCQs = driver.findElement(By.id(CLUSTER_UNIQUECQS_ID))
+        .getText();
+    String totaluniqueCQs = JMXProperties.getInstance().getProperty(
+        "server.S1.registeredCQCount");
+    Assert.assertEquals(totaluniqueCQs, clusterUniqueCQs);
+  }
+
+ @Test
+  public void testClusterNumSubscriptions() {
+    String clusterSubscriptions = driver.findElement(
+        By.id(CLUSTER_SUBSCRIPTION_ID)).getText();
+    String totalSubscriptions = JMXProperties.getInstance().getProperty(
+        "server.S1.numSubscriptions");
+    Assert.assertEquals(totalSubscriptions, clusterSubscriptions);
+  }
+
+ @Test
+  public void testClusterJVMPausesWidget() {
+    String clusterJVMPauses = driver.findElement(By.id(CLUSTER_GCPAUSES_ID))
+        .getText();
+    String totalgcpauses = JMXProperties.getInstance().getProperty(
+        "server.S1.jvmPauses");
+    Assert.assertEquals(totalgcpauses, clusterJVMPauses);
+  }
+
+  @Test
+  public void testClusterAverageWritesWidget() {
+    String clusterWritePerSec = driver.findElement(
+        By.id(CLUSTER_WRITEPERSEC_ID)).getText();
+    String totalwritepersec = JMXProperties.getInstance().getProperty(
+        "server.S1.averageWrites");
+    Assert.assertEquals(totalwritepersec, clusterWritePerSec);
+  }
+
+  @Test
+  public void testClusterAverageReadsWidget() {
+    String clusterReadPerSec = driver.findElement(By.id(CLUSTER_READPERSEC_ID))
+        .getText();
+    String totalreadpersec = JMXProperties.getInstance().getProperty(
+        "server.S1.averageReads");
+    Assert.assertEquals(totalreadpersec, clusterReadPerSec);
+  }
+
+  @Test
+  public void testClusterQuerRequestRateWidget() {
+    String clusterQueriesPerSec = driver.findElement(
+        By.id(CLUSTER_QUERIESPERSEC_ID)).getText();
+    String totalqueriespersec = JMXProperties.getInstance().getProperty(
+        "server.S1.queryRequestRate");
+    Assert.assertEquals(totalqueriespersec, clusterQueriesPerSec);
+  }
+  
+  @Test
+  public void testClusterGridViewMemberID() throws InterruptedException {
+	  
+	 searchByIdAndClick("default_grid_button");	
+	 List<WebElement> elements = driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr")); //gives me 11 rows
+	 
+	 for(int memberCount = 1; memberCount<elements.size(); memberCount++){		  
+		  String memberId = driver.findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (memberCount + 1) + "]/td")).getText();		  
+		  String propertMemeberId= JMXProperties.getInstance().getProperty("member.M" + memberCount + ".id");		  
+		  Assert.assertEquals(memberId, propertMemeberId);
+	  }	 
+  }
+
+  @Test
+  public void testClusterGridViewMemberName() {
+	  searchByIdAndClick("default_grid_button"); 
+	  List<WebElement> elements = driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr"));  	  
+	  for (int memberNameCount = 1; memberNameCount < elements.size(); memberNameCount++) {
+		  String gridMemberName = driver.findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (memberNameCount + 1) + "]/td[2]")).getText();
+		  String memberName = JMXProperties.getInstance().getProperty("member.M" + memberNameCount + ".member");
+		  Assert.assertEquals(gridMemberName, memberName);
+    }
+  }
+  
+
+  @Test
+  public void testClusterGridViewMemberHost() {
+	  searchByIdAndClick("default_grid_button"); 
+	  List<WebElement> elements = driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr")); 	  
+    for (int memberHostCount = 1; memberHostCount < elements.size(); memberHostCount++) {
+      String MemberHost = driver.findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (memberHostCount + 1) + "]/td[3]")).getText();     
+      String gridMemberHost = JMXProperties.getInstance().getProperty("member.M" + memberHostCount + ".host");
+      Assert.assertEquals(gridMemberHost, MemberHost);
+    }
+  }
+
+  @Test
+  public void testClusterGridViewHeapUsage() {
+	searchByIdAndClick("default_grid_button"); 
+    for (int i = 1; i <= 3; i++) {
+      Float HeapUsage = Float.parseFloat(driver
+          .findElement(
+              By.xpath("//table[@id='memberList']/tbody/tr[" + (i + 1) + "]/td[5]")).getText());
+      Float gridHeapUsagestring = Float.parseFloat(JMXProperties.getInstance()
+          .getProperty("member.M" + i + ".UsedMemory"));
+     Assert.assertEquals(gridHeapUsagestring, HeapUsage);
+    }
+  }
+   
+  @Test
+  public void testClusterGridViewCPUUsage() {
+	searchByIdAndClick("default_grid_button"); 
+    for (int i = 1; i <= 3; i++) {
+      String CPUUsage = driver.findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (i + 1) + "]/td[6]")).getText();
+      String gridCPUUsage = JMXProperties.getInstance().getProperty("member.M" + i + ".cpuUsage");
+      gridCPUUsage = gridCPUUsage.trim();
+      Assert.assertEquals(gridCPUUsage, CPUUsage);
+    }
+  }
+
+
+  public void testRgraphWidget() throws InterruptedException {
+    searchByIdAndClick("default_rgraph_button");
+    Thread.sleep(7000);
+    searchByIdAndClick("h1");
+    Thread.sleep(500);
+    searchByIdAndClick("M1");
+    Thread.sleep(7000);
+  }
+
+  @Test  // region count in properties file is 2 and UI is 1
+  public void testMemberTotalRegionCount() throws InterruptedException{
+	testRgraphWidget();
+    String RegionCount = driver.findElement(By.id(MEMBER_VIEW_REGION_ID)).getText();  
+    String memberRegionCount = JMXProperties.getInstance().getProperty("member.M1.totalRegionCount");
+    Assert.assertEquals(memberRegionCount, RegionCount);
+  }
+
+  @Test
+  public void testMemberNumThread()throws InterruptedException {
+    String ThreadCount = driver.findElement(By.id(MEMBER_VIEW_THREAD_ID)).getText();    
+    String memberThreadCount = JMXProperties.getInstance().getProperty("member.M1.numThreads");   
+    Assert.assertEquals(memberThreadCount, ThreadCount);
+  }
+
+  @Test
+  public void testMemberTotalFileDescriptorOpen() throws InterruptedException {
+    String SocketCount = driver.findElement(By.id(MEMBER_VIEW_SOCKETS_ID))
+        .getText();
+    String memberSocketCount = JMXProperties.getInstance().getProperty(
+        "member.M1.totalFileDescriptorOpen");
+    Assert.assertEquals(memberSocketCount, SocketCount);
+  }
+
+ @Test
+  public void testMemberLoadAverage() throws InterruptedException {	
+    String LoadAvg = driver.findElement(By.id(MEMBER_VIEW_LOADAVG_ID))
+        .getText();
+    String memberLoadAvg = JMXProperties.getInstance().getProperty(
+        "member.M1.loadAverage");
+    Assert.assertEquals(memberLoadAvg, LoadAvg);
+  }
+
+  @Ignore("WIP") // May be useful in near future
+  @Test
+  public void testOffHeapFreeSize(){	  
+	  
+    String OffHeapFreeSizeString = driver.findElement(
+        By.id(MEMBER_VIEW_OFFHEAPFREESIZE_ID)).getText();
+    String OffHeapFreeSizetemp = OffHeapFreeSizeString.replaceAll("[a-zA-Z]",
+        "");
+    float OffHeapFreeSize = Float.parseFloat(OffHeapFreeSizetemp);
+    float memberOffHeapFreeSize = Float.parseFloat(JMXProperties.getInstance()
+        .getProperty("member.M1.OffHeapFreeSize"));
+    if (memberOffHeapFreeSize < 1048576) {
+      memberOffHeapFreeSize = memberOffHeapFreeSize / 1024;
+
+    } else if (memberOffHeapFreeSize < 1073741824) {
+      memberOffHeapFreeSize = memberOffHeapFreeSize / 1024 / 1024;
+    } else {
+      memberOffHeapFreeSize = memberOffHeapFreeSize / 1024 / 1024 / 1024;
+    }
+    memberOffHeapFreeSize = Float.parseFloat(new DecimalFormat("##.##")
+        .format(memberOffHeapFreeSize));
+    Assert.assertEquals(memberOffHeapFreeSize, OffHeapFreeSize); 
+ 
+  }
+
+  @Ignore("WIP") // May be useful in near future
+  @Test
+  public void testOffHeapUsedSize() throws InterruptedException {
+	 
+    String OffHeapUsedSizeString = driver.findElement(
+        By.id(MEMBER_VIEW_OFFHEAPUSEDSIZE_ID)).getText();
+    String OffHeapUsedSizetemp = OffHeapUsedSizeString.replaceAll("[a-zA-Z]",
+        "");
+    float OffHeapUsedSize = Float.parseFloat(OffHeapUsedSizetemp);
+    float memberOffHeapUsedSize = Float.parseFloat(JMXProperties.getInstance()
+        .getProperty("member.M1.OffHeapUsedSize"));
+    if (memberOffHeapUsedSize < 1048576) {
+      memberOffHeapUsedSize = memberOffHeapUsedSize / 1024;
+
+    } else if (memberOffHeapUsedSize < 1073741824) {
+      memberOffHeapUsedSize = memberOffHeapUsedSize / 1024 / 1024;
+    } else {
+      memberOffHeapUsedSize = memberOffHeapUsedSize / 1024 / 1024 / 1024;
+    }
+    memberOffHeapUsedSize = Float.parseFloat(new DecimalFormat("##.##")
+        .format(memberOffHeapUsedSize));
+    Assert.assertEquals(memberOffHeapUsedSize, OffHeapUsedSize);
+  }
+
+  @Test
+  public void testMemberJVMPauses(){
+   
+    String JVMPauses = driver.findElement(By.id(MEMBER_VIEW_JVMPAUSES_ID))
+        .getText();
+    String memberGcPausesAvg = JMXProperties.getInstance().getProperty(
+        "member.M1.JVMPauses");
+    Assert.assertEquals(memberGcPausesAvg, JVMPauses);
+  }
+
+  @Test
+  public void testMemberCPUUsage() {  
+    String CPUUsagevalue = driver.findElement(By.id(MEMBER_VIEW_CPUUSAGE_ID))
+        .getText();
+    String memberCPUUsage = JMXProperties.getInstance().getProperty(
+        "member.M1.cpuUsage");
+    Assert.assertEquals(memberCPUUsage, CPUUsagevalue);
+  }
+
+  @Test  // difference between UI and properties file
+  public void testMemberAverageReads() {	  
+    float ReadPerSec = Float.parseFloat(driver.findElement(By.id(MEMBER_VIEW_READPERSEC_ID)).getText());    
+    float memberReadPerSec = Float.parseFloat(JMXProperties.getInstance().getProperty("member.M1.averageReads"));
+    memberReadPerSec = Float.parseFloat(new DecimalFormat("##.##")
+    .format(memberReadPerSec));
+    Assert.assertEquals(memberReadPerSec, ReadPerSec);
+  }
+
+ @Test
+  public void testMemberAverageWrites() throws InterruptedException {
+    navigateToTopologyGridView();
+    String WritePerSec = driver.findElement(By.id(MEMBER_VIEW_WRITEPERSEC_ID))
+        .getText();
+    String memberWritePerSec = JMXProperties.getInstance().getProperty(
+        "member.M1.averageWrites");
+    Assert.assertEquals(memberWritePerSec, WritePerSec);
+  }
+ 
+
+ @Test
+  public void testMemberGridViewData() throws InterruptedException {
+   searchByXPathAndClick(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+   testRgraphWidget();
+   searchByXPathAndClick(PulseTestLocators.MemberDetailsView.gridButtonXpath);
+   // get the number of rows on the grid
+    List<WebElement> noOfRows = driver.findElements(By.xpath("//table[@id='memberRegionsList']/tbody/tr"));    
+    String MemberRegionName = driver.findElement(By.xpath("//table[@id='memberRegionsList']/tbody/tr[2]/td[1]")).getText();
+    String memberRegionName = JMXProperties.getInstance().getProperty("region.R1.name");
+    Assert.assertEquals(memberRegionName, MemberRegionName);
+
+    String MemberRegionType = driver.findElement(By.xpath("//table[@id='memberRegionsList']/tbody/tr[2]/td[2]")).getText();
+    String memberRegionType = JMXProperties.getInstance().getProperty("region.R1.regionType");
+    Assert.assertEquals(memberRegionType, MemberRegionType);
+    
+    String MemberRegionEntryCount = driver.findElement(By.xpath("//table[@id='memberRegionsList']/tbody/tr[2]/td[3]")).getText();
+    String memberRegionEntryCount = JMXProperties.getInstance().getProperty("regionOnMember./R1.M1.entryCount");
+    Assert.assertEquals(memberRegionEntryCount, MemberRegionEntryCount);
+  }
+
+@Test
+  public void testDropDownList() throws InterruptedException {
+	searchByIdAndClick("memberName");
+    searchByLinkAndClick("M3");
+    searchByIdAndClick("memberName");
+    searchByLinkAndClick("M2");
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewRegionName() throws InterruptedException {
+    searchByLinkAndClick(DATA_VIEW_LABEL);
+    Thread.sleep(7000);
+    searchByIdAndClick("default_grid_button");
+    String regionName = driver.findElement(By.id(REGION_NAME_LABEL)).getText();
+    String dataviewregionname = JMXProperties.getInstance().getProperty("region.R1.name");
+    Assert.assertEquals(dataviewregionname, regionName);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewRegionPath() {
+    String regionPath = driver.findElement(By.id(REGION_PATH_LABEL)).getText();
+    String dataviewregionpath = JMXProperties.getInstance().getProperty(
+        "region.R1.fullPath");
+    Assert.assertEquals(dataviewregionpath, regionPath);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewRegionType() {
+    String regionType = driver.findElement(By.id(REGION_TYPE_LABEL)).getText();
+    String dataviewregiontype = JMXProperties.getInstance().getProperty(
+        "region.R1.regionType");
+    Assert.assertEquals(dataviewregiontype, regionType);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewEmptyNodes() {
+    String regionEmptyNodes = driver.findElement(By.id(DATA_VIEW_EMPTYNODES))
+        .getText();
+    String dataviewEmptyNodes = JMXProperties.getInstance().getProperty(
+        "region.R1.emptyNodes");
+    Assert.assertEquals(dataviewEmptyNodes, regionEmptyNodes);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewSystemRegionEntryCount() {
+    String regionEntryCount = driver.findElement(By.id(DATA_VIEW_ENTRYCOUNT))
+        .getText();
+    String dataviewEntryCount = JMXProperties.getInstance().getProperty(
+        "region.R1.systemRegionEntryCount");
+    Assert.assertEquals(dataviewEntryCount, regionEntryCount);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewPersistentEnabled() {
+    String regionPersistence = driver.findElement(
+        By.id(REGION_PERSISTENCE_LABEL)).getText();
+    String dataviewregionpersistence = JMXProperties.getInstance().getProperty(
+        "region.R1.persistentEnabled");
+    Assert.assertEquals(dataviewregionpersistence, regionPersistence);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewDiskWritesRate() {
+    String regionWrites = driver.findElement(By.id(DATA_VIEW_WRITEPERSEC))
+        .getText();
+    String dataviewRegionWrites = JMXProperties.getInstance().getProperty(
+        "region.R1.diskWritesRate");
+    Assert.assertEquals(dataviewRegionWrites, regionWrites);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewDiskReadsRate() {
+    String regionReads = driver.findElement(By.id(DATA_VIEW_READPERSEC))
+        .getText();
+    String dataviewRegionReads = JMXProperties.getInstance().getProperty(
+        "region.R1.diskReadsRate");
+    Assert.assertEquals(dataviewRegionReads, regionReads);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewDiskUsage() {
+    String regionMemoryUsed = driver.findElement(By.id(DATA_VIEW_USEDMEMORY))
+        .getText();
+    String dataviewMemoryUsed = JMXProperties.getInstance().getProperty(
+        "region.R1.diskUsage");
+    Assert.assertEquals(dataviewMemoryUsed, regionMemoryUsed);
+    searchByLinkAndClick(QUERY_STATISTICS_LABEL);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewGridValue() {
+    String DataViewRegionName = driver.findElement(
+        By.xpath("//*[id('6')/x:td[1]]")).getText();
+    String dataViewRegionName = JMXProperties.getInstance().getProperty(
+        "region.R1.name");
+    Assert.assertEquals(dataViewRegionName, DataViewRegionName);
+
+    String DataViewRegionType = driver.findElement(
+        By.xpath("//*[id('6')/x:td[2]")).getText();
+    String dataViewRegionType = JMXProperties.getInstance().getProperty(
+        "region.R2.regionType");
+    Assert.assertEquals(dataViewRegionType, DataViewRegionType);
+
+    String DataViewEntryCount = driver.findElement(
+        By.xpath("//*[id('6')/x:td[3]")).getText();
+    String dataViewEntryCount = JMXProperties.getInstance().getProperty(
+        "region.R2.systemRegionEntryCount");
+    Assert.assertEquals(dataViewEntryCount, DataViewEntryCount);
+
+    String DataViewEntrySize = driver.findElement(
+        By.xpath("//*[id('6')/x:td[4]")).getText();
+    String dataViewEntrySize = JMXProperties.getInstance().getProperty(
+        "region.R2.entrySize");
+    Assert.assertEquals(dataViewEntrySize, DataViewEntrySize);
+
+  }
+  
+  
+  public void loadDataBrowserpage() {
+	  searchByLinkAndClick(DATA_BROWSER_LABEL);
+	  //Thread.sleep(7000);
+  }
+  
+  @Test
+  public void testDataBrowserRegionName() throws InterruptedException {
+	  loadDataBrowserpage();
+	  String DataBrowserRegionName1 = driver.findElement(By.id(DATA_BROWSER_REGIONName1))
+			  .getText();
+	  String databrowserRegionNametemp1 = JMXProperties.getInstance().getProperty(
+		        "region.R1.name");
+	  String databrowserRegionName1 = databrowserRegionNametemp1.replaceAll("[\\/]", "");
+	  Assert.assertEquals(databrowserRegionName1, DataBrowserRegionName1);
+	  
+	  String DataBrowserRegionName2 = driver.findElement(By.id(DATA_BROWSER_REGIONName2))
+			  .getText();
+	  String databrowserRegionNametemp2 = JMXProperties.getInstance().getProperty(
+		        "region.R2.name");
+	  String databrowserRegionName2 = databrowserRegionNametemp2.replaceAll("[\\/]", "");
+	  Assert.assertEquals(databrowserRegionName2, DataBrowserRegionName2);
+	  
+	  String DataBrowserRegionName3 = driver.findElement(By.id(DATA_BROWSER_REGIONName3))
+			  .getText();
+	  String databrowserRegionNametemp3 = JMXProperties.getInstance().getProperty(
+		        "region.R3.name");
+	  String databrowserRegionName3 = databrowserRegionNametemp3.replaceAll("[\\/]", "");
+	  Assert.assertEquals(databrowserRegionName3, DataBrowserRegionName3);
+	        
+  }
+  
+  @Test
+  public void testDataBrowserRegionMembersVerificaition() throws InterruptedException {
+	  loadDataBrowserpage();
+	  searchByIdAndClick(DATA_BROWSER_REGION1_CHECKBOX);
+	  String DataBrowserMember1Name1 = driver.findElement(By.xpath("//label[@for='Member0']"))
+			  .getText();
+	  String DataBrowserMember1Name2 = driver.findElement(By.xpath("//label[@for='Member1']"))
+			  .getText();
+	  String DataBrowserMember1Name3 = driver.findElement(By.xpath("//label[@for='Member2']"))
+			  .getText();
+	  String databrowserMember1Names = JMXProperties.getInstance().getProperty(
+		        "region.R1.members");
+	  
+	  String databrowserMember1Names1 = databrowserMember1Names.substring(0, 2);
+	  Assert.assertEquals(databrowserMember1Names1, DataBrowserMember1Name1);
+	  
+	  String databrowserMember1Names2 = databrowserMember1Names.substring(3, 5);
+	  Assert.assertEquals(databrowserMember1Names2, DataBrowserMember1Name2);
+	  
+	  String databrowserMember1Names3 = databrowserMember1Names.substring(6, 8);
+	  Assert.assertEquals(databrowserMember1Names3, DataBrowserMember1Name3);
+	  searchByIdAndClick(DATA_BROWSER_REGION1_CHECKBOX);
+	  
+	  searchByIdAndClick(DATA_BROWSER_REGION2_CHECKBOX);
+	  String DataBrowserMember2Name1 = driver.findElement(By.xpath("//label[@for='Member0']"))
+			  .getText();
+	  String DataBrowserMember2Name2 = driver.findElement(By.xpath("//label[@for='Member1']"))
+			  .getText();
+	  String databrowserMember2Names = JMXProperties.getInstance().getProperty(
+		        "region.R2.members");
+	  
+	  String databrowserMember2Names1 = databrowserMember2Names.substring(0, 2);
+	  Assert.assertEquals(databrowserMember2Names1, DataBrowserMember2Name1);
+	  
+	  String databrowserMember2Names2 = databrowserMember2Names.substring(3, 5);
+	  Assert.assertEquals(databrowserMember2Names2, DataBrowserMember2Name2);
+	  searchByIdAndClick(DATA_BROWSER_REGION2_CHECKBOX);
+	  
+	  searchByIdAndClick(DATA_BROWSER_REGION3_CHECKBOX);
+	  String DataBrowserMember3Name1 = driver.findElement(By.xpath("//label[@for='Member0']"))
+			  .getText();
+	  String DataBrowserMember3Name2 = driver.findElement(By.xpath("//label[@for='Member1']"))
+			  .getText();
+	  String databrowserMember3Names = JMXProperties.getInstance().getProperty(
+		        "region.R3.members");
+	  
+	  String databrowserMember3Names1 = databrowserMember3Names.substring(0, 2);
+	  Assert.assertEquals(databrowserMember3Names1, DataBrowserMember3Name1);
+	  
+	  String databrowserMember3Names2 = databrowserMember3Names.substring(3, 5);
+	  Assert.assertEquals(databrowserMember3Names2, DataBrowserMember3Name2);
+	  searchByIdAndClick(DATA_BROWSER_REGION3_CHECKBOX);
+  }
+  
+  @Test
+  public void testDataBrowserColocatedRegions() throws InterruptedException {
+	  loadDataBrowserpage();
+	  String databrowserMemberNames1 = JMXProperties.getInstance().getProperty(
+		        "region.R1.members");
+	  String databrowserMemberNames2 = JMXProperties.getInstance().getProperty(
+		        "region.R2.members");
+	  String databrowserMemberNames3 = JMXProperties.getInstance().getProperty(
+		        "region.R3.members");
+	  
+	  if((databrowserMemberNames1.matches(databrowserMemberNames2+"(.*)"))) {
+		  if((databrowserMemberNames1.matches(databrowserMemberNames3+"(.*)"))) {
+			  if((databrowserMemberNames2.matches(databrowserMemberNames3+"(.*)"))) {
+				  System.out.println("R1, R2 and R3 are colocated regions");
+			  }   
+		  }
+	  }
+	  searchByIdAndClick(DATA_BROWSER_REGION1_CHECKBOX);
+	  searchByLinkAndClick(DATA_BROWSER_COLOCATED_REGION);
+	  String DataBrowserColocatedRegion1 = driver.findElement(By.id(DATA_BROWSER_COLOCATED_REGION_NAME1))
+			  .getText();
+	  String DataBrowserColocatedRegion2 = driver.findElement(By.id(DATA_BROWSER_COLOCATED_REGION_NAME2))
+			  .getText();
+	  String DataBrowserColocatedRegion3 = driver.findElement(By.id(DATA_BROWSER_COLOCATED_REGION_NAME3))
+			  .getText();
+	  
+	  String databrowserColocatedRegiontemp1 = JMXProperties.getInstance().getProperty(
+		        "region.R1.name");
+	  String databrowserColocatedRegion1 = databrowserColocatedRegiontemp1.replaceAll("[\\/]", "");
+	  
+	  String databrowserColocatedRegiontemp2 = JMXProperties.getInstance().getProperty(
+		        "region.R2.name");
+	  String databrowserColocatedRegion2 = databrowserColocatedRegiontemp2.replaceAll("[\\/]", "");
+	  
+	  String databrowserColocatedRegiontemp3 = JMXProperties.getInstance().getProperty(
+		        "region.R3.name");
+	  String databrowserColocatedRegion3 = databrowserColocatedRegiontemp3.replaceAll("[\\/]", "");
+	  
+	  Assert.assertEquals(databrowserColocatedRegion1, DataBrowserColocatedRegion1);
+	  Assert.assertEquals(databrowserColocatedRegion2, DataBrowserColocatedRegion2);
+	  Assert.assertEquals(databrowserColocatedRegion3, DataBrowserColocatedRegion3);
+	  
+  }
+
+  @Ignore("WIP") // clusterDetails element not found on Data Browser page. No assertions in test
+  @Test
+  public void testDataBrowserQueryValidation() throws IOException, InterruptedException {
+	  loadDataBrowserpage();
+	  WebElement textArea = driver.findElement(By.id("dataBrowserQueryText"));
+	  textArea.sendKeys("query1");
+	  WebElement executeButton = driver.findElement(By.id("btnExecuteQuery"));
+	  executeButton.click();
+	  String QueryResultHeader1 = driver.findElement(By.xpath("//div[@id='clusterDetails']/div/div/span[@class='n-title']")).getText();
+	  double count = 0,countBuffer=0,countLine=0;
+	  String lineNumber = "";
+	  String filePath = "E:\\springsource\\springsourceWS\\Pulse-Cedar\\src\\main\\resources\\testQueryResultSmall.txt";
+	  BufferedReader br;
+	  String line = "";
+	  br = new BufferedReader(new FileReader(filePath));
+	  while((line = br.readLine()) != null)
+	  {
+		  countLine++;
+          String[] words = line.split(" ");
+
+          for (String word : words) {
+            if (word.equals(QueryResultHeader1)) {
+              count++;
+              countBuffer++;
+            }
+          }
+	  }  
+  }
+  
+ public void testTreeMapPopUpData(String S1, String gridIcon) {
+	  for (int i = 1; i <=3; i++) {
+		  searchByLinkAndClick(CLUSTER_VIEW_LABEL);
+		  if (gridIcon.equals(SERVER_GROUP_GRID_ID)) {
+			  WebElement ServerGroupRadio = driver.findElement(By.xpath("//label[@for='radio-servergroups']"));
+			  ServerGroupRadio.click();
+		  }
+		  if (gridIcon.equals(REDUNDANCY_GRID_ID)) {
+			  WebElement ServerGroupRadio = driver.findElement(By.xpath("//label[@for='radio-redundancyzones']"));
+			  ServerGroupRadio.click();
+		  }
+		  searchByIdAndClick(gridIcon);
+		  WebElement TreeMapMember = driver.findElement(By.xpath("//div[@id='" + S1 + "M"+ (i) + "']/div"));
+		  Actions builder = new Actions(driver);
+		  builder.clickAndHold(TreeMapMember).perform();
+		  int j = 1;
+		  String CPUUsageM1temp = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div/div[2]/div"))
+				  .getText();
+		  String CPUUsageM1 = CPUUsageM1temp.replaceAll("[\\%]", "");
+		  String cpuUsageM1 = JMXProperties.getInstance().getProperty(
+			        "member.M" + (i) + ".cpuUsage");
+		  Assert.assertEquals(cpuUsageM1, CPUUsageM1);
+			  
+		  String MemoryUsageM1temp = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 1) + "]/div[2]/div"))
+				  .getText();
+		  String MemoryUsageM1 = MemoryUsageM1temp.replaceAll("MB", "");
+		  String memoryUsageM1 = JMXProperties.getInstance().getProperty(
+				  "member.M" + (i) + ".UsedMemory");
+		  Assert.assertEquals(memoryUsageM1, MemoryUsageM1);
+		  
+		  String LoadAvgM1 = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 2) + "]/div[2]/div"))
+				  .getText();
+		  String loadAvgM1 = JMXProperties.getInstance().getProperty(
+				  "member.M" + (i) + ".loadAverage");
+		  Assert.assertEquals(loadAvgM1, LoadAvgM1);
+		  
+		  
+		  String ThreadsM1 = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 3) + "]/div[2]/div"))
+				  .getText();
+		  String threadsM1 = JMXProperties.getInstance().getProperty(
+				  "member.M" + (i) + ".numThreads");
+		  Assert.assertEquals(threadsM1, ThreadsM1);
+		  
+		  String SocketsM1 = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 4) + "]/div[2]/div"))
+				  .getText();
+		  String socketsM1 = JMXProperties.getInstance().getProperty(
+				  "member.M" + (i) + ".totalFileDescriptorOpen");
+		  Assert.assertEquals(socketsM1, SocketsM1);
+          builder.moveToElement(TreeMapMember).release().perform();
+		  }
+	  }
+  
+  @Test
+  public void testTopologyPopUpData() {
+	  testTreeMapPopUpData("", CLUSTER_VIEW_GRID_ID); 
+  }
+  
+  @Test
+  public void testServerGroupTreeMapPopUpData() {
+	  testTreeMapPopUpData("SG1(!)", SERVER_GROUP_GRID_ID);
+  }
+  
+  @Test
+  public void testDataViewTreeMapPopUpData() {
+	  searchByLinkAndClick(CLUSTER_VIEW_LABEL);
+	  searchByLinkAndClick(DATA_DROPDOWN_ID);
+	  WebElement TreeMapMember = driver.findElement(By.id("GraphTreeMapClusterData-canvas"));
+	  Actions builder = new Actions(driver);
+	  builder.clickAndHold(TreeMapMember).perform();
+	  String RegionType = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div/div[2]/div"))
+			  .getText();
+	  String regionType = JMXProperties.getInstance().getProperty(
+			  "region.R2.regionType");
+	  Assert.assertEquals(regionType, RegionType);
+	  
+	  String EntryCount = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[2]/div[2]/div"))
+			  .getText();
+	  String entryCount = JMXProperties.getInstance().getProperty(
+			  "region.R2.systemRegionEntryCount");
+	  Assert.assertEquals(entryCount, EntryCount);
+	  
+	  String EntrySizetemp = driver.findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[3]/div[2]/div"))
+			  .getText();
+	  float EntrySize = Float.parseFloat(EntrySizetemp);
+	  float entrySize = Float.parseFloat(JMXProperties.getInstance().getProperty(
+			  "region.R2.entrySize"));
+	  entrySize = entrySize / 1024 / 1024;
+	  entrySize = Float.parseFloat(new DecimalFormat("##.####")
+      .format(entrySize));
+	  Assert.assertEquals(entrySize, EntrySize);  
+	  builder.moveToElement(TreeMapMember).release().perform();
+  }
+  
+  @Test
+  public void testRegionViewTreeMapPopUpData() {
+	  searchByLinkAndClick(CLUSTER_VIEW_LABEL);
+	  searchByLinkAndClick(DATA_DROPDOWN_ID);
+	  WebElement TreeMapMember = driver.findElement(By.id("GraphTreeMapClusterData-canvas"));
+	  TreeMapMember.click();
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testNumberOfRegions() throws InterruptedException{
+	  
+		driver.findElement(By.xpath("//a[text()='Data Browser']")).click();
+		
+		 Thread.sleep(1000);
+		 List<WebElement> regionList = driver.findElements(By.xpath("//ul[@id='treeDemo']/li"));		 
+		 String regions = JMXProperties.getInstance().getProperty("regions");
+		 String []regionName = regions.split(" ");
+		 for (String string : regionName) {
+		}
+		 //JMXProperties.getInstance().getProperty("region.R1.regionType");
+		int i=1; 
+		for (WebElement webElement : regionList) {
+			//webElement.getAttribute(arg0)
+			i++;
+		}
+		
+		driver.findElement(By.id("treeDemo_1_check")).click();		
+		
+		List<WebElement> memeberList = driver.findElements(By.xpath("//ul[@id='membersList']/li"));
+		int j=0;
+		for (WebElement webElement : memeberList) {
+			j++;
+		}  
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataBrowser(){
+	  
+	  driver.findElement(By.linkText("Data Browser")).click();
+	 // WebElement dataBrowserLabel = driver.findElement(By.xpath(""));
+	  WebDriverWait wait = new WebDriverWait(driver, 20);
+	  wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath("//label[text()='Data Browser']"))));
+	  
+	
+	// Verify all elements must be displayed on data browser screen 
+	  Assert.assertTrue(driver.findElement(By.xpath("//a[text()='Data Regions']")).isDisplayed());	
+	  Assert.assertTrue(driver.findElement(By.id("linkColocatedRegions")).isDisplayed());	  
+	  Assert.assertTrue(driver.findElement(By.linkText("All Regions")).isDisplayed());
+	  
+	  Assert.assertTrue(driver.findElement(By.xpath("//a[text()='Region Members']")).isDisplayed());
+	  
+	  Assert.assertTrue(driver.findElement(By.xpath("//a[text()='Queries']")).isDisplayed());
+	  Assert.assertTrue(driver.findElement(By.xpath("//label[text()='Query Editor']")).isDisplayed());
+	  Assert.assertTrue(driver.findElement(By.xpath("//label[text()='Result']")).isDisplayed());
+	  Assert.assertTrue(driver.findElement(By.xpath("//input[@value='Export Result']")).isDisplayed());
+	  Assert.assertTrue(driver.findElement(By.id("btnExecuteQuery")).isDisplayed());
+	  Assert.assertTrue(driver.findElement(By.xpath("//input[@value='Clear']")).isDisplayed());
+	  Assert.assertTrue(driver.findElement(By.id("dataBrowserQueryText")).isDisplayed());
+	  
+	  Assert.assertTrue(driver.findElement(By.id("historyIcon")).isDisplayed());
+	  
+	  //Actual query execution
+	  
+	  driver.findElement(By.id("dataBrowserQueryText")).sendKeys("Query1");
+
+	  // Assert data regions are displayed 
+	  Assert.assertTrue(driver.findElement(By.id("treeDemo_1")).isDisplayed());
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAuthTest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAuthTest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAuthTest.java
new file mode 100644
index 0000000..e6bfc1c
--- /dev/null
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAuthTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+import com.gemstone.gemfire.test.junit.categories.UITest;
+import org.junit.BeforeClass;
+import org.junit.FixMethodOrder;
+import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
+
+@Category(UITest.class)
+@FixMethodOrder(MethodSorters.JVM)
+public class PulseAuthTest extends PulseAbstractTest {
+
+  @BeforeClass
+  public static void beforeClassSetup() throws Exception {
+    setUpServer("/pulse-auth.json");
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAutomatedTest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAutomatedTest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAutomatedTest.java
index 1ecb7d6..4e82e6f 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAutomatedTest.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAutomatedTest.java
@@ -30,9 +30,12 @@
 
 package com.vmware.gemfire.tools.pulse.tests;
 
+import com.gemstone.gemfire.test.junit.categories.UITest;
 import junit.framework.Assert;
+import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.openqa.selenium.By;
 import org.openqa.selenium.WebElement;
 
@@ -40,9 +43,14 @@ import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.List;
 
-public class PulseAutomatedTest extends PulseBaseTest {
+@Category(UITest.class)
+public class PulseAutomatedTest extends PulseAbstractTest {
+
+	@BeforeClass
+	public static void beforeClassSetup() throws Exception {
+		setUpServer("/pulse-auth.json");
+	}
 
-		
 	@Test
 	public void serverGroupGridDataValidation() {
 		navigateToServerGroupGridView();
@@ -749,7 +757,7 @@ public class PulseAutomatedTest extends PulseBaseTest {
 	    	}
 	    }	
 		
-		sendKeysUsingId(PulseTestLocators.DataBrowser.queryEditorTxtBoxId, PulseTest.QUERY_TYPE_ONE);
+		sendKeysUsingId(PulseTestLocators.DataBrowser.queryEditorTxtBoxId, PulseAbstractTest.QUERY_TYPE_ONE);
 		clickElementUsingId(PulseTestLocators.DataBrowser.btnExecuteQueryId);
 			
 		//Get required datetime format and extract date and hours from date time.
@@ -768,7 +776,7 @@ public class PulseAutomatedTest extends PulseBaseTest {
 	  System.out.println("Query Text from History Table: " + queryText);
 		System.out.println("Query Time from History Table: " + historyDateTime);
   	    //verify the query text, query datetime in history panel
-	    Assert.assertTrue(PulseTest.QUERY_TYPE_ONE.equals(queryText));
+	    Assert.assertTrue(PulseAbstractTest.QUERY_TYPE_ONE.equals(queryText));
 	    Assert.assertTrue(historyDateTime.contains(queryTime[0]));
 	   
 	}	

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseBaseTest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseBaseTest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseBaseTest.java
index 9f5523a..b3bcfe6 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseBaseTest.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseBaseTest.java
@@ -33,7 +33,9 @@ import java.util.Map;
 import java.util.TreeMap;
 import java.util.concurrent.TimeUnit;
 
-public class PulseBaseTest extends PulseTest {
+import static com.vmware.gemfire.tools.pulse.tests.PulseAbstractTest.driver;
+
+public class PulseBaseTest {
 	WebElement element = null;
 	public static int maxWaitTime = 20;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fed95002/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseNoAuthTest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseNoAuthTest.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseNoAuthTest.java
new file mode 100644
index 0000000..cf08fd7
--- /dev/null
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseNoAuthTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+import com.gemstone.gemfire.test.junit.categories.UITest;
+import org.junit.BeforeClass;
+import org.junit.FixMethodOrder;
+import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
+
+@Category(UITest.class)
+@FixMethodOrder(MethodSorters.JVM)
+public class PulseNoAuthTest extends PulseAbstractTest {
+
+  @BeforeClass
+  public static void beforeClassSetup() throws Exception {
+    setUpServer(null);
+  }
+}


[15/54] [abbrv] incubator-geode git commit: GEODE-1070: use log4j in off-heap code

Posted by je...@apache.org.
GEODE-1070: use log4j in off-heap code


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ce8d0876
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ce8d0876
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ce8d0876

Branch: refs/heads/feature/GEODE-17-2
Commit: ce8d0876dc20cbeaf7c444d84f236c254534658f
Parents: 2e00d5d
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Wed Mar 9 16:48:49 2016 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Tue Mar 15 10:33:58 2016 -0700

----------------------------------------------------------------------
 .../internal/InternalDistributedSystem.java     |  2 +-
 .../cache/control/OffHeapMemoryMonitor.java     | 45 ++++++++--------
 .../internal/offheap/FreeListManager.java       | 20 +++----
 .../internal/offheap/OffHeapStorage.java        |  9 ++--
 .../OffHeapStoredObjectAddressStack.java        |  6 +--
 .../offheap/SimpleMemoryAllocatorImpl.java      | 47 +++++++----------
 .../internal/offheap/FreeListManagerTest.java   |  5 +-
 .../offheap/OffHeapHelperJUnitTest.java         |  5 +-
 .../OffHeapRegionEntryHelperJUnitTest.java      |  4 +-
 .../offheap/OffHeapStorageJUnitTest.java        | 12 ++---
 ...ffHeapStoredObjectAddressStackJUnitTest.java |  9 ++--
 .../offheap/OffHeapStoredObjectJUnitTest.java   |  4 +-
 .../offheap/SimpleMemoryAllocatorJUnitTest.java | 55 ++++----------------
 13 files changed, 82 insertions(+), 141 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
index 92cb9f8..8fc884a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
@@ -614,7 +614,7 @@ public class InternalDistributedSystem
 
     final long offHeapMemorySize = OffHeapStorage.parseOffHeapMemorySize(getConfig().getOffHeapMemorySize());
 
-    this.offHeapStore = OffHeapStorage.createOffHeapStorage(getLogWriter(), this, offHeapMemorySize, this);
+    this.offHeapStore = OffHeapStorage.createOffHeapStorage(this, offHeapMemorySize, this);
     
     // Note: this can only happen on a linux system
     if (getConfig().getLockMemory()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
index 3ab39ea..100d560 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
@@ -21,8 +21,6 @@ import java.util.Set;
 import org.apache.logging.log4j.Logger;
 
 import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.i18n.LogWriterI18n;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
 import com.gemstone.gemfire.internal.cache.control.MemoryThresholds.MemoryState;
@@ -30,6 +28,7 @@ import com.gemstone.gemfire.internal.cache.control.ResourceAdvisor.ResourceManag
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
+import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.offheap.MemoryAllocator;
 import com.gemstone.gemfire.internal.offheap.MemoryUsageListener;
 
@@ -67,7 +66,6 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
    * does not have off-heap memory. So we need to handle memoryAllocator being null.
    */
   private final MemoryAllocator memoryAllocator;
-  private final LogWriterI18n log;
 
   OffHeapMemoryMonitor(final InternalResourceManager resourceManager, final GemFireCacheImpl cache, final MemoryAllocator memoryAllocator, final ResourceManagerStats stats) {
     this.resourceManager = resourceManager;
@@ -80,7 +78,6 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
       this.thresholds = new MemoryThresholds(this.memoryAllocator.getTotalMemory());
     }
     
-    this.log = cache.getLoggerI18n();
     this.offHeapMemoryUsageListener = new OffHeapMemoryUsageListener();
   }
 
@@ -439,28 +436,28 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
   void processLocalEvent(MemoryEvent event) {
     assert event.isLocal();
 
-    if (this.log.fineEnabled()) {
-      this.log.fine("Handling new local event " + event);
+    if (logger.isDebugEnabled()) {
+      logger.debug("Handling new local event {}", event);
     }
 
     if (event.getState().isCritical() && !event.getPreviousState().isCritical()) {
-      this.log.error(LocalizedStrings.MemoryMonitor_MEMBER_ABOVE_CRITICAL_THRESHOLD,
-          new Object[] { event.getMember(), "off-heap" });
+      logger.error(LocalizedMessage.create(LocalizedStrings.MemoryMonitor_MEMBER_ABOVE_CRITICAL_THRESHOLD,
+          new Object[] { event.getMember(), "off-heap" }));
     } else if (!event.getState().isCritical() && event.getPreviousState().isCritical()) {
-      this.log.error(LocalizedStrings.MemoryMonitor_MEMBER_BELOW_CRITICAL_THRESHOLD,
-          new Object[] { event.getMember(), "off-heap" });
+      logger.error(LocalizedMessage.create(LocalizedStrings.MemoryMonitor_MEMBER_BELOW_CRITICAL_THRESHOLD,
+          new Object[] { event.getMember(), "off-heap" }));
     }
 
     if (event.getState().isEviction() && !event.getPreviousState().isEviction()) {
-      this.log.info(LocalizedStrings.MemoryMonitor_MEMBER_ABOVE_HIGH_THRESHOLD,
-          new Object[] { event.getMember(), "off-heap" });
+      logger.info(LocalizedMessage.create(LocalizedStrings.MemoryMonitor_MEMBER_ABOVE_HIGH_THRESHOLD,
+          new Object[] { event.getMember(), "off-heap" }));
     } else if (!event.getState().isEviction() && event.getPreviousState().isEviction()) {
-      this.log.info(LocalizedStrings.MemoryMonitor_MEMBER_BELOW_HIGH_THRESHOLD,
-          new Object[] { event.getMember(),  "off-heap" });
+      logger.info(LocalizedMessage.create(LocalizedStrings.MemoryMonitor_MEMBER_BELOW_HIGH_THRESHOLD,
+          new Object[] { event.getMember(),  "off-heap" }));
     }
 
-    if (this.log.fineEnabled()) {
-      this.log.fine("Informing remote members of event " + event);
+    if (logger.isDebugEnabled()) {
+      logger.debug("Informing remote members of event {}", event);
     }
     
     this.resourceAdvisor.updateRemoteProfile();
@@ -475,15 +472,11 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
       } catch (CancelException ignore) {
         // ignore
       } catch (Throwable t) {
-        this.log.error(LocalizedStrings.MemoryMonitor_EXCEPTION_OCCURED_WHEN_NOTIFYING_LISTENERS, t);
+        logger.error(LocalizedMessage.create(LocalizedStrings.MemoryMonitor_EXCEPTION_OCCURED_WHEN_NOTIFYING_LISTENERS), t);
       }
     }
   }
   
-  LogWriter getLogWriter() {
-    return this.log.convertToLogWriter();
-  }
-  
   @Override
   public String toString() {
     return "OffHeapMemoryMonitor [thresholds=" + this.thresholds + ", mostRecentEvent=" + this.mostRecentEvent + "]";
@@ -508,7 +501,9 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
     
     @Override
     public void run() {
-      getLogWriter().fine("OffHeapMemoryUsageListener is starting " + this);
+      if (logger.isDebugEnabled()) {
+        logger.debug("OffHeapMemoryUsageListener is starting {}", this);
+      }
       int callsWithNoEvent = 0;
       final int MS_TIMEOUT = 10;
       final int MAX_CALLS_WITH_NO_EVENT = 1000/MS_TIMEOUT;
@@ -541,7 +536,7 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
               this.wait(MS_TIMEOUT);
               this.deliverEvent = false;
             } catch (InterruptedException iex) {
-              getLogWriter().warning("OffHeapMemoryUsageListener was interrupted " + this);
+              logger.warn("OffHeapMemoryUsageListener was interrupted {}", this);
               this.stopRequested = true;
               exitRunLoop = true;
             }
@@ -549,7 +544,9 @@ public class OffHeapMemoryMonitor implements ResourceMonitor, MemoryUsageListene
         }
       }
         
-      getLogWriter().fine("OffHeapMemoryUsageListener is stopping " + this);
+      if (logger.isDebugEnabled()) {
+        logger.debug("OffHeapMemoryUsageListener is stopping {}", this);
+      }
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
index ed7035a..05010ab 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
@@ -29,14 +29,17 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.atomic.AtomicReferenceArray;
 
-import com.gemstone.gemfire.LogWriter;
+import org.apache.logging.log4j.Logger;
+
 import com.gemstone.gemfire.OutOfOffHeapMemoryException;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.logging.LogService;
 
 /**
  * Manages the free lists for a SimpleMemoryAllocatorImpl
  */
 public class FreeListManager {
+  static final Logger logger = LogService.getLogger();
+
   /** The MemoryChunks that this allocator is managing by allocating smaller chunks of them.
    * The contents of this array never change.
    */
@@ -232,13 +235,10 @@ public class FreeListManager {
   }
 
   private void logOffHeapState(int chunkSize) {
-    if (InternalDistributedSystem.getAnyInstance() != null) {
-      LogWriter lw = InternalDistributedSystem.getAnyInstance().getLogWriter();
-      logOffHeapState(lw, chunkSize);
-    }
+    logOffHeapState(logger, chunkSize);
   }
 
-  void logOffHeapState(LogWriter lw, int chunkSize) {
+  void logOffHeapState(Logger lw, int chunkSize) {
     OffHeapMemoryStats stats = this.ma.getStats();
     lw.info("OutOfOffHeapMemory allocating size of " + chunkSize + ". allocated=" + this.allocatedSize.get() + " compactions=" + this.compactCount.get() + " objects=" + stats.getObjects() + " free=" + stats.getFreeMemory() + " fragments=" + stats.getFragments() + " largestFragment=" + stats.getLargestFragment() + " fragmentation=" + stats.getFragmentation());
     logFragmentState(lw);
@@ -246,12 +246,12 @@ public class FreeListManager {
     logHugeState(lw);
   }
 
-  private void logHugeState(LogWriter lw) {
+  private void logHugeState(Logger lw) {
     for (OffHeapStoredObject c: this.hugeChunkSet) {
       lw.info("Free huge of size " + c.getSize());
     }
   }
-  private void logTinyState(LogWriter lw) {
+  private void logTinyState(Logger lw) {
     for (int i=0; i < this.tinyFreeLists.length(); i++) {
       OffHeapStoredObjectAddressStack cl = this.tinyFreeLists.get(i);
       if (cl != null) {
@@ -259,7 +259,7 @@ public class FreeListManager {
       }
     }
   }
-  private void logFragmentState(LogWriter lw) {
+  private void logFragmentState(Logger lw) {
     for (Fragment f: this.fragmentList) {
       int freeSpace = f.freeSpace();
       if (freeSpace > 0) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
index 3156067..9c6c75a 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.internal.offheap;
 
 import java.lang.reflect.Method;
 
-import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.StatisticDescriptor;
 import com.gemstone.gemfire.Statistics;
 import com.gemstone.gemfire.StatisticsFactory;
@@ -171,7 +170,7 @@ public class OffHeapStorage implements OffHeapMemoryStats {
    * Constructs a MemoryAllocator for off-heap storage.
    * @return MemoryAllocator for off-heap storage
    */
-  public static MemoryAllocator createOffHeapStorage(LogWriter lw, StatisticsFactory sf, long offHeapMemorySize, DistributedSystem system) {
+  public static MemoryAllocator createOffHeapStorage(StatisticsFactory sf, long offHeapMemorySize, DistributedSystem system) {
     if (offHeapMemorySize == 0 || Boolean.getBoolean(InternalLocator.FORCE_LOCATOR_DM_TYPE)) {
       // Checking the FORCE_LOCATOR_DM_TYPE is a quick hack to keep our locator from allocating off heap memory.
       return null;
@@ -189,10 +188,10 @@ public class OffHeapStorage implements OffHeapMemoryStats {
     }
     // ooohml provides the hook for disconnecting and closing cache on OutOfOffHeapMemoryException
     OutOfOffHeapMemoryListener ooohml = new DisconnectingOutOfOffHeapMemoryListener((InternalDistributedSystem) system);
-    return basicCreateOffHeapStorage(lw, sf, offHeapMemorySize, ooohml);
+    return basicCreateOffHeapStorage(sf, offHeapMemorySize, ooohml);
   }
   
-  static MemoryAllocator basicCreateOffHeapStorage(LogWriter lw, StatisticsFactory sf, long offHeapMemorySize, OutOfOffHeapMemoryListener ooohml) {
+  static MemoryAllocator basicCreateOffHeapStorage(StatisticsFactory sf, long offHeapMemorySize, OutOfOffHeapMemoryListener ooohml) {
     final OffHeapMemoryStats stats = new OffHeapStorage(sf);
 
    // determine off-heap and slab sizes
@@ -200,7 +199,7 @@ public class OffHeapStorage implements OffHeapMemoryStats {
 
     final int slabCount = calcSlabCount(maxSlabSize, offHeapMemorySize);
 
-    return SimpleMemoryAllocatorImpl.create(ooohml, stats, lw, slabCount, offHeapMemorySize, maxSlabSize);
+    return SimpleMemoryAllocatorImpl.create(ooohml, stats, slabCount, offHeapMemorySize, maxSlabSize);
   }
   
   private static final long MAX_SLAB_SIZE = Integer.MAX_VALUE;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStack.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStack.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStack.java
index bde30e2..40d0143 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStack.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStack.java
@@ -16,7 +16,7 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import com.gemstone.gemfire.LogWriter;
+import org.apache.logging.log4j.Logger;
 
 /**
  * A "stack" of addresses of OffHeapStoredObject instances. The stored objects are not kept
@@ -77,7 +77,7 @@ public class OffHeapStoredObjectAddressStack {
     }
     return result;
   }
-  public void logSizes(LogWriter lw, String msg) {
+  public void logSizes(Logger logger, String msg) {
     long headAddr = this.topAddr;
     long addr;
     boolean concurrentModDetected;
@@ -99,7 +99,7 @@ public class OffHeapStoredObjectAddressStack {
         }
         // TODO construct a single log msg
         // that gets reset when concurrentModDetected.
-        lw.info(msg + curSize);
+        logger.info(msg + curSize);
       }
     } while (concurrentModDetected);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
index 209a4a4..f7fa888 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
@@ -28,7 +28,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.logging.log4j.Logger;
 
-import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionService;
@@ -87,10 +86,10 @@ public class SimpleMemoryAllocatorImpl implements MemoryAllocator {
 
   private static final boolean DO_EXPENSIVE_VALIDATION = Boolean.getBoolean("gemfire.OFF_HEAP_DO_EXPENSIVE_VALIDATION");
   
-  public static MemoryAllocator create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, LogWriter lw, 
-      int slabCount, long offHeapMemorySize, long maxSlabSize) {
-    return create(ooohml, stats, lw, slabCount, offHeapMemorySize, maxSlabSize,
-        null, new SlabFactory() {
+  public static MemoryAllocator create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, int slabCount, 
+      long offHeapMemorySize, long maxSlabSize) {
+    return create(ooohml, stats, slabCount, offHeapMemorySize, maxSlabSize, null,
+        new SlabFactory() {
       @Override
       public Slab create(int size) {
         return new SlabImpl(size);
@@ -98,26 +97,21 @@ public class SimpleMemoryAllocatorImpl implements MemoryAllocator {
     });
   }
 
-  private static SimpleMemoryAllocatorImpl create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, LogWriter lw, 
-      int slabCount, long offHeapMemorySize, long maxSlabSize, 
-      Slab[] slabs, SlabFactory slabFactory) {
+  private static SimpleMemoryAllocatorImpl create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, int slabCount, 
+      long offHeapMemorySize, long maxSlabSize, Slab[] slabs, 
+      SlabFactory slabFactory) {
     SimpleMemoryAllocatorImpl result = singleton;
     boolean created = false;
     try {
     if (result != null) {
-      result.reuse(ooohml, lw, stats, offHeapMemorySize, slabs);
-      if (lw != null) {
-        lw.config("Reusing " + result.getTotalMemory() + " bytes of off-heap memory. The maximum size of a single off-heap object is " + result.freeList.getLargestSlabSize() + " bytes.");
-      }
+      result.reuse(ooohml, stats, offHeapMemorySize, slabs);
+      logger.info("Reusing {}  bytes of off-heap memory. The maximum size of a single off-heap object is {}  bytes.", result.getTotalMemory(), result.freeList.getLargestSlabSize());
       created = true;
       LifecycleListener.invokeAfterReuse(result);
     } else {
       if (slabs == null) {
         // allocate memory chunks
-        //SimpleMemoryAllocatorImpl.cleanupPreviousAllocator();
-        if (lw != null) {
-          lw.config("Allocating " + offHeapMemorySize + " bytes of off-heap memory. The maximum size of a single off-heap object is " + maxSlabSize + " bytes.");
-        }
+        logger.info("Allocating {} bytes of off-heap memory. The maximum size of a single off-heap object is {} bytes.", offHeapMemorySize, maxSlabSize);
         slabs = new SlabImpl[slabCount];
         long uncreatedMemory = offHeapMemorySize;
         for (int i=0; i < slabCount; i++) {
@@ -131,9 +125,7 @@ public class SimpleMemoryAllocatorImpl implements MemoryAllocator {
             }
           } catch (OutOfMemoryError err) {
             if (i > 0) {
-              if (lw != null) {
-                lw.severe("Off-heap memory creation failed after successfully allocating " + (i*maxSlabSize) + " bytes of off-heap memory.");
-              }
+              logger.error("Off-heap memory creation failed after successfully allocating {} bytes of off-heap memory.", (i*maxSlabSize));
             }
             for (int j=0; j < i; j++) {
               if (slabs[j] != null) {
@@ -162,10 +154,10 @@ public class SimpleMemoryAllocatorImpl implements MemoryAllocator {
     }
     return result;
   }
-  static SimpleMemoryAllocatorImpl createForUnitTest(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, LogWriter lw, 
-      int slabCount, long offHeapMemorySize, long maxSlabSize, SlabFactory memChunkFactory) {
-    return create(ooohml, stats, lw, slabCount, offHeapMemorySize, maxSlabSize, 
-        null, memChunkFactory);
+  static SimpleMemoryAllocatorImpl createForUnitTest(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, int slabCount, 
+      long offHeapMemorySize, long maxSlabSize, SlabFactory memChunkFactory) {
+    return create(ooohml, stats, slabCount, offHeapMemorySize, maxSlabSize, null, 
+        memChunkFactory);
   }
   public static SimpleMemoryAllocatorImpl createForUnitTest(OutOfOffHeapMemoryListener oooml, OffHeapMemoryStats stats, Slab[] slabs) {
     int slabCount = 0;
@@ -181,11 +173,11 @@ public class SimpleMemoryAllocatorImpl implements MemoryAllocator {
         }
       }
     }
-    return create(oooml, stats, null, slabCount, offHeapMemorySize, maxSlabSize, slabs, null);
+    return create(oooml, stats, slabCount, offHeapMemorySize, maxSlabSize, slabs, null);
   }
   
   
-  private void reuse(OutOfOffHeapMemoryListener oooml, LogWriter lw, OffHeapMemoryStats newStats, long offHeapMemorySize, Slab[] slabs) {
+  private void reuse(OutOfOffHeapMemoryListener oooml, OffHeapMemoryStats newStats, long offHeapMemorySize, Slab[] slabs) {
     if (isClosed()) {
       throw new IllegalStateException("Can not reuse a closed off-heap memory manager.");
     }
@@ -193,9 +185,7 @@ public class SimpleMemoryAllocatorImpl implements MemoryAllocator {
       throw new IllegalArgumentException("OutOfOffHeapMemoryListener is null");
     }
     if (getTotalMemory() != offHeapMemorySize) {
-      if (lw != null) {
-        lw.warning("Using " + getTotalMemory() + " bytes of existing off-heap memory instead of the requested " + offHeapMemorySize);
-      }
+      logger.warn("Using {} bytes of existing off-heap memory instead of the requested {}.", getTotalMemory(), offHeapMemorySize);
     }
     if (!this.freeList.okToReuse(slabs)) {
       throw new IllegalStateException("attempted to reuse existing off-heap memory even though new off-heap memory was allocated");
@@ -213,7 +203,6 @@ public class SimpleMemoryAllocatorImpl implements MemoryAllocator {
     this.ooohml = oooml;
     this.stats = stats;
 
-    //OSProcess.printStacks(0, InternalDistributedSystem.getAnyInstance().getLogWriter(), false);
     this.stats.setFragments(slabs.length);
     this.stats.setLargestFragment(slabs[0].getSize());
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
index 3787129..382bd98 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
@@ -25,6 +25,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicReferenceArray;
 
+import org.apache.logging.log4j.Logger;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -33,8 +34,6 @@ import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.OutOfOffHeapMemoryException;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
@@ -736,7 +735,7 @@ public class FreeListManagerTest {
     OffHeapStoredObject.release(c.getAddress(), this.freeListManager);
     OffHeapStoredObject.release(c2.getAddress(), this.freeListManager);
     
-    LogWriter lw = mock(LogWriter.class);
+    Logger lw = mock(Logger.class);
     this.freeListManager.logOffHeapState(lw, 1024);
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
index 989abfc..fa4e776 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
@@ -27,7 +27,6 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.VMCachedDeserializable;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
@@ -47,10 +46,8 @@ public class OffHeapHelperJUnitTest extends AbstractStoredObjectTestBase {
   public void setUp() {
     OutOfOffHeapMemoryListener ooohml = mock(OutOfOffHeapMemoryListener.class);
     OffHeapMemoryStats stats = mock(OffHeapMemoryStats.class);
-    LogWriter lw = mock(LogWriter.class);
 
-    ma = SimpleMemoryAllocatorImpl.create(ooohml, stats, lw, 3, OffHeapStorage.MIN_SLAB_SIZE * 3,
-        OffHeapStorage.MIN_SLAB_SIZE);
+    ma = SimpleMemoryAllocatorImpl.create(ooohml, stats, 3, OffHeapStorage.MIN_SLAB_SIZE * 3, OffHeapStorage.MIN_SLAB_SIZE);
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
index 540bba5..cf47a72 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
@@ -37,7 +37,6 @@ import org.powermock.core.classloader.annotations.PowerMockIgnore;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
 
-import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.compression.Compressor;
 import com.gemstone.gemfire.internal.DSCODE;
 import com.gemstone.gemfire.internal.cache.CachePerfStats;
@@ -65,9 +64,8 @@ public class OffHeapRegionEntryHelperJUnitTest {
   public void setUp() {
     OutOfOffHeapMemoryListener ooohml = mock(OutOfOffHeapMemoryListener.class);
     OffHeapMemoryStats stats = mock(OffHeapMemoryStats.class);
-    LogWriter lw = mock(LogWriter.class);
 
-    ma = SimpleMemoryAllocatorImpl.create(ooohml, stats, lw, 1, OffHeapStorage.MIN_SLAB_SIZE * 1, OffHeapStorage.MIN_SLAB_SIZE);
+    ma = SimpleMemoryAllocatorImpl.create(ooohml, stats, 1, OffHeapStorage.MIN_SLAB_SIZE * 1, OffHeapStorage.MIN_SLAB_SIZE);
   }
 
   @After

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
index d5db4e4..d878358 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
@@ -122,17 +122,17 @@ public class OffHeapStorageJUnitTest {
   @Test
   public void createOffHeapStorageReturnsNullIfForceLocator() {
     System.setProperty(InternalLocator.FORCE_LOCATOR_DM_TYPE, "true");
-    assertEquals(null, OffHeapStorage.createOffHeapStorage(null, null, 1, null));
+    assertEquals(null, OffHeapStorage.createOffHeapStorage(null, 1, null));
   }
   @Test
   public void createOffHeapStorageReturnsNullIfMemorySizeIsZero() {
-    assertEquals(null, OffHeapStorage.createOffHeapStorage(null, null, 0, null));
+    assertEquals(null, OffHeapStorage.createOffHeapStorage(null, 0, null));
   }
   @Test
   public void exceptionIfSlabCountTooSmall() {
     StatisticsFactory statsFactory = mock(StatisticsFactory.class);
     try {
-      OffHeapStorage.createOffHeapStorage(null, statsFactory, OffHeapStorage.MIN_SLAB_SIZE-1, null);
+      OffHeapStorage.createOffHeapStorage(statsFactory, OffHeapStorage.MIN_SLAB_SIZE-1, null);
     } catch (IllegalArgumentException expected) {
       expected.getMessage().equals("The amount of off heap memory must be at least " + OffHeapStorage.MIN_SLAB_SIZE + " but it was set to " + (OffHeapStorage.MIN_SLAB_SIZE-1));
     }
@@ -141,7 +141,7 @@ public class OffHeapStorageJUnitTest {
   public void exceptionIfDistributedSystemNull() {
     StatisticsFactory statsFactory = mock(StatisticsFactory.class);
     try {
-      OffHeapStorage.createOffHeapStorage(null, statsFactory, OffHeapStorage.MIN_SLAB_SIZE, (DistributedSystem)null);
+      OffHeapStorage.createOffHeapStorage(statsFactory, OffHeapStorage.MIN_SLAB_SIZE, (DistributedSystem)null);
     } catch (IllegalArgumentException expected) {
       expected.getMessage().equals("InternalDistributedSystem is null");
     }
@@ -151,7 +151,7 @@ public class OffHeapStorageJUnitTest {
   public void createOffHeapStorageWorks() {
     StatisticsFactory localStatsFactory = new LocalStatisticsFactory(null);
     InternalDistributedSystem ids = mock(InternalDistributedSystem.class);
-    MemoryAllocator ma = OffHeapStorage.createOffHeapStorage(null, localStatsFactory, OffHeapStorage.MIN_SLAB_SIZE, ids);
+    MemoryAllocator ma = OffHeapStorage.createOffHeapStorage(localStatsFactory, OffHeapStorage.MIN_SLAB_SIZE, ids);
     System.setProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "true");
     ma.close();
   }
@@ -160,7 +160,7 @@ public class OffHeapStorageJUnitTest {
   public void testCreateOffHeapStorage() {
     StatisticsFactory localStatsFactory = new LocalStatisticsFactory(null);
     OutOfOffHeapMemoryListener ooohml = mock(OutOfOffHeapMemoryListener.class);
-    MemoryAllocator ma = OffHeapStorage.basicCreateOffHeapStorage(null, localStatsFactory, 1024*1024, ooohml);
+    MemoryAllocator ma = OffHeapStorage.basicCreateOffHeapStorage(localStatsFactory, 1024*1024, ooohml);
     try {
       OffHeapMemoryStats stats = ma.getStats();
       assertNotNull(stats.getStats());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java
index 8040bf7..884787f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java
@@ -19,6 +19,8 @@ package com.gemstone.gemfire.internal.offheap;
 import static org.junit.Assert.*;
 import static org.mockito.Mockito.*;
 
+import org.apache.logging.log4j.Logger;
+
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -28,7 +30,6 @@ import org.junit.experimental.categories.Category;
 import org.mockito.listeners.InvocationListener;
 import org.mockito.listeners.MethodInvocationReport;
 
-import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
@@ -87,7 +88,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
   @Test
   public void defaultStackLogsNothing() {
     OffHeapStoredObjectAddressStack stack = new OffHeapStoredObjectAddressStack();
-    LogWriter lw = mock(LogWriter.class, withSettings().invocationListeners(new InvocationListener() {
+    Logger lw = mock(Logger.class, withSettings().invocationListeners(new InvocationListener() {
       @Override
       public void reportInvocation(MethodInvocationReport methodInvocationReport) {
         fail("Unexpected invocation");
@@ -223,7 +224,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
       long addr = chunk.getAddress();
       OffHeapStoredObjectAddressStack stack = new OffHeapStoredObjectAddressStack();
       stack.offer(addr);
-      LogWriter lw = mock(LogWriter.class);
+      Logger lw = mock(Logger.class);
       stack.logSizes(lw, "foo");
       verify(lw).info("foo"+chunkSize);
     } finally {
@@ -278,7 +279,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
       long addr = chunk.getAddress();
       TestableSyncChunkStack stack = new TestableSyncChunkStack(ma);
       stack.offer(addr);
-      LogWriter lw = mock(LogWriter.class);
+      Logger lw = mock(Logger.class);
       stack.logSizes(lw, "foo");
       verify(lw).info("foo"+chunkSize);
       verify(lw).info("foo"+stack.chunk2Size);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java
index 2f6b32c..956acb4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java
@@ -38,7 +38,6 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.compression.Compressor;
 import com.gemstone.gemfire.internal.DSCODE;
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
@@ -63,9 +62,8 @@ public class OffHeapStoredObjectJUnitTest extends AbstractStoredObjectTestBase {
   public void setUp() {
     OutOfOffHeapMemoryListener ooohml = mock(OutOfOffHeapMemoryListener.class);
     OffHeapMemoryStats stats = mock(OffHeapMemoryStats.class);
-    LogWriter lw = mock(LogWriter.class);
 
-    ma = SimpleMemoryAllocatorImpl.create(ooohml, stats, lw, 3, OffHeapStorage.MIN_SLAB_SIZE * 3, OffHeapStorage.MIN_SLAB_SIZE);
+    ma = SimpleMemoryAllocatorImpl.create(ooohml, stats, 3, OffHeapStorage.MIN_SLAB_SIZE * 3, OffHeapStorage.MIN_SLAB_SIZE);
   }
 
   @After

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ce8d0876/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
index cc791fc..135aba2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
@@ -58,62 +58,27 @@ public class SimpleMemoryAllocatorJUnitTest {
     } catch (IllegalArgumentException expected) {
     }
   }
-  /**
-   * Logger that remembers the last severe message
-   */
-  private static class LastSevereLogger extends NullLogWriter {
-    private String lastSevereMessage;
-    private Throwable lastSevereThrowable;
-    
-    private void setLastSevere(String msg, Throwable ex) {
-      this.lastSevereMessage = msg;
-      this.lastSevereThrowable = ex;
-    }
-    public String getLastSevereMessage() {
-      return this.lastSevereMessage;
-    }
-    public Throwable getLastSevereThrowable() {
-      return this.lastSevereThrowable;
-    }
-    @Override
-    public void severe(String msg, Throwable ex) {
-      setLastSevere(msg, ex);
-    }
-    @Override
-    public void severe(String msg) {
-      setLastSevere(msg, null);
-    }
-    @Override
-    public void severe(Throwable ex) {
-      setLastSevere(null, ex);
-    }
-  }
   @Test
   public void testCreate() {
     System.setProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "false");
     {
       NullOutOfOffHeapMemoryListener listener = new NullOutOfOffHeapMemoryListener();
       NullOffHeapMemoryStats stats = new NullOffHeapMemoryStats();
-      LastSevereLogger logger = new LastSevereLogger();
       try {
-        SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats, logger, 10, 950, 100,
-            new SlabFactory() {
-          @Override
-          public Slab create(int size) {
-            throw new OutOfMemoryError("expected");
-          }
-        });
+        SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats, 10, 950, 100, new SlabFactory() {
+     @Override
+     public Slab create(int size) {
+        throw new OutOfMemoryError("expected");
+     }
+    });
       } catch (OutOfMemoryError expected) {
       }
       assertTrue(listener.isClosed());
       assertTrue(stats.isClosed());
-      assertEquals(null, logger.getLastSevereThrowable());
-      assertEquals(null, logger.getLastSevereMessage());
      }
     {
       NullOutOfOffHeapMemoryListener listener = new NullOutOfOffHeapMemoryListener();
       NullOffHeapMemoryStats stats = new NullOffHeapMemoryStats();
-      LastSevereLogger logger = new LastSevereLogger();
       int MAX_SLAB_SIZE = 100;
       try {
         SlabFactory factory = new SlabFactory() {
@@ -128,13 +93,11 @@ public class SimpleMemoryAllocatorJUnitTest {
             }
           }
         };
-        SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats, logger, 10, 950, MAX_SLAB_SIZE, factory);
+        SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats, 10, 950, MAX_SLAB_SIZE, factory);
       } catch (OutOfMemoryError expected) {
       }
       assertTrue(listener.isClosed());
       assertTrue(stats.isClosed());
-      assertEquals(null, logger.getLastSevereThrowable());
-      assertEquals("Off-heap memory creation failed after successfully allocating " + MAX_SLAB_SIZE + " bytes of off-heap memory.", logger.getLastSevereMessage());
     }
     {
       NullOutOfOffHeapMemoryListener listener = new NullOutOfOffHeapMemoryListener();
@@ -146,7 +109,7 @@ public class SimpleMemoryAllocatorJUnitTest {
         }
       };
       MemoryAllocator ma = 
-        SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats, new NullLogWriter(), 10, 950, 100, factory);
+        SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats, 10, 950, 100, factory);
       try {
         assertFalse(listener.isClosed());
         assertFalse(stats.isClosed());
@@ -171,7 +134,7 @@ public class SimpleMemoryAllocatorJUnitTest {
         }
         listener = new NullOutOfOffHeapMemoryListener();
         stats2 = new NullOffHeapMemoryStats();
-        MemoryAllocator ma2 = SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats2, new NullLogWriter(), 10, 950, 100, factory);
+        MemoryAllocator ma2 = SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats2, 10, 950, 100, factory);
         assertSame(ma, ma2);
         assertTrue(stats.isClosed());
         assertFalse(listener.isClosed());



[39/54] [abbrv] incubator-geode git commit: GEODE-670: GatewaySenderEvents are now sized using Sizeable if appropriate

Posted by je...@apache.org.
GEODE-670: GatewaySenderEvents are now sized using Sizeable if appropriate


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/5b6a2cdc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/5b6a2cdc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/5b6a2cdc

Branch: refs/heads/feature/GEODE-17-2
Commit: 5b6a2cdc08f521625e0987267201893735877323
Parents: 155f87d
Author: Barry Oglesby <bo...@pivotal.io>
Authored: Wed Mar 16 11:50:44 2016 -0700
Committer: Barry Oglesby <bo...@pivotal.io>
Committed: Thu Mar 17 10:11:47 2016 -0700

----------------------------------------------------------------------
 .../java/com/gemstone/gemfire/internal/cache/BucketRegion.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5b6a2cdc/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
index 413fc87..2495464 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
@@ -2141,14 +2141,12 @@ implements Bucket
   }
 
   static int calcMemSize(Object value) {
-    if (value != null && (value instanceof GatewaySenderEventImpl)) {
-      return ((GatewaySenderEventImpl)value).getSerializedValueSize();
-    } 
     if (value == null || value instanceof Token) {
       return 0;
     }
     if (!(value instanceof byte[]) && !(value instanceof CachedDeserializable)
-        && !(value instanceof com.gemstone.gemfire.Delta) && !(value instanceof Delta)) {
+        && !(value instanceof com.gemstone.gemfire.Delta) && !(value instanceof Delta)
+        && !(value instanceof GatewaySenderEventImpl)) {
     // ezoerner:20090401 it's possible this value is a Delta
       throw new InternalGemFireError("DEBUG: calcMemSize: weird value (class " 
           + value.getClass() + "): " + value);


[24/54] [abbrv] incubator-geode git commit: GEODE-1053: Refactoring some test code. Updating Apache header for NamedCallable.java and NamedRunnable.java Updated httpcore.version in dependency-versions.properties

Posted by je...@apache.org.
GEODE-1053: Refactoring some test code.
Updating Apache header for NamedCallable.java and NamedRunnable.java
Updated httpcore.version in dependency-versions.properties


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/4d0dfc56
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/4d0dfc56
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/4d0dfc56

Branch: refs/heads/feature/GEODE-17-2
Commit: 4d0dfc569bf8dcdf1c3d98de0a7c8beceb2187f0
Parents: f7ca634
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Mar 16 20:10:10 2016 +1100
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Mar 16 20:10:10 2016 +1100

----------------------------------------------------------------------
 ...stAPIOnRegionFunctionExecutionDUnitTest.java | 150 +++++++++----------
 .../web/controllers/RestAPITestBase.java        |  27 +++-
 ...tAPIsOnGroupsFunctionExecutionDUnitTest.java |  50 ++-----
 ...APIsOnMembersFunctionExecutionDUnitTest.java |  21 +--
 .../gemfire/test/dunit/NamedCallable.java       |  16 ++
 .../gemfire/test/dunit/NamedRunnable.java       |  16 ++
 gradle/dependency-versions.properties           |   2 +-
 7 files changed, 144 insertions(+), 138 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d0dfc56/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
index de7c97c..ed622e8 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
@@ -28,6 +28,7 @@ import com.gemstone.gemfire.internal.cache.PartitionAttributesImpl;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionTestHelper;
 import com.gemstone.gemfire.rest.internal.web.RestFunctionTemplate;
+import com.gemstone.gemfire.test.dunit.VM;
 import org.apache.http.client.methods.CloseableHttpResponse;
 
 import java.io.Serializable;
@@ -175,12 +176,6 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
     }
   }
 
-  private void verifyAndResetInvocationCount(final int count) {
-    SampleFunction f = (SampleFunction) FunctionService
-        .getFunction(SampleFunction.Id);
-    assertEquals(count, f.invocationCount);
-  }
-
   private void createPeer(DataPolicy policy) {
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.DISTRIBUTED_ACK);
@@ -241,37 +236,32 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
   }
 
   private void createCacheAndRegisterFunction() {
-    restURLs.add(vm0.invoke(() -> createCacheWithGroups(vm0, null)));
-    restURLs.add(vm1.invoke(() -> createCacheWithGroups(vm1, null)));
-    restURLs.add(vm2.invoke(() -> createCacheWithGroups(vm2, null)));
-    restURLs.add(vm3.invoke(() -> createCacheWithGroups(vm3, null)));
-
-    vm0.invoke(() -> FunctionService.registerFunction(new SampleFunction()));
-    vm1.invoke(() -> FunctionService.registerFunction(new SampleFunction()));
-    vm2.invoke(() -> FunctionService.registerFunction(new SampleFunction()));
-    vm3.invoke(() -> FunctionService.registerFunction(new SampleFunction()));
+    restURLs.add(vm0.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm0, null)));
+    restURLs.add(vm1.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm1, null)));
+    restURLs.add(vm2.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm2, null)));
+    restURLs.add(vm3.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm3, null)));
+
+    vm0.invoke("registerFunction(new SampleFunction())", () -> FunctionService.registerFunction(new SampleFunction()));
+    vm1.invoke("registerFunction(new SampleFunction())", () -> FunctionService.registerFunction(new SampleFunction()));
+    vm2.invoke("registerFunction(new SampleFunction())", () -> FunctionService.registerFunction(new SampleFunction()));
+    vm3.invoke("registerFunction(new SampleFunction())", () -> FunctionService.registerFunction(new SampleFunction()));
   }
 
   public void testOnRegionExecutionWithReplicateRegion() {
     createCacheAndRegisterFunction();
 
-    vm3.invoke(() -> createPeer(DataPolicy.EMPTY));
-    vm0.invoke(() -> createPeer(DataPolicy.REPLICATE));
-    vm1.invoke(() -> createPeer(DataPolicy.REPLICATE));
-    vm2.invoke(() -> createPeer(DataPolicy.REPLICATE));
+    vm3.invoke("createPeer", () -> createPeer(DataPolicy.EMPTY));
+    vm0.invoke("createPeer", () -> createPeer(DataPolicy.REPLICATE));
+    vm1.invoke("createPeer", () -> createPeer(DataPolicy.REPLICATE));
+    vm2.invoke("createPeer", () -> createPeer(DataPolicy.REPLICATE));
 
-    vm3.invoke(() -> populateRRRegion());
+    vm3.invoke("populateRRRegion", () -> populateRRRegion());
 
     CloseableHttpResponse response = executeFunctionThroughRestCall("SampleFunction", REPLICATE_REGION_NAME, null, null, null, null);
     assertEquals(200, response.getStatusLine().getStatusCode());
     assertNotNull(response.getEntity());
 
-    int c0 = vm0.invoke(() -> getInvocationCount());
-    int c1 = vm1.invoke(() -> getInvocationCount());
-    int c2 = vm2.invoke(() -> getInvocationCount());
-    int c3 = vm3.invoke(() -> getInvocationCount());
-
-    assertEquals(1, c0 + c1 + c2 + c3);
+    assertCorrectInvocationCount(1, vm0, vm1, vm2, vm3);
 
     // remove the expected exception
     restURLs.clear();
@@ -280,21 +270,15 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
   public void testOnRegionExecutionWithPartitionRegion() throws Exception {
     createCacheAndRegisterFunction();
 
-    vm0.invoke(() -> createPeerWithPR());
-    vm1.invoke(() -> createPeerWithPR());
-    vm2.invoke(() -> createPeerWithPR());
-    vm3.invoke(() -> createPeerWithPR());
+    createPeersWithPR(vm0, vm1, vm2, vm3);
 
-    vm3.invoke(() -> populatePRRegion());
+    vm3.invoke("populatePRRegion", () -> populatePRRegion());
 
     CloseableHttpResponse response = executeFunctionThroughRestCall("SampleFunction", PR_REGION_NAME, null, null, null, null);
     assertEquals(200, response.getStatusLine().getStatusCode());
     assertNotNull(response.getEntity());
 
-    vm0.invoke(() -> verifyAndResetInvocationCount(1));
-    vm1.invoke(() -> verifyAndResetInvocationCount(1));
-    vm2.invoke(() -> verifyAndResetInvocationCount(1));
-    vm3.invoke(() -> verifyAndResetInvocationCount(1));
+    assertCorrectInvocationCount(4, vm0, vm1, vm2, vm3);
 
     restURLs.clear();
   }
@@ -302,59 +286,67 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
   public void testOnRegionWithFilterExecutionWithPartitionRegion() throws Exception {
     createCacheAndRegisterFunction();
 
-    vm0.invoke(() -> createPeerWithPR());
-    vm1.invoke(() -> createPeerWithPR());
-    vm2.invoke(() -> createPeerWithPR());
-    vm3.invoke(() -> createPeerWithPR());
+    createPeersWithPR(vm0, vm1, vm2, vm3);
 
-    vm3.invoke(() -> populatePRRegion());
+    vm3.invoke("populatePRRegion",() -> populatePRRegion());
 
     CloseableHttpResponse response = executeFunctionThroughRestCall("SampleFunction", PR_REGION_NAME, "key2", null, null, null);
     assertEquals(200, response.getStatusLine().getStatusCode());
     assertNotNull(response.getEntity());
 
-    int c0 = vm0.invoke(() -> getInvocationCount());
-    int c1 = vm1.invoke(() -> getInvocationCount());
-    int c2 = vm2.invoke(() -> getInvocationCount());
-    int c3 = vm3.invoke(() -> getInvocationCount());
-
-    assertEquals(1, (c0 + c1 + c2 + c3));
+    assertCorrectInvocationCount(1, vm0, vm1, vm2, vm3);
 
     restURLs.clear();
   }
 
-//  public void testOnRegionWithFilterExecutionWithPartitionRegionJsonArgs() throws Exception {
-//    createCacheAndRegisterFunction();
-//
-//    vm0.invoke(() -> createPeerWithPR());
-//    vm1.invoke(() -> createPeerWithPR());
-//    vm2.invoke(() -> createPeerWithPR());
-//    vm3.invoke(() -> createPeerWithPR());
-//
-//    vm3.invoke(() -> populatePRRegion());
-//
-//    String jsonBody = "["
-//        + "{\"@type\": \"double\",\"@value\": 210}"
-//        + ",{\"@type\":\"com.gemstone.gemfire.web.rest.domain.Item\","
-//        + "\"itemNo\":\"599\",\"description\":\"Part X Free on Bumper Offer\","
-//        + "\"quantity\":\"2\","
-//        + "\"unitprice\":\"5\","
-//        + "\"totalprice\":\"10.00\"}"
-//        + "]";
-//
-//    CloseableHttpResponse response = executeFunctionThroughRestCall("SampleFunction", PR_REGION_NAME, null, jsonBody, null, null);
-//    assertEquals(200, response.getStatusLine().getStatusCode());
-//    assertNotNull(response.getEntity());
-//
-//    // Assert that only 1 node has executed the function.
-//    int c0 = vm0.invoke(() -> getInvocationCount());
-//    int c1 = vm1.invoke(() -> getInvocationCount());
-//    int c2 = vm2.invoke(() -> getInvocationCount());
-//    int c3 = vm3.invoke(() -> getInvocationCount());
-//
-//    assertEquals(1, (c0 + c1 + c2 + c3));
-//
-//    restURLs.clear();
-//  }
+  private void createPeersWithPR(VM... vms) {
+    for (int i = 0; i < vms.length; i++) {
+      vms[i].invoke("createPeerWithPR", () -> createPeerWithPR());
+    }
+  }
+
+  public void testOnRegionWithFilterExecutionWithPartitionRegionJsonArgs() throws Exception {
+    createCacheAndRegisterFunction();
+
+    createPeersWithPR(vm0, vm1, vm2, vm3);
+
+    vm3.invoke("populatePRRegion",() -> populatePRRegion());
+
+    String jsonBody = "["
+        + "{\"@type\": \"double\",\"@value\": 210}"
+        + ",{\"@type\":\"com.gemstone.gemfire.rest.internal.web.controllers.Item\","
+        + "\"itemNo\":\"599\",\"description\":\"Part X Free on Bumper Offer\","
+        + "\"quantity\":\"2\","
+        + "\"unitprice\":\"5\","
+        + "\"totalprice\":\"10.00\"}"
+        + "]";
+
+    CloseableHttpResponse response = executeFunctionThroughRestCall("SampleFunction", PR_REGION_NAME, null, jsonBody, null, null);
+    assertEquals(200, response.getStatusLine().getStatusCode());
+    assertNotNull(response.getEntity());
+
+    // Assert that only 1 node has executed the function.
+    assertCorrectInvocationCount(4, vm0, vm1, vm2, vm3);
+
+    jsonBody = "["
+        + "{\"@type\": \"double\",\"@value\": 220}"
+        + ",{\"@type\":\"com.gemstone.gemfire.rest.internal.web.controllers.Item\","
+        + "\"itemNo\":\"609\",\"description\":\"Part X Free on Bumper Offer\","
+        + "\"quantity\":\"3\","
+        + "\"unitprice\":\"9\","
+        + "\"totalprice\":\"12.00\"}"
+        + "]";
+
+    resetInvocationCounts(vm0,vm1,vm2,vm3);
+
+    response = executeFunctionThroughRestCall("SampleFunction", PR_REGION_NAME, "key2", jsonBody, null, null);
+    assertEquals(200, response.getStatusLine().getStatusCode());
+    assertNotNull(response.getEntity());
+
+    // Assert that only 1 node has executed the function.
+    assertCorrectInvocationCount(1, vm0, vm1, vm2, vm3);
+
+    restURLs.clear();
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d0dfc56/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
index 0d1fee8..ba709b7 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
@@ -18,6 +18,7 @@ package com.gemstone.gemfire.rest.internal.web.controllers;
 
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.execute.Function;
 import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
@@ -49,10 +50,10 @@ import java.util.Random;
 public class RestAPITestBase extends DistributedTestCase {
   protected Cache cache = null;
   protected List<String> restURLs = new ArrayList();
-  VM vm0 = null;
-  VM vm1 = null;
-  VM vm2 = null;
-  VM vm3 = null;
+  protected VM vm0 = null;
+  protected VM vm1 = null;
+  protected VM vm2 = null;
+  protected VM vm3 = null;
 
   public RestAPITestBase(String name) {
     super(name);
@@ -208,4 +209,22 @@ public class RestAPITestBase extends DistributedTestCase {
     return "";
   }
 
+  protected void assertCorrectInvocationCount(int expectedInvocationCount, VM... vms) {
+    int count = 0;
+    for (int i = 0; i < vms.length; i++) {
+      count += vms[i].invoke("getInvocationCount",() -> getInvocationCount());
+    }
+    assertEquals(expectedInvocationCount,count);
+  }
+
+  protected void resetInvocationCount() {
+    RestFunctionTemplate f = (RestFunctionTemplate) FunctionService.getFunction(getFunctionID());
+    f.invocationCount = 0;
+  }
+
+  protected void resetInvocationCounts(VM... vms) {
+    for (int i = 0; i < vms.length; i++) {
+      vms[i].invoke("resetInvocationCount", () -> resetInvocationCount());
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d0dfc56/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java
index 5acaccb..0419c78 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java
@@ -21,6 +21,7 @@ import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.rest.internal.web.RestFunctionTemplate;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.VM;
 import org.apache.http.client.methods.CloseableHttpResponse;
 
 import java.util.ArrayList;
@@ -41,9 +42,14 @@ public class RestAPIsOnGroupsFunctionExecutionDUnitTest extends RestAPITestBase
     return OnGroupsFunction.Id;
   }
 
-  private void resetInvocationCount() {
-    OnGroupsFunction f = (OnGroupsFunction) FunctionService.getFunction(OnGroupsFunction.Id);
-    f.invocationCount = 0;
+  private void setupCacheWithGroupsAndFunction() {
+    restURLs.add(vm0.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm0, "g0,gm")));
+    restURLs.add(vm1.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm1, "g1")));
+    restURLs.add(vm2.invoke("createCacheWithGroups", () -> createCacheWithGroups(vm2, "g0,g1")));
+
+    vm0.invoke("registerFunction(new OnGroupsFunction())", () -> FunctionService.registerFunction(new OnGroupsFunction()));
+    vm1.invoke("registerFunction(new OnGroupsFunction())", () -> FunctionService.registerFunction(new OnGroupsFunction()));
+    vm2.invoke("registerFunction(new OnGroupsFunction())", () -> FunctionService.registerFunction(new OnGroupsFunction()));
   }
 
   public void testonGroupsExecutionOnAllMembers() {
@@ -54,25 +60,11 @@ public class RestAPIsOnGroupsFunctionExecutionDUnitTest extends RestAPITestBase
       assertHttpResponse(response, 200, 3);
     }
 
-    int c0 = vm0.invoke(() -> getInvocationCount());
-    int c1 = vm1.invoke(() -> getInvocationCount());
-    int c2 = vm2.invoke(() -> getInvocationCount());
-
-    assertEquals(30, (c0 + c1 + c2));
+    assertCorrectInvocationCount(30, vm0, vm1, vm2);
 
     restURLs.clear();
   }
 
-  private void setupCacheWithGroupsAndFunction() {
-    restURLs.add(vm0.invoke(() -> createCacheWithGroups(vm0, "g0,gm")));
-    restURLs.add(vm1.invoke(() -> createCacheWithGroups(vm1, "g1")));
-    restURLs.add(vm2.invoke(() -> createCacheWithGroups(vm2, "g0,g1")));
-
-    vm0.invoke(() -> FunctionService.registerFunction(new OnGroupsFunction()));
-    vm1.invoke(() -> FunctionService.registerFunction(new OnGroupsFunction()));
-    vm2.invoke(() -> FunctionService.registerFunction(new OnGroupsFunction()));
-  }
-
   public void testonGroupsExecutionOnAllMembersWithFilter() {
     setupCacheWithGroupsAndFunction();
 
@@ -82,11 +74,7 @@ public class RestAPIsOnGroupsFunctionExecutionDUnitTest extends RestAPITestBase
       assertHttpResponse(response, 500, 0);
     }
 
-    int c0 = vm0.invoke(() -> getInvocationCount());
-    int c1 = vm1.invoke(() -> getInvocationCount());
-    int c2 = vm2.invoke(() -> getInvocationCount());
-
-    assertEquals(0, (c0 + c1 + c2));
+    assertCorrectInvocationCount(0, vm0, vm1, vm2);
     restURLs.clear();
   }
 
@@ -98,11 +86,7 @@ public class RestAPIsOnGroupsFunctionExecutionDUnitTest extends RestAPITestBase
       CloseableHttpResponse response = executeFunctionThroughRestCall("OnGroupsFunction", null, null, null, "no%20such%20group", null);
       assertHttpResponse(response, 500, 0);
     }
-    int c0 = vm0.invoke(() -> getInvocationCount());
-    int c1 = vm1.invoke(() -> getInvocationCount());
-    int c2 = vm2.invoke(() -> getInvocationCount());
-
-    assertEquals(0, (c0 + c1 + c2));
+    assertCorrectInvocationCount(0, vm0, vm1, vm2);
 
     for (int i = 0; i < 5; i++) {
 
@@ -110,15 +94,9 @@ public class RestAPIsOnGroupsFunctionExecutionDUnitTest extends RestAPITestBase
       assertHttpResponse(response, 200, 1);
     }
 
-    c0 = vm0.invoke(() -> getInvocationCount());
-    c1 = vm1.invoke(() -> getInvocationCount());
-    c2 = vm2.invoke(() -> getInvocationCount());
-
-    assertEquals(5, (c0 + c1 + c2));
+    assertCorrectInvocationCount(5, vm0, vm1, vm2);
 
-    vm0.invoke(() -> resetInvocationCount());
-    vm1.invoke(() -> resetInvocationCount());
-    vm2.invoke(() -> resetInvocationCount());
+    resetInvocationCounts(vm0,vm1,vm2);
 
     restURLs.clear();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d0dfc56/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
index 7a994d6..f8bf20e 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
@@ -114,12 +114,7 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase
       assertHttpResponse(response, 200, 4);
     }
 
-    int c0 = vm0.invoke(() -> getInvocationCount());
-    int c1 = vm1.invoke(() -> getInvocationCount());
-    int c2 = vm2.invoke(() -> getInvocationCount());
-    int c3 = vm3.invoke(() -> getInvocationCount());
-
-    assertEquals(40, (c0 + c1 + c2 + c3));
+    assertCorrectInvocationCount(40,vm0,vm1,vm2,vm3);
 
     restURLs.clear();
   }
@@ -139,12 +134,7 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase
       assertHttpResponse(response, 200, 3);
     }
 
-    int c0 = vm0.invoke(() -> getInvocationCount());
-    int c1 = vm1.invoke(() -> getInvocationCount());
-    int c2 = vm2.invoke(() -> getInvocationCount());
-    int c3 = vm3.invoke(() -> getInvocationCount());
-
-    assertEquals(30, (c0 + c1 + c2 + c3));
+    assertCorrectInvocationCount(30,vm0,vm1,vm2,vm3);
 
     restURLs.clear();
   }
@@ -157,12 +147,7 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase
       assertHttpResponse(response, 500, 0);
     }
 
-    int c0 = vm0.invoke(() -> getInvocationCount());
-    int c1 = vm1.invoke(() -> getInvocationCount());
-    int c2 = vm2.invoke(() -> getInvocationCount());
-    int c3 = vm3.invoke(() -> getInvocationCount());
-
-    assertEquals(0, (c0 + c1 + c2 + c3));
+    assertCorrectInvocationCount(0,vm0,vm1,vm2,vm3);
 
     restURLs.clear();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d0dfc56/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java
index 66a3f38..67357d9 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.test.dunit;
 
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d0dfc56/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java
index 8a7fe28..9c127b0 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.gemstone.gemfire.test.dunit;
 
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d0dfc56/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index f0738d7..7a5054b 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -46,7 +46,7 @@ hbase.version = 0.94.27
 hibernate.version = 3.5.5-Final
 hibernate-commons-annotations.version = 3.2.0.Final
 httpclient.version = 4.5.1
-httpcore.version = 4.4.4
+httpcore.version = 4.4.3
 httpunit.version = 1.7.2
 hsqldb.version = 2.0.0
 jackson.version = 2.2.0


[50/54] [abbrv] incubator-geode git commit: GEODE-1111 Connection Pooling needs more tests

Posted by je...@apache.org.
GEODE-1111 Connection Pooling needs more tests

These tests were dependent on an Order class that is only available in
Pivotal's old test framework.  I've created a small Order class that replaces
it and allows the tests to run as part of Geode's geode-core distributedTest
task.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/4ed2fd37
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/4ed2fd37
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/4ed2fd37

Branch: refs/heads/feature/GEODE-17-2
Commit: 4ed2fd374cf27ff704b09600eef263b71be9eabc
Parents: ac3d3b4
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Thu Mar 17 15:04:59 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Thu Mar 17 15:10:10 2016 -0700

----------------------------------------------------------------------
 .../cache/ConnectionPoolAutoDUnitTest.java      |   45 +
 .../gemfire/cache/ConnectionPoolDUnitTest.java  | 5871 ++++++++++++++++++
 2 files changed, 5916 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4ed2fd37/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java
new file mode 100755
index 0000000..ad110d7
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java
@@ -0,0 +1,45 @@
+/*=========================================================================
+ * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.gemstone.gemfire.cache;
+
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+
+import static org.junit.runners.MethodSorters.*;
+import org.junit.FixMethodOrder;
+
+@FixMethodOrder(NAME_ASCENDING)
+public class ConnectionPoolAutoDUnitTest extends ConnectionPoolDUnitTest {
+
+  public ConnectionPoolAutoDUnitTest(String name) {
+    super(name);
+  }
+  
+  public void setUp() throws Exception {
+    super.setUp();
+    // TODO Auto-generated method stub
+    ClientServerTestCase.AUTO_LOAD_BALANCE = true;
+    Invoke.invokeInEveryVM(new SerializableRunnable("setupAutoMode") {
+      public void run() {
+        ClientServerTestCase.AUTO_LOAD_BALANCE = true;
+      }
+    });
+  }
+
+  @Override
+  protected final void postTearDownConnectionPoolDUnitTest() throws Exception {
+    ClientServerTestCase.AUTO_LOAD_BALANCE  = false;
+    Invoke.invokeInEveryVM(new SerializableRunnable("disableAutoMode") {
+      public void run() {
+        ClientServerTestCase.AUTO_LOAD_BALANCE = false;
+      }
+    });
+  }
+  
+}


[38/54] [abbrv] incubator-geode git commit: GEODE-1095: GatewaySenderEventImpl now caches serialized value size

Posted by je...@apache.org.
GEODE-1095: GatewaySenderEventImpl now caches serialized value size


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/05cd1443
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/05cd1443
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/05cd1443

Branch: refs/heads/feature/GEODE-17-2
Commit: 05cd14437ecc3391505acf0ef158be3a5dda619f
Parents: ff69aea
Author: Barry Oglesby <bo...@pivotal.io>
Authored: Wed Mar 16 13:40:31 2016 -0700
Committer: Barry Oglesby <bo...@pivotal.io>
Committed: Thu Mar 17 10:11:47 2016 -0700

----------------------------------------------------------------------
 .../internal/cache/wan/GatewaySenderEventImpl.java  | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/05cd1443/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
index 6f284b5..d1a887f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
@@ -213,6 +213,10 @@ public class GatewaySenderEventImpl implements
   
   private static final int OP_DETAIL_REMOVEALL = 14;
 
+  private static final int DEFAULT_SERIALIZED_VALUE_SIZE = -1;
+
+  private volatile int serializedValueSize = DEFAULT_SERIALIZED_VALUE_SIZE;
+
 //  /**
 //   * Is this thread in the process of deserializing this event?
 //   */
@@ -1223,17 +1227,23 @@ public class GatewaySenderEventImpl implements
   }
 
   public int getSerializedValueSize() {
+    int localSerializedValueSize = this.serializedValueSize;
+    if (localSerializedValueSize != DEFAULT_SERIALIZED_VALUE_SIZE) {
+      return localSerializedValueSize;
+    }
     @Unretained(OffHeapIdentifier.GATEWAY_SENDER_EVENT_IMPL_VALUE)
     Object vo = this.valueObj;
     if (vo instanceof StoredObject) {
-      return ((StoredObject) vo).getSizeInBytes();
+      localSerializedValueSize = ((StoredObject) vo).getSizeInBytes();
     } else {
       if (this.substituteValue != null) {
-        return sizeOf(this.substituteValue);
+        localSerializedValueSize = sizeOf(this.substituteValue);
       } else {
-      return CachedDeserializableFactory.calcMemSize(getSerializedValue());
+        localSerializedValueSize = CachedDeserializableFactory.calcMemSize(getSerializedValue());
       }
     }
+    this.serializedValueSize = localSerializedValueSize;
+    return localSerializedValueSize;
   }
   
   @Override


[08/54] [abbrv] incubator-geode git commit: GEODE-992: Integrate with Travis CI

Posted by je...@apache.org.
GEODE-992: Integrate with Travis CI

Updating README to add CI status. Also:
- Added Anchors and links to all sections
- Added links to wiki and documentation
- Headings are now h2 rather than h1

closes #107


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6c069d20
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6c069d20
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6c069d20

Branch: refs/heads/feature/GEODE-17-2
Commit: 6c069d20140c53d4ae35ac94595fd44a3fdc8528
Parents: 6266eb0
Author: Swapnil Bawaskar <sb...@pivotal.io>
Authored: Thu Feb 25 15:36:40 2016 -0800
Committer: Swapnil Bawaskar <sb...@pivotal.io>
Committed: Fri Mar 11 15:14:47 2016 -0800

----------------------------------------------------------------------
 README.md | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6c069d20/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 6d561f0..0bcc2d6 100755
--- a/README.md
+++ b/README.md
@@ -1,4 +1,12 @@
-# Overview
+**[Overview](#overview)**  
+**[Main Concepts and Components](#concepts)**  
+**[Geode in 5 minutes](#started)**  
+**[Application Development](#development)**  
+**[Documentation](http://geode.docs.pivotal.io/)**  
+**[wiki](https://cwiki.apache.org/confluence/display/GEODE/Index)**  
+**Continuous Integration** [![Build Status](https://travis-ci.org/apache/incubator-geode.svg?branch=develop)](https://travis-ci.org/apache/incubator-geode)  
+
+## <a name="overview"></a>Overview
 
 [Apache Geode] (http://geode.incubator.apache.org/) is a data management platform that provides real-time, consistent access to data-intensive applications throughout widely distributed cloud architectures.
 
@@ -6,7 +14,7 @@ Apache Geode pools memory, CPU, network resources, and optionally local disk acr
 
 Apache Geode is a mature, robust technology originally developed by GemStone Systems in Beaverton, Oregon. Commercially available as GemFireâ„¢, the technology was first deployed in the financial sector as the transactional, low-latency data engine used in Wall Street trading platforms.  Today Apache Geode is used by over 600 enterprise customers for high-scale business applications that must meet low latency and 24x7 availability requirements. An example deployment includes [China National Railways](http://pivotal.io/big-data/case-study/scaling-online-sales-for-the-largest-railway-in-the-world-china-railway-corporation) that uses Geode to run railway ticketing for the entire country of China with a 10 node cluster that manages 2 terabytes of "hot data" in memory, and 10 backup nodes for high availability and elastic scale.
 
-# Main Concepts and Components
+## <a name="concepts"></a>Main Concepts and Components
 
 _Caches_ are an abstraction that describe a node in an Apache Geode distributed system.
 
@@ -30,7 +38,7 @@ Apache Geode includes the following features:
 * REST APIs for REST-enabled application development.
 * Rolling upgrade between major version releases.
 
-# Geode in 5 minutes
+## <a name="started"></a>Geode in 5 minutes
 
 With both a recent version of Gradle and JDK 1.8 or a more recent version installed, obtain the source archive.
 Extract the source archive and build from the expanded directory:
@@ -80,7 +88,7 @@ Compile and run `HelloWorld.java`.  The classpath should include `geode-dependen
     javac -cp /some/path/geode/geode-assembly/build/install/apache-geode/lib/geode-dependencies.jar HelloWorld.java
     java -cp .:/some/path/geode/geode-assembly/build/install/apache-geode/lib/geode-dependencies.jar HelloWorld
 
-#Application Development
+## <a name="development"></a>Application Development
 
 Apache Geode applications can be written in a number of client technologies:
 


[21/54] [abbrv] incubator-geode git commit: GEODE-1007 CI Failure: ClientAuthorizationTwoDUnitTest.testAllOpsWithFailover2

Posted by je...@apache.org.
GEODE-1007 CI Failure: ClientAuthorizationTwoDUnitTest.testAllOpsWithFailover2

The test was initially set up to use multicast discovery.  I had changed
it to use colocated locators but the AvailablePort utility was being used
for these and for the server ports.  The test now uses the dunit locator
and gets the server ports from a wildcard bind.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/3ae26b65
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/3ae26b65
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/3ae26b65

Branch: refs/heads/feature/GEODE-17-2
Commit: 3ae26b65fb2d30418ffdd096c384d9dfa8ade311
Parents: c5a8817
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Tue Mar 15 15:35:23 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Tue Mar 15 15:35:23 2016 -0700

----------------------------------------------------------------------
 .../security/ClientAuthorizationTestBase.java   | 51 +++++++++-----------
 1 file changed, 24 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3ae26b65/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
index 55edaa1..cc468e1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
@@ -31,10 +31,6 @@ import java.util.Properties;
 import java.util.Random;
 import java.util.Set;
 
-import security.AuthzCredentialGenerator;
-import security.CredentialGenerator;
-import security.AuthzCredentialGenerator.ClassCode;
-
 import com.gemstone.gemfire.cache.DynamicRegionFactory;
 import com.gemstone.gemfire.cache.InterestResultPolicy;
 import com.gemstone.gemfire.cache.Operation;
@@ -61,11 +57,13 @@ import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.util.Callable;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
+import security.AuthzCredentialGenerator;
+import security.AuthzCredentialGenerator.ClassCode;
+import security.CredentialGenerator;
 import security.DummyCredentialGenerator;
 import security.XmlAuthzCredentialGenerator;
 
@@ -144,13 +142,13 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
             SecurityTestUtil.NO_EXCEPTION));
   }
 
-  public static void createCacheServer(Integer locatorPort, Integer serverPort,
+  public static Integer createCacheServer(Integer locatorPort, Integer serverPort,
       Object authProps, Object javaProps) {
     if (locatorPort == null) {
       locatorPort = new Integer(AvailablePort
           .getRandomAvailablePort(AvailablePort.SOCKET));
     }
-    SecurityTestUtil.createCacheServer((Properties)authProps, javaProps,
+    return SecurityTestUtil.createCacheServer((Properties)authProps, javaProps,
         locatorPort, null, serverPort, Boolean.TRUE, new Integer(
             SecurityTestUtil.NO_EXCEPTION));
   }
@@ -267,7 +265,7 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
       policy = InterestResultPolicy.NONE;
     }
     final int numOps = indices.length;
-    LogWriterUtils.getLogWriter().info(
+    System.out.println(
         "Got doOp for op: " + op.toString() + ", numOps: " + numOps
             + ", indices: " + indicesToString(indices) + ", expect: " + expectedResult);
     boolean exceptionOccured = false;
@@ -307,7 +305,7 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
               // server
               if ((flags & OpFlags.CHECK_NOKEY) > 0) {
                 AbstractRegionEntry entry = (AbstractRegionEntry)((LocalRegion)region).getRegionEntry(searchKey);
-                LogWriterUtils.getLogWriter().info(""+keyNum+": key is " + searchKey + " and entry is " + entry);
+                System.out.println(""+keyNum+": key is " + searchKey + " and entry is " + entry);
                 assertFalse(region.containsKey(searchKey));
               }
               else {
@@ -648,7 +646,7 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
               }
               catch (RegionDestroyedException ex) {
                 // harmless to ignore this
-                LogWriterUtils.getLogWriter().info(
+                System.out.println(
                     "doOp: sub-region " + region.getFullPath()
                         + " already destroyed");
                 operationOmitted = true;
@@ -675,14 +673,14 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
             || ex instanceof QueryInvocationTargetException || ex instanceof CqException)
             && (expectedResult.intValue() == SecurityTestUtil.NOTAUTHZ_EXCEPTION)
             && (ex.getCause() instanceof NotAuthorizedException)) {
-          LogWriterUtils.getLogWriter().info(
+          System.out.println(
               "doOp: Got expected NotAuthorizedException when doing operation ["
                   + op + "] with flags " + OpFlags.description(flags) 
                   + ": " + ex.getCause());
           continue;
         }
         else if (expectedResult.intValue() == SecurityTestUtil.OTHER_EXCEPTION) {
-          LogWriterUtils.getLogWriter().info(
+          System.out.println(
               "doOp: Got expected exception when doing operation: "
                   + ex.toString());
           continue;
@@ -728,7 +726,7 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
           fail("executeOpBlock: Unknown client number " + clientNum);
           break;
       }
-      LogWriterUtils.getLogWriter().info(
+      System.out.println(
           "executeOpBlock: performing operation number ["
               + currentOp.getOpNum() + "]: " + currentOp);
       if ((opFlags & OpFlags.USE_OLDCONN) == 0) {
@@ -764,7 +762,7 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
                 extraAuthzProps });
         // Start the client with valid credentials but allowed or disallowed to
         // perform an operation
-        LogWriterUtils.getLogWriter().info(
+        System.out.println(
             "executeOpBlock: For client" + clientNum + credentialsTypeStr
                 + " credentials: " + opCredentials);
         boolean setupDynamicRegionFactory = (opFlags & OpFlags.ENABLE_DRF) > 0;
@@ -849,21 +847,20 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
       String accessor = gen.getAuthorizationCallback();
       TestAuthzCredentialGenerator tgen = new TestAuthzCredentialGenerator(gen);
 
-      LogWriterUtils.getLogWriter().info(testName + ": Using authinit: " + authInit);
-      LogWriterUtils.getLogWriter().info(testName + ": Using authenticator: " + authenticator);
-      LogWriterUtils.getLogWriter().info(testName + ": Using accessor: " + accessor);
+      System.out.println(testName + ": Using authinit: " + authInit);
+      System.out.println(testName + ": Using authenticator: " + authenticator);
+      System.out.println(testName + ": Using accessor: " + accessor);
 
       // Start servers with all required properties
       Properties serverProps = buildProperties(authenticator, accessor, false,
           extraAuthProps, extraAuthzProps);
       // Get ports for the servers
-      Keeper port1Keeper = AvailablePort.getRandomAvailablePortKeeper(AvailablePort.SOCKET);
+      int port1 = 0;
       Keeper port2Keeper = AvailablePort.getRandomAvailablePortKeeper(AvailablePort.SOCKET);
-      int port1 = port1Keeper.getPort();
       int port2 = port2Keeper.getPort();
 
       // Perform all the ops on the clients
-      List opBlock = new ArrayList();
+      List<OperationWithAction> opBlock = new ArrayList<>();
       Random rnd = new Random();
       for (int opNum = 0; opNum < opCodes.length; ++opNum) {
         // Start client with valid credentials as specified in
@@ -874,20 +871,20 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
           // End of current operation block; execute all the operations
           // on the servers with/without failover
           if (opBlock.size() > 0) {
-            port1Keeper.release();
             // Start the first server and execute the operation block
-            server1.invoke(() -> ClientAuthorizationTestBase.createCacheServer(
-                    SecurityTestUtil.getLocatorPort(), port1, serverProps,
+            final int locatorPort = 0;
+            port1 = server1.invoke(() -> ClientAuthorizationTestBase.createCacheServer(
+                    locatorPort, 0, serverProps,
                     javaProps ));
             server2.invoke(() -> SecurityTestUtil.closeCache());
             executeOpBlock(opBlock, port1, port2, authInit, extraAuthProps,
                 extraAuthzProps, tgen, rnd);
             if (!currentOp.equals(OperationWithAction.OPBLOCK_NO_FAILOVER)) {
               // Failover to the second server and run the block again
-              port2Keeper.release();
-              server2.invoke(() -> ClientAuthorizationTestBase.createCacheServer(
-                      SecurityTestUtil.getLocatorPort(), port2, serverProps,
-                      javaProps ));
+              final String locatorString = null;
+              port2 = server2.invoke(() -> SecurityTestUtil.createCacheServer(
+                      serverProps, javaProps, null, locatorString, 0, Boolean.TRUE,
+                          SecurityTestUtil.NO_EXCEPTION ));
               server1.invoke(() -> SecurityTestUtil.closeCache());
               executeOpBlock(opBlock, port1, port2, authInit, extraAuthProps,
                   extraAuthzProps, tgen, rnd);


[18/54] [abbrv] incubator-geode git commit: GEODE-1053: Refactoring some test code.

Posted by je...@apache.org.
GEODE-1053: Refactoring some test code.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/e22cd953
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/e22cd953
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/e22cd953

Branch: refs/heads/feature/GEODE-17-2
Commit: e22cd9532946322c0a0829b755ab184cd08977fb
Parents: f217552
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Mar 9 20:06:49 2016 +1100
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Mar 16 05:53:57 2016 +1100

----------------------------------------------------------------------
 ...stAPIOnRegionFunctionExecutionDUnitTest.java |  1 -
 ...APIsOnMembersFunctionExecutionDUnitTest.java | 26 ++++++++------------
 2 files changed, 10 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e22cd953/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
index 63bd9fa..de7c97c 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
@@ -36,7 +36,6 @@ import java.util.*;
 /**
  * Dunit Test to validate OnRegion function execution with REST APIs
  *
- * @author Nilkanth Patel
  * @since 8.0
  */
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e22cd953/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
index ac922ad..7a994d6 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
@@ -30,10 +30,6 @@ import org.apache.http.client.methods.CloseableHttpResponse;
 
 import java.util.Properties;
 
-/**
- * @author Nilkanth Patel
- */
-
 public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase {
 
   private static final long serialVersionUID = 1L;
@@ -111,10 +107,7 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase
   }
 
   public void testFunctionExecutionOnAllMembers() {
-    restURLs.add(vm0.invoke(() -> createCacheAndRegisterFunction(vm0, "m1")));
-    restURLs.add(vm1.invoke(() -> createCacheAndRegisterFunction(vm1, "m2")));
-    restURLs.add(vm2.invoke(() -> createCacheAndRegisterFunction(vm2, "m3")));
-    restURLs.add(vm3.invoke(() -> createCacheAndRegisterFunction(vm3, "m4")));
+    createCacheForVMs();
 
     for (int i = 0; i < 10; i++) {
       CloseableHttpResponse response = executeFunctionThroughRestCall("OnMembersFunction",null,null,null,null,null);
@@ -131,11 +124,15 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase
     restURLs.clear();
   }
 
+  private void createCacheForVMs() {
+    restURLs.add(vm0.invoke(() -> createCacheAndRegisterFunction(vm0, "m1")));
+    restURLs.add(vm1.invoke(() -> createCacheAndRegisterFunction(vm1, "m2")));
+    restURLs.add(vm2.invoke(() -> createCacheAndRegisterFunction(vm2, "m3")));
+    restURLs.add(vm3.invoke(() -> createCacheAndRegisterFunction(vm3, "m4")));
+  }
+
   public void testFunctionExecutionEOnSelectedMembers() {
-    restURLs.add((String) vm0.invoke(() -> createCacheAndRegisterFunction(vm0, "m1")));
-    restURLs.add((String) vm1.invoke(() -> createCacheAndRegisterFunction(vm1, "m2")));
-    restURLs.add((String) vm2.invoke(() -> createCacheAndRegisterFunction(vm2, "m3")));
-    restURLs.add((String) vm3.invoke(() -> createCacheAndRegisterFunction(vm3, "m4")));
+    createCacheForVMs();
 
     for (int i = 0; i < 10; i++) {
       CloseableHttpResponse response = executeFunctionThroughRestCall("OnMembersFunction",null,null,null,null,"m1,m2,m3");
@@ -153,10 +150,7 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase
   }
 
   public void testFunctionExecutionOnMembersWithFilter() {
-    restURLs.add((String) vm0.invoke(() -> createCacheAndRegisterFunction(vm0, "m1")));
-    restURLs.add((String) vm1.invoke(() -> createCacheAndRegisterFunction(vm1, "m2")));
-    restURLs.add((String) vm2.invoke(() -> createCacheAndRegisterFunction(vm2, "m3")));
-    restURLs.add((String) vm3.invoke(() -> createCacheAndRegisterFunction(vm3, "m4")));
+    createCacheForVMs();
 
     for (int i = 0; i < 10; i++) {
       CloseableHttpResponse response = executeFunctionThroughRestCall("OnMembersFunction",null,"key2",null,null,"m1,m2,m3");


[52/54] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-17-2

Posted by je...@apache.org.
Merge branch 'develop' into feature/GEODE-17-2


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/da7a76de
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/da7a76de
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/da7a76de

Branch: refs/heads/feature/GEODE-17-2
Commit: da7a76defd44b172ed8d7987c93e2d39576289bf
Parents: 386ace7 ff55590
Author: Jens Deppe <jd...@pivotal.io>
Authored: Fri Mar 18 07:20:59 2016 -0700
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Fri Mar 18 07:20:59 2016 -0700

----------------------------------------------------------------------
 .travis.yml                                     |    7 +-
 README.md                                       |   16 +-
 extensions/geode-modules-assembly/build.gradle  |   10 +-
 extensions/geode-modules/build.gradle           |    3 +-
 geode-assembly/build.gradle                     |   27 +-
 .../LauncherLifecycleCommandsDUnitTest.java     |   10 +-
 .../rest/internal/web/RestFunctionTemplate.java |   23 +
 ...stAPIOnRegionFunctionExecutionDUnitTest.java |  479 +-
 .../web/controllers/RestAPITestBase.java        |  209 +-
 ...tAPIsOnGroupsFunctionExecutionDUnitTest.java |  310 +-
 ...APIsOnMembersFunctionExecutionDUnitTest.java |  299 +-
 geode-core/build.gradle                         |   13 +-
 .../com/gemstone/gemfire/DataSerializable.java  |    2 +-
 .../internal/doc-files/config-hierarchy.fig     |  156 -
 .../admin/internal/doc-files/health-classes.fig |  233 -
 .../admin/internal/doc-files/health-classes.gif |  Bin 8973 -> 0 bytes
 .../gemfire/admin/internal/package.html         |    4 +-
 .../client/doc-files/example-client-cache.xml   |   46 -
 .../gemfire/cache/client/internal/Endpoint.java |    2 +-
 .../internal/PdxRegistryRecoveryListener.java   |    6 +-
 .../gemfire/cache/client/internal/PoolImpl.java |    5 +-
 .../gemfire/cache/client/internal/PutAllOp.java |    8 +-
 .../gemfire/cache/client/internal/PutOp.java    |   15 +-
 .../doc-files/ConnectionManagerImpl.dia         |  Bin 2034 -> 0 bytes
 .../doc-files/ConnectionManagerImpl.png         |  Bin 11825 -> 0 bytes
 .../client/internal/doc-files/PoolImpl.dia      |  Bin 3083 -> 0 bytes
 .../internal/doc-files/QueueManagerImpl.dia     |  Bin 2180 -> 0 bytes
 .../internal/doc-files/QueueManagerImpl.png     |  Bin 15075 -> 0 bytes
 .../doc-files/client_static_diagram.png         |  Bin 29430 -> 0 bytes
 .../gemfire/cache/client/internal/package.html  |    6 +-
 .../gemstone/gemfire/cache/client/package.html  |    2 +-
 .../gemfire/cache/doc-files/architecture.fig    |  170 -
 .../gemfire/cache/doc-files/architecture.gif    |  Bin 9983 -> 0 bytes
 .../cache/doc-files/entry-life-cycle.fig        |   64 -
 .../cache/doc-files/entry-life-cycle.gif        |  Bin 3357 -> 0 bytes
 .../gemfire/cache/doc-files/example-cache.xml   |   98 -
 .../gemfire/cache/doc-files/example2-cache.xml  |   63 -
 .../gemfire/cache/doc-files/example3-cache.xml  |   60 -
 .../cache/doc-files/partitioned-regions.fig     |  267 -
 .../cache/doc-files/partitioned-regions.gif     |  Bin 9494 -> 0 bytes
 .../operations/PutAllOperationContext.java      |  275 +-
 .../internal/GetOperationContextImpl.java       |   24 +-
 .../operations/internal/UpdateOnlyMap.java      |  304 +
 .../com/gemstone/gemfire/cache/package.html     |    8 +-
 .../query/internal/index/AbstractIndex.java     |    8 +-
 .../query/internal/index/DummyQRegion.java      |   14 +-
 .../cache/query/internal/index/HashIndex.java   |    6 +-
 .../query/internal/index/IndexElemArray.java    |   34 +-
 .../query/internal/index/IndexManager.java      |   10 +-
 .../gemfire/distributed/ServerLauncher.java     |   56 +-
 .../ServerLauncherCacheProvider.java            |   34 +
 .../DefaultServerLauncherCacheProvider.java     |   57 +
 .../internal/DistributionConfigImpl.java        |   33 +-
 .../internal/InternalDistributedSystem.java     |   22 +-
 .../internal/LonerDistributionManager.java      |    4 +-
 .../internal/direct/DirectChannel.java          |   31 +-
 .../internal/doc-files/config-classes.fig       |  138 -
 .../internal/doc-files/config-classes.gif       |  Bin 4205 -> 0 bytes
 .../doc-files/distribution-managers.fig         |   76 -
 .../doc-files/distribution-managers.gif         |  Bin 3267 -> 0 bytes
 .../internal/locks/doc-files/elder.fig          |   84 -
 .../internal/locks/doc-files/elder.jpg          |  Bin 55182 -> 0 bytes
 .../internal/locks/doc-files/turks.fig          |  128 -
 .../internal/locks/doc-files/turks.jpg          |  Bin 79859 -> 0 bytes
 .../distributed/internal/locks/package.html     |    4 +-
 .../membership/gms/auth/GMSAuthenticator.java   |   98 +-
 .../membership/gms/fd/GMSHealthMonitor.java     |    2 +-
 .../membership/gms/membership/GMSJoinLeave.java |   29 +-
 .../gms/messages/JoinResponseMessage.java       |   15 -
 .../gms/messenger/JGroupsMessenger.java         |    5 +
 .../gemfire/distributed/internal/package.html   |    2 +-
 .../internal/tcpserver/TcpClient.java           |   16 +-
 .../internal/tcpserver/TcpServer.java           |    0
 .../doc-files/data-serialization-exceptions.fig |  135 -
 .../doc-files/data-serialization-exceptions.gif |  Bin 3666 -> 0 bytes
 .../gemfire/internal/AbstractConfig.java        |    2 +
 .../gemfire/internal/SocketCreator.java         |    2 +-
 .../admin/doc-files/class-hierarchy.fig         |  224 -
 .../admin/doc-files/class-hierarchy.gif         |  Bin 11971 -> 0 bytes
 .../internal/cache/AbstractRegionEntry.java     |  107 +-
 .../internal/cache/AbstractRegionMap.java       |   81 +-
 .../gemfire/internal/cache/BucketRegion.java    |   36 +-
 .../cache/BytesAndBitsForCompactor.java         |   18 +-
 .../internal/cache/CachedDeserializable.java    |    8 +
 .../cache/CachedDeserializableFactory.java      |    4 +-
 .../gemfire/internal/cache/DiskEntry.java       |  113 +-
 .../gemfire/internal/cache/DiskStoreImpl.java   |    4 -
 .../internal/cache/DistributedRegion.java       |   12 +-
 .../gemfire/internal/cache/EntryEventImpl.java  |  161 +-
 .../gemfire/internal/cache/LocalRegion.java     |   18 +-
 .../gemstone/gemfire/internal/cache/Oplog.java  |   12 +-
 .../internal/cache/PartitionedRegion.java       |    1 -
 .../cache/PartitionedRegionQueryEvaluator.java  |  391 +-
 .../cache/PreferBytesCachedDeserializable.java  |   11 +-
 .../gemfire/internal/cache/RegionEntry.java     |    9 +-
 .../internal/cache/RemoteDestroyMessage.java    |    4 +-
 .../cache/SearchLoadAndWriteProcessor.java      |    8 +-
 .../cache/StoreAllCachedDeserializable.java     |   11 +-
 .../gemfire/internal/cache/TXManagerImpl.java   |    3 +-
 .../gemfire/internal/cache/UpdateOperation.java |    2 +-
 .../internal/cache/VMCachedDeserializable.java  |    9 +-
 .../SnappyCompressedCachedDeserializable.java   |   10 +
 .../cache/control/HeapMemoryMonitor.java        |   14 +-
 .../cache/control/OffHeapMemoryMonitor.java     |   45 +-
 .../cache/doc-files/BucketAdvisor-state.png     |  Bin 39148 -> 0 bytes
 .../internal/cache/doc-files/eventmatrix.xls    |  Bin 24576 -> 0 bytes
 .../cache/doc-files/extensible-hashing.fig      |  159 -
 .../cache/doc-files/extensible-hashing.gif      |  Bin 6605 -> 0 bytes
 .../cache/doc-files/jcache-get-flow.fig         |  349 --
 .../cache/doc-files/jcache-get-flow.pdf         |  Bin 7519 -> 0 bytes
 .../cache/doc-files/jcache-put-flow.fig         |  359 --
 .../cache/doc-files/jcache-put-flow.pdf         |  Bin 7667 -> 0 bytes
 .../doc-files/jcache-update-message-flow.fig    |  334 -
 .../doc-files/jcache-update-message-flow.pdf    |  Bin 5937 -> 0 bytes
 .../cache/doc-files/partitioned-regions.fig     |  255 -
 .../cache/doc-files/partitioned-regions.gif     |  Bin 9273 -> 0 bytes
 .../internal/cache/doc-files/properties.html    | 3937 ------------
 .../cache/doc-files/region-implementation.fig   |  262 -
 .../gemfire/internal/cache/package.html         |    8 +-
 .../cache/partitioned/FetchEntriesMessage.java  |   10 +-
 .../internal/cache/partitioned/PutMessage.java  |    8 +-
 .../gemfire/internal/cache/properties.html      | 3937 ++++++++++++
 .../cache/tier/sockets/AcceptorImpl.java        |    9 +-
 .../cache/tier/sockets/CacheClientProxy.java    |    8 +-
 .../tier/sockets/ClientUpdateMessageImpl.java   |    2 +-
 .../internal/cache/tier/sockets/HandShake.java  |    3 +-
 .../internal/cache/tier/sockets/Message.java    |    2 +-
 .../internal/cache/tier/sockets/Part.java       |   51 +-
 .../cache/tier/sockets/command/Get70.java       |   19 +-
 .../cache/tier/sockets/command/PutAll.java      |    4 +
 .../cache/tier/sockets/command/PutAll70.java    |    4 +
 .../cache/tier/sockets/command/PutAll80.java    |    4 +
 .../cache/tier/sockets/command/Request.java     |    8 +-
 .../doc-files/communication-architecture.fig    |  158 -
 .../doc-files/communication-architecture.gif    |  Bin 5485 -> 0 bytes
 .../AbstractGatewaySenderEventProcessor.java    |   48 +-
 .../cache/wan/GatewaySenderEventImpl.java       |   81 +-
 .../parallel/ParallelGatewaySenderQueue.java    |   74 +-
 .../gemfire/internal/doc-files/cs-maps.fig      |  150 -
 .../gemfire/internal/doc-files/cs-maps.gif      |  Bin 5951 -> 0 bytes
 .../gemfire/internal/doc-files/ds-map.fig       |  105 -
 .../gemfire/internal/doc-files/ds-map.gif       |  Bin 4867 -> 0 bytes
 .../internal/doc-files/merge-log-files.fig      |  153 -
 .../internal/doc-files/merge-log-files.gif      |  Bin 2646 -> 0 bytes
 .../gemfire/internal/i18n/LocalizedStrings.java |    6 +-
 .../gemfire/internal/logging/MergeLogFiles.java |    2 +-
 .../internal/offheap/AbstractStoredObject.java  |   24 +
 .../offheap/AddressableMemoryChunk.java         |   29 -
 .../offheap/AddressableMemoryChunkFactory.java  |   27 -
 .../offheap/AddressableMemoryManager.java       |  261 +
 .../internal/offheap/ByteArrayMemoryChunk.java  |   77 -
 .../internal/offheap/ByteBufferMemoryChunk.java |   90 -
 .../gemfire/internal/offheap/DataAsAddress.java |  131 -
 .../gemfire/internal/offheap/Fragment.java      |   14 +-
 .../internal/offheap/FreeListManager.java       |  281 +-
 .../internal/offheap/LifecycleListener.java     |   20 +-
 .../internal/offheap/MemoryAllocator.java       |   18 +-
 .../internal/offheap/MemoryAllocatorImpl.java   |  507 ++
 .../gemfire/internal/offheap/MemoryBlock.java   |    2 +-
 .../internal/offheap/MemoryBlockNode.java       |   26 +-
 .../gemfire/internal/offheap/MemoryChunk.java   |   47 -
 .../offheap/MemoryChunkWithRefCount.java        |   34 -
 .../gemfire/internal/offheap/ObjectChunk.java   |  737 ---
 .../internal/offheap/ObjectChunkSlice.java      |   44 -
 .../offheap/ObjectChunkWithHeapForm.java        |   40 -
 .../offheap/OffHeapCachedDeserializable.java    |  142 -
 .../gemfire/internal/offheap/OffHeapHelper.java |   24 +-
 .../internal/offheap/OffHeapMemoryStats.java    |    8 +-
 .../offheap/OffHeapRegionEntryHelper.java       |   28 +-
 .../internal/offheap/OffHeapStorage.java        |   67 +-
 .../internal/offheap/OffHeapStoredObject.java   |  718 +++
 .../OffHeapStoredObjectAddressStack.java        |  141 +
 .../offheap/OffHeapStoredObjectSlice.java       |   44 +
 .../OffHeapStoredObjectWithHeapForm.java        |   41 +
 .../internal/offheap/RefCountChangeInfo.java    |    2 +-
 .../internal/offheap/ReferenceCountHelper.java  |    4 +-
 .../offheap/SimpleMemoryAllocatorImpl.java      |  511 --
 .../gemstone/gemfire/internal/offheap/Slab.java |   39 +
 .../gemfire/internal/offheap/SlabFactory.java   |   27 +
 .../gemfire/internal/offheap/SlabImpl.java      |   61 +
 .../gemfire/internal/offheap/StoredObject.java  |  117 +-
 .../internal/offheap/SyncChunkStack.java        |  141 -
 .../internal/offheap/TinyStoredObject.java      |  229 +
 .../internal/offheap/UnsafeMemoryChunk.java     |  217 -
 .../internal/tcp/ByteBufferInputStream.java     |   74 +-
 .../tcp/ImmutableByteBufferInputStream.java     |    4 +-
 .../gemfire/internal/util/BlobHelper.java       |    4 +-
 .../internal/util/doc-files/call-stack.fig      |   34 -
 .../internal/util/doc-files/class-loaders.fig   |   49 -
 .../internal/beans/MemberMBeanBridge.java       |    2 +-
 .../management/internal/cli/shell/Gfsh.java     |    2 +-
 .../gemfire/pdx/internal/PdxInputStream.java    |    4 +-
 .../gemstone/gemfire/pdx/internal/PdxType.java  |    2 +-
 .../security/GemFireSecurityException.java      |  112 +-
 .../security/NotAuthorizedException.java        |  118 +-
 .../javadoc-images/BucketAdvisor-state.png      |  Bin 0 -> 39148 bytes
 .../javadoc-images/ConnectionManagerImpl.dia    |  Bin 0 -> 2034 bytes
 .../javadoc-images/ConnectionManagerImpl.png    |  Bin 0 -> 11825 bytes
 .../javadoc-images/QueueManagerImpl.dia         |  Bin 0 -> 2180 bytes
 .../javadoc-images/QueueManagerImpl.png         |  Bin 0 -> 15075 bytes
 .../javadoc-images/class-hierarchy.fig          |  224 +
 .../javadoc-images/class-hierarchy.gif          |  Bin 0 -> 11971 bytes
 .../javadoc-images/client_static_diagram.png    |  Bin 0 -> 29430 bytes
 .../data-serialization-exceptions.fig           |  135 +
 .../data-serialization-exceptions.gif           |  Bin 0 -> 3666 bytes
 .../javadoc-images/distribution-managers.fig    |   76 +
 .../javadoc-images/distribution-managers.gif    |  Bin 0 -> 3267 bytes
 .../src/main/resources/javadoc-images/elder.fig |   84 +
 .../src/main/resources/javadoc-images/elder.jpg |  Bin 0 -> 55182 bytes
 .../javadoc-images/entry-life-cycle.fig         |   64 +
 .../javadoc-images/entry-life-cycle.gif         |  Bin 0 -> 3357 bytes
 .../resources/javadoc-images/eventmatrix.xls    |  Bin 0 -> 24576 bytes
 .../resources/javadoc-images/example-cache.xml  |   98 +
 .../javadoc-images/example-client-cache.xml     |   46 +
 .../resources/javadoc-images/example2-cache.xml |   63 +
 .../resources/javadoc-images/example3-cache.xml |   60 +
 .../javadoc-images/extensible-hashing.fig       |  159 +
 .../javadoc-images/extensible-hashing.gif       |  Bin 0 -> 6605 bytes
 .../resources/javadoc-images/health-classes.gif |  Bin 0 -> 8973 bytes
 .../javadoc-images/jcache-get-flow.fig          |  349 ++
 .../javadoc-images/jcache-get-flow.pdf          |  Bin 0 -> 7519 bytes
 .../javadoc-images/jcache-put-flow.fig          |  359 ++
 .../javadoc-images/jcache-put-flow.pdf          |  Bin 0 -> 7667 bytes
 .../jcache-update-message-flow.fig              |  334 +
 .../jcache-update-message-flow.pdf              |  Bin 0 -> 5937 bytes
 .../javadoc-images/merge-log-files.fig          |  153 +
 .../javadoc-images/merge-log-files.gif          |  Bin 0 -> 2646 bytes
 .../javadoc-images/partitioned-regions.fig      |  255 +
 .../javadoc-images/partitioned-regions.gif      |  Bin 0 -> 9273 bytes
 .../src/main/resources/javadoc-images/turks.fig |  128 +
 .../src/main/resources/javadoc-images/turks.jpg |  Bin 0 -> 79859 bytes
 .../gemfire/SystemFailureJUnitTest.java         |    5 +-
 .../cache/ConnectionPoolAutoDUnitTest.java      |   54 +
 .../gemfire/cache/ConnectionPoolDUnitTest.java  | 5880 ++++++++++++++++++
 .../CacheServerSSLConnectionDUnitTest.java      |  124 +-
 .../internal/index/IndexElemArrayJUnitTest.java |   66 +-
 .../gemfire/cache30/CacheXml80DUnitTest.java    |    2 +
 .../cache30/ClientMembershipDUnitTest.java      |  213 +-
 .../gemfire/cache30/ClientServerTestCase.java   |   12 +-
 .../DistributedMulticastRegionDUnitTest.java    |   12 +-
 .../gemfire/cache30/MultiVMRegionTestCase.java  |   36 +-
 .../gemfire/distributed/LauncherTestSuite.java  |    2 +-
 .../MockServerLauncherCacheProvider.java        |   42 +
 .../ServerLauncherWithProviderJUnitTest.java    |   92 +
 .../ServerLauncherWithSpringJUnitTest.java      |   99 -
 .../internal/DistributionAdvisorDUnitTest.java  |    3 +-
 .../gms/fd/GMSHealthMonitorJUnitTest.java       |   20 +-
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |   14 +-
 .../gms/membership/GMSJoinLeaveTestHelper.java  |   24 +
 .../TcpServerBackwardCompatDUnitTest.java       |   97 +-
 .../disttx/DistTXManagerImplJUnitTest.java      |    6 +
 .../internal/SSLConfigIntegrationJUnitTest.java |    2 +-
 .../gemfire/internal/SSLConfigJUnitTest.java    |   73 +-
 .../AbstractDistributedRegionJUnitTest.java     |  166 +
 .../internal/cache/BucketRegionJUnitTest.java   |  186 +-
 .../cache/ChunkValueWrapperJUnitTest.java       |  188 -
 .../cache/ClientServerGetAllDUnitTest.java      |    4 +-
 .../cache/ClientServerTransactionDUnitTest.java |   58 +-
 .../cache/DistributedRegionJUnitTest.java       |  101 +
 .../gemfire/internal/cache/OffHeapTestUtil.java |    8 +-
 .../cache/OffHeapValueWrapperJUnitTest.java     |  188 +
 .../cache/OldValueImporterTestBase.java         |   40 +-
 .../internal/cache/TXManagerImplJUnitTest.java  |   11 +
 .../FetchEntriesMessageJUnitTest.java           |   93 +
 .../sockets/DurableClientBug39997DUnitTest.java |    6 +
 .../cache/tier/sockets/MessageJUnitTest.java    |    1 -
 .../cache/wan/AsyncEventQueueTestBase.java      |   86 +-
 .../asyncqueue/AsyncEventListenerDUnitTest.java |   21 +-
 .../offheap/ByteArrayMemoryChunkJUnitTest.java  |   30 -
 .../offheap/DataAsAddressJUnitTest.java         |  368 --
 .../DirectByteBufferMemoryChunkJUnitTest.java   |   33 -
 .../internal/offheap/FragmentJUnitTest.java     |   22 +-
 .../internal/offheap/FreeListManagerTest.java   |  448 +-
 .../offheap/FreeListOffHeapRegionJUnitTest.java |    2 +-
 .../HeapByteBufferMemoryChunkJUnitTest.java     |   33 -
 .../offheap/LifecycleListenerJUnitTest.java     |   50 +-
 ...moryAllocatorFillPatternIntegrationTest.java |  246 +
 .../MemoryAllocatorFillPatternJUnitTest.java    |  183 +
 .../offheap/MemoryAllocatorJUnitTest.java       |  594 ++
 .../offheap/MemoryBlockNodeJUnitTest.java       |   54 +-
 .../offheap/MemoryChunkJUnitTestBase.java       |  290 -
 .../internal/offheap/MemoryChunkTestSuite.java  |   32 -
 .../offheap/NullOffHeapMemoryStats.java         |    8 +-
 .../internal/offheap/ObjectChunkJUnitTest.java  |  902 ---
 .../offheap/ObjectChunkSliceJUnitTest.java      |   72 -
 .../ObjectChunkWithHeapFormJUnitTest.java       |   64 -
 .../offheap/OffHeapHelperJUnitTest.java         |   21 +-
 .../internal/offheap/OffHeapIndexJUnitTest.java |    2 +-
 .../internal/offheap/OffHeapRegionBase.java     |   22 +-
 .../OffHeapRegionEntryHelperJUnitTest.java      |   94 +-
 .../offheap/OffHeapStorageJUnitTest.java        |   36 +-
 ...ffHeapStoredObjectAddressStackJUnitTest.java |  290 +
 .../offheap/OffHeapStoredObjectJUnitTest.java   |  867 +++
 .../OffHeapStoredObjectSliceJUnitTest.java      |   72 +
 ...ffHeapStoredObjectWithHeapFormJUnitTest.java |   64 +
 .../offheap/OffHeapValidationJUnitTest.java     |   10 +-
 .../OffHeapWriteObjectAsByteArrayJUnitTest.java |   18 +-
 .../OldFreeListOffHeapRegionJUnitTest.java      |    2 +-
 .../offheap/OutOfOffHeapMemoryDUnitTest.java    |    2 +-
 ...moryAllocatorFillPatternIntegrationTest.java |  246 -
 ...mpleMemoryAllocatorFillPatternJUnitTest.java |  183 -
 .../offheap/SimpleMemoryAllocatorJUnitTest.java |  631 --
 .../internal/offheap/StoredObjectTestSuite.java |    8 +-
 .../offheap/SyncChunkStackJUnitTest.java        |  289 -
 .../offheap/TinyMemoryBlockJUnitTest.java       |  244 +
 .../offheap/TinyStoredObjectJUnitTest.java      |  353 ++
 .../TxReleasesOffHeapOnCloseJUnitTest.java      |    2 +-
 .../offheap/UnsafeMemoryChunkJUnitTest.java     |   87 -
 .../internal/process/PidFileJUnitTest.java      |    4 +-
 .../management/OffHeapManagementDUnitTest.java  |   54 +-
 ...ersalMembershipListenerAdapterDUnitTest.java |   85 +-
 .../OffHeapByteBufferByteSourceJUnitTest.java   |   10 +-
 .../gemfire/pdx/OffHeapByteSourceJUnitTest.java |   16 +-
 .../gemfire/pdx/PdxClientServerDUnitTest.java   |   46 +-
 .../security/ClientAuthenticationDUnitTest.java |    7 +-
 .../security/ClientAuthorizationDUnitTest.java  |   40 +-
 .../security/ClientAuthorizationTestBase.java   |   56 +-
 .../security/ClientMultiUserAuthzDUnitTest.java |    5 +-
 .../DeltaClientAuthorizationDUnitTest.java      |    5 +-
 .../DeltaClientPostAuthorizationDUnitTest.java  |    5 +-
 .../security/GemFireSecurityExceptionTest.java  |  167 +
 .../security/NotAuthorizedExceptionTest.java    |  198 +
 .../security/P2PAuthenticationDUnitTest.java    |   11 +-
 .../gemfire/security/SecurityTestUtil.java      |   44 +
 .../generator/AuthzCredentialGenerator.java     |  446 ++
 .../security/generator/CredentialGenerator.java |  332 +
 .../DummyAuthzCredentialGenerator.java          |  129 +
 .../generator/DummyCredentialGenerator.java     |   89 +
 .../generator/LdapUserCredentialGenerator.java  |  163 +
 .../generator/PKCSCredentialGenerator.java      |  115 +
 .../generator/SSLCredentialGenerator.java       |  121 +
 .../UserPasswordWithExtraPropsAuthInit.java     |   69 +
 .../generator/XmlAuthzCredentialGenerator.java  |  257 +
 .../security/templates/DummyAuthenticator.java  |   75 +
 .../security/templates/DummyAuthorization.java  |  122 +
 .../templates/FunctionSecurityPrmsHolder.java   |   50 +
 .../templates/LdapUserAuthenticator.java        |  106 +
 .../security/templates/PKCSAuthInit.java        |  119 +
 .../security/templates/PKCSAuthenticator.java   |  157 +
 .../security/templates/PKCSPrincipal.java       |   40 +
 .../security/templates/PKCSPrincipalTest.java   |   48 +
 .../templates/UserPasswordAuthInit.java         |   75 +
 .../security/templates/UsernamePrincipal.java   |   44 +
 .../templates/UsernamePrincipalTest.java        |   48 +
 .../security/templates/XmlAuthorization.java    |  614 ++
 .../security/templates/XmlErrorHandler.java     |   74 +
 .../gemfire/test/dunit/DistributedTestCase.java |    5 +-
 .../test/dunit/DistributedTestUtils.java        |    1 +
 .../gemfire/test/dunit/NamedCallable.java       |   41 +
 .../gemfire/test/dunit/NamedRunnable.java       |   41 +
 .../com/gemstone/gemfire/test/dunit/VM.java     |   61 +
 .../dunit/rules/DistributedDisconnectRule.java  |   44 +-
 .../rules/DistributedExternalResource.java      |   27 +-
 .../DistributedRestoreSystemProperties.java     |    5 +-
 .../gemfire/test/dunit/rules/RemoteInvoker.java |   10 +-
 .../test/dunit/tests/BasicDUnitTest.java        |   66 +
 .../com/gemstone/gemfire/test/fake/Fakes.java   |    5 +-
 .../java/security/AuthzCredentialGenerator.java |  462 --
 .../test/java/security/CredentialGenerator.java |  343 -
 .../security/DummyAuthzCredentialGenerator.java |  145 -
 .../java/security/DummyCredentialGenerator.java |   94 -
 .../security/LdapUserCredentialGenerator.java   |  160 -
 .../java/security/PKCSCredentialGenerator.java  |  112 -
 .../java/security/SSLCredentialGenerator.java   |  117 -
 .../UserPasswordWithExtraPropsAuthInit.java     |   77 -
 .../security/XmlAuthzCredentialGenerator.java   |  264 -
 .../templates/security/DummyAuthenticator.java  |   87 -
 .../templates/security/DummyAuthorization.java  |  118 -
 .../security/FunctionSecurityPrmsHolder.java    |   55 -
 .../security/LdapUserAuthenticator.java         |  117 -
 .../java/templates/security/PKCSAuthInit.java   |  133 -
 .../templates/security/PKCSAuthenticator.java   |  167 -
 .../java/templates/security/PKCSPrincipal.java  |   42 -
 .../security/UserPasswordAuthInit.java          |   84 -
 .../templates/security/UsernamePrincipal.java   |   46 -
 .../templates/security/XmlAuthorization.java    |  675 --
 .../templates/security/XmlErrorHandler.java     |   82 -
 ...fire.distributed.ServerLauncherCacheProvider |    1 +
 .../gemfire/codeAnalysis/excludedClasses.txt    |    1 +
 .../sanctionedDataSerializables.txt             |    6 +-
 .../codeAnalysis/sanctionedSerializables.txt    |   10 +-
 .../gemfire/security/generator/authz-dummy.xml  |  124 +
 .../gemfire/security/generator/authz-ldap.xml   |   83 +
 .../generator/authz-multiUser-dummy.xml         |  104 +
 .../security/generator/authz-multiUser-ldap.xml |   81 +
 .../security/generator/keys/gemfire1.keystore   |  Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire10.keystore  |  Bin 0 -> 1546 bytes
 .../security/generator/keys/gemfire11.keystore  |  Bin 0 -> 1546 bytes
 .../security/generator/keys/gemfire2.keystore   |  Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire3.keystore   |  Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire4.keystore   |  Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire5.keystore   |  Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire6.keystore   |  Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire7.keystore   |  Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire8.keystore   |  Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire9.keystore   |  Bin 0 -> 1536 bytes
 .../generator/keys/ibm/gemfire1.keystore        |  Bin 0 -> 1426 bytes
 .../generator/keys/ibm/gemfire10.keystore       |  Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire11.keystore       |  Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire2.keystore        |  Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire3.keystore        |  Bin 0 -> 1426 bytes
 .../generator/keys/ibm/gemfire4.keystore        |  Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire5.keystore        |  Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire6.keystore        |  Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire7.keystore        |  Bin 0 -> 1426 bytes
 .../generator/keys/ibm/gemfire8.keystore        |  Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire9.keystore        |  Bin 0 -> 1426 bytes
 .../security/generator/keys/ibm/publickeyfile   |  Bin 0 -> 4535 bytes
 .../security/generator/keys/publickeyfile       |  Bin 0 -> 4535 bytes
 .../gemfire/security/templates/authz5_5.dtd     |  105 +
 .../gemfire/security/templates/authz6_0.dtd     |  110 +
 .../src/test/resources/lib/authz-dummy.xml      |  126 -
 .../src/test/resources/lib/authz-ldap.xml       |   85 -
 .../resources/lib/authz-multiUser-dummy.xml     |  106 -
 .../test/resources/lib/authz-multiUser-ldap.xml |   83 -
 .../test/resources/lib/keys/gemfire1.keystore   |  Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire10.keystore  |  Bin 1546 -> 0 bytes
 .../test/resources/lib/keys/gemfire11.keystore  |  Bin 1546 -> 0 bytes
 .../test/resources/lib/keys/gemfire2.keystore   |  Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire3.keystore   |  Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire4.keystore   |  Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire5.keystore   |  Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire6.keystore   |  Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire7.keystore   |  Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire8.keystore   |  Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire9.keystore   |  Bin 1536 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire1.keystore    |  Bin 1426 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire10.keystore   |  Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire11.keystore   |  Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire2.keystore    |  Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire3.keystore    |  Bin 1426 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire4.keystore    |  Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire5.keystore    |  Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire6.keystore    |  Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire7.keystore    |  Bin 1426 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire8.keystore    |  Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire9.keystore    |  Bin 1426 -> 0 bytes
 .../test/resources/lib/keys/ibm/publickeyfile   |  Bin 4535 -> 0 bytes
 .../src/test/resources/lib/keys/publickeyfile   |  Bin 4535 -> 0 bytes
 .../resources/spring/spring-gemfire-context.xml |   42 -
 .../resources/templates/security/authz5_5.dtd   |  105 -
 .../resources/templates/security/authz6_0.dtd   |  110 -
 .../internal/cache/PutAllCSDUnitTest.java       |  225 +-
 .../tier/sockets/DurableClientTestCase.java     |    9 +-
 .../security/ClientAuthzObjectModDUnitTest.java |   16 +-
 .../ClientCQPostAuthorizationDUnitTest.java     |    5 +-
 .../ClientPostAuthorizationDUnitTest.java       |    4 +-
 .../gemfire/security/MultiuserAPIDUnitTest.java |    6 +-
 .../MultiuserDurableCQAuthzDUnitTest.java       |    7 +-
 geode-junit/build.gradle                        |    1 +
 .../gemfire/test/junit/ConditionalIgnore.java   |    1 -
 .../gemfire/test/junit/IgnoreCondition.java     |    1 -
 .../gemfire/test/junit/IgnoreUntil.java         |    1 -
 .../com/gemstone/gemfire/test/junit/Repeat.java |    3 +-
 .../com/gemstone/gemfire/test/junit/Retry.java  |    4 +-
 .../test/junit/categories/ContainerTest.java    |    3 +-
 .../test/junit/categories/DistributedTest.java  |    3 +-
 .../categories/DistributedTransactionsTest.java |    3 +-
 .../test/junit/categories/HydraTest.java        |    3 +-
 .../test/junit/categories/IntegrationTest.java  |    3 +-
 .../test/junit/categories/PerformanceTest.java  |    3 +-
 .../gemfire/test/junit/categories/UITest.java   |    3 +-
 .../gemfire/test/junit/categories/UnitTest.java |   13 +-
 .../gemfire/test/junit/categories/WanTest.java  |    5 +-
 .../test/junit/rules/ConditionalIgnoreRule.java |    1 -
 .../test/junit/rules/ExpectedTimeout.java       |  180 -
 .../test/junit/rules/ExpectedTimeoutRule.java   |   42 +-
 .../test/junit/rules/IgnoreUntilRule.java       |    1 -
 .../gemfire/test/junit/rules/RepeatRule.java    |    3 +-
 .../gemfire/test/junit/rules/RetryRule.java     |    1 -
 .../gemfire/test/junit/rules/RuleList.java      |   95 +
 .../rules/SerializableExternalResource.java     |  107 -
 .../test/junit/rules/SerializableRuleChain.java |  119 -
 .../rules/SerializableTemporaryFolder.java      |   70 -
 .../test/junit/rules/SerializableTestName.java  |   54 -
 .../test/junit/rules/SerializableTestRule.java  |   33 -
 .../junit/rules/SerializableTestWatcher.java    |   29 -
 .../test/junit/rules/SerializableTimeout.java   |  119 -
 .../serializable/FieldSerializationUtils.java   |   48 +
 .../serializable/FieldsOfTemporaryFolder.java   |   26 +
 .../rules/serializable/FieldsOfTestName.java    |   24 +
 .../rules/serializable/FieldsOfTimeout.java     |   26 +
 .../SerializableExternalResource.java           |   25 +
 .../serializable/SerializableRuleList.java      |   78 +
 .../SerializableTemporaryFolder.java            |   70 +
 .../serializable/SerializableTestName.java      |   65 +
 .../serializable/SerializableTestRule.java      |   28 +
 .../serializable/SerializableTestWatcher.java   |   26 +
 .../rules/serializable/SerializableTimeout.java |  104 +
 .../junit/support/DefaultIgnoreCondition.java   |    3 +-
 .../IgnoreConditionEvaluationException.java     |    1 -
 .../junit/rules/ExpectedTimeoutJUnitTest.java   |  204 -
 .../junit/rules/ExpectedTimeoutRuleTest.java    |  246 +
 .../test/junit/rules/IgnoreUntilRuleTest.java   |  145 +
 .../test/junit/rules/RepeatRuleTest.java        |  411 ++
 .../rules/RetryRuleGlobalWithErrorTest.java     |  326 +
 .../rules/RetryRuleGlobalWithExceptionTest.java |  332 +
 .../rules/RetryRuleLocalWithErrorTest.java      |  265 +
 .../rules/RetryRuleLocalWithExceptionTest.java  |  276 +
 .../gemfire/test/junit/rules/RuleListTest.java  |  209 +
 .../gemfire/test/junit/rules/TestRunner.java    |   35 +
 .../examples/RepeatingTestCasesExampleTest.java |   15 +-
 .../rules/examples/RetryRuleExampleTest.java    |   20 +-
 .../rules/examples/RuleAndClassRuleTest.java    |  147 +
 .../SerializableExternalResourceTest.java       |   79 +
 .../serializable/SerializableRuleListTest.java  |   89 +
 .../SerializableTemporaryFolderTest.java        |   90 +
 .../serializable/SerializableTestNameTest.java  |   84 +
 .../SerializableTestWatcherTest.java            |   79 +
 .../serializable/SerializableTimeoutTest.java   |  106 +
 .../rules/tests/ExpectedTimeoutRuleTest.java    |  214 -
 .../junit/rules/tests/IgnoreUntilRuleTest.java  |  121 -
 .../junit/rules/tests/JUnitRuleTestSuite.java   |   33 -
 .../test/junit/rules/tests/RepeatRuleTest.java  |  304 -
 .../tests/RetryRuleGlobalWithErrorTest.java     |  250 -
 .../tests/RetryRuleGlobalWithExceptionTest.java |  254 -
 .../tests/RetryRuleLocalWithErrorTest.java      |  207 -
 .../tests/RetryRuleLocalWithExceptionTest.java  |  213 -
 .../junit/rules/tests/RuleAndClassRuleTest.java |  138 -
 .../test/junit/rules/tests/TestRunner.java      |   37 -
 .../internal/distributed/LuceneFunction.java    |    3 +-
 geode-pulse/build.gradle                        |   12 +
 .../pulse/internal/data/JMXDataUpdater.java     |   85 +-
 .../service/ClusterSelectedRegionService.java   |    8 +-
 .../ClusterSelectedRegionsMemberService.java    |    8 +-
 geode-rebalancer/build.gradle                   |    1 +
 geode-site/website/README.md                    |    2 +-
 geode-site/website/Rules                        |    3 -
 geode-site/website/content/community/index.html |    2 +-
 geode-site/website/content/docs/index.html      |   48 +
 geode-site/website/layouts/default.html         |   32 -
 geode-site/website/layouts/footer.html          |    2 +-
 geode-site/website/layouts/header.html          |    2 +-
 .../wan/GatewaySenderEventRemoteDispatcher.java |   44 +-
 .../gemfire/internal/cache/wan/WANTestBase.java |   26 +-
 .../cache/wan/misc/WANSSLDUnitTest.java         |    2 +
 ...arallelGatewaySenderOperationsDUnitTest.java |   35 +
 geode-web-api/build.gradle                      |    7 +
 .../controllers/FunctionAccessController.java   |  195 +-
 .../rest/internal/web/util/ArrayUtils.java      |   12 +-
 geode-web/build.gradle                          |    7 +
 gradle/dependency-versions.properties           |    4 +-
 gradle/java.gradle                              |    9 -
 gradle/rat.gradle                               |    1 +
 gradle/test.gradle                              |    4 +
 545 files changed, 30213 insertions(+), 25049 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/da7a76de/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/da7a76de/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/da7a76de/geode-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/da7a76de/geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlAuthorization.java
----------------------------------------------------------------------
diff --cc geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlAuthorization.java
index 0000000,b8f2e50..d9aa391
mode 000000,100755..100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlAuthorization.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlAuthorization.java
@@@ -1,0 -1,614 +1,614 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
+ package com.gemstone.gemfire.security.templates;
+ 
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.security.Principal;
+ import java.util.ArrayList;
+ import java.util.HashMap;
+ import java.util.HashSet;
+ import java.util.Map;
+ import java.util.Set;
+ import java.util.regex.Matcher;
+ import java.util.regex.Pattern;
+ import javax.xml.parsers.DocumentBuilder;
+ import javax.xml.parsers.DocumentBuilderFactory;
+ 
+ import com.gemstone.gemfire.LogWriter;
+ import com.gemstone.gemfire.cache.Cache;
+ import com.gemstone.gemfire.cache.operations.ExecuteFunctionOperationContext;
+ import com.gemstone.gemfire.cache.operations.OperationContext;
+ import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
+ import com.gemstone.gemfire.cache.operations.QueryOperationContext;
+ import com.gemstone.gemfire.distributed.DistributedMember;
+ import com.gemstone.gemfire.security.AccessControl;
+ import com.gemstone.gemfire.security.NotAuthorizedException;
+ import org.w3c.dom.Attr;
+ import org.w3c.dom.Document;
+ import org.w3c.dom.NamedNodeMap;
+ import org.w3c.dom.Node;
+ import org.w3c.dom.NodeList;
+ import org.xml.sax.EntityResolver;
+ import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
+ import org.xml.sax.SAXParseException;
+ 
+ /**
+  * An implementation of the {@link AccessControl} interface that allows
+  * authorization using the permissions as specified in the given XML
+  * file.
+  * 
+  * The format of the XML file is specified in <a href="authz5_5.dtd"/>. It
+  * implements a role-based authorization at the operation level for each region.
+  * Each principal name may be associated with a set of roles. The name of the
+  * principal is obtained using the {@link Principal#getName()} method and no other
+  * information of the principal is utilized. Each role can be provided
+  * permissions to execute operations for each region.
+  * 
+  * The top-level element in the XML is "acl" tag that contains the "role" and
+  * "permission" tags. The "role" tag contains the list of users that have been
+  * given that role. The name of the role is specified in the "role" attribute
+  * and the users are contained in the "user" tags insided the "role" tag.
+  * 
+  * The "permissions" tag contains the list of operations allowed for a
+  * particular region. The role name is specified as the "role" attribute, the
+  * list of comma separated region names as the optional "regions" attribute and
+  * the operation names are contained in the "operation" tags inside the
+  * "permissions" tag. The allowed operation names are: GET, PUT, PUTALL,
+  * DESTROY, REGISTER_INTEREST, UNREGISTER_INTEREST, CONTAINS_KEY, KEY_SET,
+  * QUERY, EXECUTE_CQ, STOP_CQ, CLOSE_CQ, REGION_CLEAR, REGION_CREATE,
+  * REGION_DESTROY. These correspond to the operations in the
+  * {@link OperationCode} enumeration with the same name.
+  * 
+  * When no region name is specified then the operation is allowed for all
+  * regions in the cache. Any permissions specified for regions using the
+  * "regions" attribute override these permissions. This allows users to provide
+  * generic permissions without any region name, and override for specific
+  * regions specified using the "regions" attribute. A cache-level operation
+  * (e.g. {@link OperationCode#REGION_DESTROY}) specified for a particular region
+  * is ignored i.e. the cache-level operations are only applicable when no region
+  * name is specified. A {@link OperationCode#QUERY} operation is permitted when
+  * either the {@code QUERY} permission is provided at the cache-level for
+  * the user or when {@code QUERY} permission is provided for all the
+  * regions that are part of the query string.
+  * 
+  * Any roles specified in the "user" tag that do not have a specified permission
+  * set using the "permission" tags are ignored. When no {@link Principal} is
+  * associated with the current connection, then empty user name is used to
+  * search for the roles so an empty user name can be used to specify roles of
+  * unauthenticated clients (i.e. {@code Everyone}).
+  * 
+  * This sample implementation is useful only for pre-operation checks and should
+  * not be used for post-operation authorization since it does nothing useful for
+  * post-operation case.
+  * 
+  * @since 5.5
+  */
+ public class XmlAuthorization implements AccessControl {
+ 
+   public static final String DOC_URI_PROP_NAME = "security-authz-xml-uri";
+ 
+   private static final Object sync = new Object();
+   private static final String EMPTY_VALUE = "";
+ 
+   private static final String TAG_ROLE = "role";
+   private static final String TAG_USER = "user";
+   private static final String TAG_PERMS = "permission";
+   private static final String TAG_OP = "operation";
+ 
+   private static final String ATTR_ROLENAME = "name";
+   private static final String ATTR_ROLE = "role";
+   private static final String ATTR_REGIONS = "regions";
+   private static final String ATTR_FUNCTION_IDS = "functionIds";
+   private static final String ATTR_FUNCTION_OPTIMIZE_FOR_WRITE = "optimizeForWrite";
+   private static final String ATTR_FUNCTION_KEY_SET = "keySet";
+ 
+   private static String currentDocUri = null;
+   private static Map<String, HashSet<String>> userRoles = null;
+   private static Map<String, Map<String, Map<OperationCode, FunctionSecurityPrmsHolder>>> rolePermissions = null;
+   private static NotAuthorizedException xmlLoadFailure = null;
+ 
+   private final Map<String, Map<OperationCode, FunctionSecurityPrmsHolder>> allowedOps;
+ 
+   protected LogWriter systemLogWriter;
+   protected LogWriter securityLogWriter;
+ 
+   /**
+    * Public static factory method to create an instance of
+    * {@code XmlAuthorization}. The fully qualified name of the class
+    * ({@code com.gemstone.gemfire.security.templates.XmlAuthorization.create})
+    * should be mentioned as the {@code security-client-accessor} system
+    * property to enable pre-operation authorization checks as implemented in
+    * this class.
+    *
+    * @return an object of {@code XmlAuthorization} class
+    */
+   public static AccessControl create() {
+     return new XmlAuthorization();
+   }
+ 
+   /**
+    * Clear all the statically cached information.
+    */
+   public static void clear() {
+     XmlAuthorization.currentDocUri = null;
+     if (XmlAuthorization.userRoles != null) {
+       XmlAuthorization.userRoles.clear();
+       XmlAuthorization.userRoles = null;
+     }
+     if (XmlAuthorization.rolePermissions != null) {
+       XmlAuthorization.rolePermissions.clear();
+       XmlAuthorization.rolePermissions = null;
+     }
+     XmlAuthorization.xmlLoadFailure = null;
+   }
+ 
+   /**
+    * Change the region name to a standard format having single '/' as separator
+    * and starting with a '/' as in standard POSIX paths
+    */
+   public static String normalizeRegionName(final String regionName) {
+     if (regionName == null || regionName.length() == 0) {
+       return EMPTY_VALUE;
+     }
+ 
+     char[] resultName = new char[regionName.length() + 1];
+     boolean changed = false;
+     boolean isPrevCharSlash = false;
+     int startIndex;
+ 
+     if (regionName.charAt(0) != '/') {
+       changed = true;
+       startIndex = 0;
+     } else {
+       isPrevCharSlash = true;
+       startIndex = 1;
+     }
+ 
+     resultName[0] = '/';
+     int resultLength = 1;
+ 
+     // Replace all more than one '/'s with a single '/'
+     for (int index = startIndex; index < regionName.length(); ++index) {
+       char currChar = regionName.charAt(index);
+       if (currChar == '/') {
+         if (isPrevCharSlash) {
+           changed = true;
+           continue;
+         }
+         isPrevCharSlash = true;
+       } else {
+         isPrevCharSlash = false;
+       }
+       resultName[resultLength++] = currChar;
+     }
+ 
+     // Remove any trailing slash
+     if (resultName[resultLength - 1] == '/') {
+       --resultLength;
+       changed = true;
+     }
+ 
+     if (changed) {
+       return new String(resultName, 0, resultLength);
+     } else {
+       return regionName;
+     }
+   }
+ 
+   private XmlAuthorization() {
+     this.allowedOps = new HashMap<String, Map<OperationCode, FunctionSecurityPrmsHolder>>();
+     this.systemLogWriter = null;
+     this.securityLogWriter = null;
+   }
+ 
+   /**
+    * Initialize the {@code XmlAuthorization} callback for a client having
+    * the given principal.
+    * 
+    * This method caches the full XML authorization file the first time it is
+    * invoked and caches all the permissions for the provided
+    * {@code principal} to speed up lookup the
+    * {@code authorizeOperation} calls. The permissions for the principal
+    * are maintained as a {@link Map} of region name to the {@link HashSet} of
+    * operations allowed for that region. A global entry with region name as
+    * empty string is also made for permissions provided for all the regions.
+    * 
+    * @param  principal
+    *         the principal associated with the authenticated client
+    * @param  cache
+    *         reference to the cache object
+    * @param  remoteMember
+    *         the {@link DistributedMember} object for the remote authenticated
+    *         client
+    * 
+    * @throws NotAuthorizedException
+    *         if some exception condition happens during the initialization
+    *         while reading the XML; in such a case all subsequent client
+    *         operations will throw {@code NotAuthorizedException}
+    */
+   @Override
+   public void init(final Principal principal, final DistributedMember remoteMember, final Cache cache) throws NotAuthorizedException {
+     synchronized (sync) {
+       XmlAuthorization.init(cache);
+     }
+ 
+     this.systemLogWriter = cache.getLogger();
+     this.securityLogWriter = cache.getSecurityLogger();
+ 
+     String name;
+     if (principal != null) {
+       name = principal.getName();
+     } else {
+       name = EMPTY_VALUE;
+     }
+ 
+     HashSet<String> roles = XmlAuthorization.userRoles.get(name);
+     if (roles != null) {
+       for (String roleName : roles) {
+         Map<String, Map<OperationCode, FunctionSecurityPrmsHolder>> regionOperationMap = XmlAuthorization.rolePermissions.get(roleName);
+         if (regionOperationMap != null) {
+           for (Map.Entry<String, Map<OperationCode, FunctionSecurityPrmsHolder>> regionEntry : regionOperationMap.entrySet()) {
+             String regionName = regionEntry.getKey();
+             Map<OperationCode, FunctionSecurityPrmsHolder> regionOperations = this.allowedOps.get(regionName);
+             if (regionOperations == null) {
+               regionOperations = new HashMap<OperationCode, FunctionSecurityPrmsHolder>();
+               this.allowedOps.put(regionName, regionOperations);
+             }
+             regionOperations.putAll(regionEntry.getValue());
+           }
+         }
+       }
+     }
+   }
+ 
+   /**
+    * Return true if the given operation is allowed for the cache/region.
+    * 
+    * This looks up the cached permissions of the principal in the map for the
+    * provided region name. If none are found then the global permissions with
+    * empty region name are looked up. The operation is allowed if it is found
+    * this permission list.
+    * 
+    * @param  regionName
+    *         When null then it indicates a cache-level operation, else the
+    *         name of the region for the operation.
+    * @param  context
+    *         the data required by the operation
+    * 
+    * @return true if the operation is authorized and false otherwise
+    */
+   @Override
+   public boolean authorizeOperation(String regionName, final OperationContext context) {
+     Map<OperationCode, FunctionSecurityPrmsHolder> operationMap;
+ 
+     // Check GET permissions for updates from server to client
+     if (context.isClientUpdate()) {
+       operationMap = this.allowedOps.get(regionName);
+       if (operationMap == null && regionName.length() > 0) {
+         operationMap = this.allowedOps.get(EMPTY_VALUE);
+       }
+       if (operationMap != null) {
+         return operationMap.containsKey(OperationCode.GET);
+       }
+       return false;
+     }
+ 
+     OperationCode opCode = context.getOperationCode();
+     if (opCode.isQuery() || opCode.isExecuteCQ() || opCode.isCloseCQ() || opCode.isStopCQ()) {
+       // First check if cache-level permission has been provided
+       operationMap = this.allowedOps.get(EMPTY_VALUE);
+       boolean globalPermission = (operationMap != null && operationMap .containsKey(opCode));
+       Set<String> regionNames = ((QueryOperationContext)context) .getRegionNames();
+       if (regionNames == null || regionNames.size() == 0) {
+         return globalPermission;
+       }
+ 
+       for (String r : regionNames) {
+         regionName = normalizeRegionName(r);
+         operationMap = this.allowedOps.get(regionName);
+         if (operationMap == null) {
+           if (!globalPermission) {
+             return false;
+           }
+         } else if (!operationMap.containsKey(opCode)) {
+           return false;
+         }
+       }
+       return true;
+     }
+ 
+     final String normalizedRegionName = normalizeRegionName(regionName);
+     operationMap = this.allowedOps.get(normalizedRegionName);
+     if (operationMap == null && normalizedRegionName.length() > 0) {
+       operationMap = this.allowedOps.get(EMPTY_VALUE);
+     }
+     if (operationMap != null) {
+       if (context.getOperationCode() != OperationCode.EXECUTE_FUNCTION) {
+         return operationMap.containsKey(context.getOperationCode());
+ 
+       } else {
+         if (!operationMap.containsKey(context.getOperationCode())) {
+           return false;
+ 
+         } else {
+           if (!context.isPostOperation()) {
+             FunctionSecurityPrmsHolder functionParameter = operationMap.get(context.getOperationCode());
+             ExecuteFunctionOperationContext functionContext = (ExecuteFunctionOperationContext) context;
+             // OnRegion execution
+             if (functionContext.getRegionName() != null) {
+               if (functionParameter.isOptimizeForWrite() != null && functionParameter.isOptimizeForWrite().booleanValue() != functionContext.isOptimizeForWrite()) {
+                 return false;
+               }
+               if (functionParameter.getFunctionIds() != null && !functionParameter.getFunctionIds().contains( functionContext.getFunctionId())) {
+                 return false;
+               }
+               if (functionParameter.getKeySet() != null && functionContext.getKeySet() != null) {
+                 if (functionContext.getKeySet().containsAll( functionParameter.getKeySet())) {
+                   return false;
+                 }
+               }
+               return true;
+ 
+             } else {// On Server execution
+               if (functionParameter.getFunctionIds() != null && !functionParameter.getFunctionIds().contains(functionContext.getFunctionId())) {
+                 return false;
+               }
+               return true;
+             }
+ 
+           } else {
+             ExecuteFunctionOperationContext functionContext = (ExecuteFunctionOperationContext)context;
+             FunctionSecurityPrmsHolder functionParameter = operationMap.get(context.getOperationCode());
+             if (functionContext.getRegionName() != null) {
+               if (functionContext.getResult() instanceof ArrayList && functionParameter.getKeySet() != null) {
+                 ArrayList<String> resultList = (ArrayList)functionContext.getResult();
+                 Set<String> nonAllowedKeys = functionParameter.getKeySet();
+                 if (resultList.containsAll(nonAllowedKeys)) {
+                   return false;
+                 }
+               }
+               return true;
+ 
+             } else {
+               ArrayList<String> resultList = (ArrayList)functionContext.getResult();
+               final String inSecureItem = "Insecure item";
+               if (resultList.contains(inSecureItem)) {
+                 return false;
+               }
+               return true;
+             }
+           }
+         }
+       }
+     }
+     return false;
+   }
+ 
+   /**
+    * Clears the cached information for this principal.
+    */
+   @Override
+   public void close() {
+     this.allowedOps.clear();
+   }
+ 
+   /** Get the attribute value for a given attribute name of a node. */
+   private static String getAttributeValue(final Node node, final String attrName) {
+     NamedNodeMap attrMap = node.getAttributes();
+     Node attrNode;
+     if (attrMap != null && (attrNode = attrMap.getNamedItem(attrName)) != null) {
+       return ((Attr)attrNode).getValue();
+     }
+     return EMPTY_VALUE;
+   }
+ 
+   /** Get the string contained in the first text child of the node. */
+   private static String getNodeValue(final Node node) {
+     NodeList childNodes = node.getChildNodes();
+     for (int index = 0; index < childNodes.getLength(); index++) {
+       Node childNode = childNodes.item(index);
+       if (childNode.getNodeType() == Node.TEXT_NODE) {
+         return childNode.getNodeValue();
+       }
+     }
+     return EMPTY_VALUE;
+   }
+ 
+   /**
+    * Cache authorization information for all users statically. This method is
+    * not thread-safe and is should either be invoked only once, or the caller
+    * should take the appropriate locks.
+    *
+    * @param cache reference to the cache object for the distributed system
+    */
+   private static void init(final Cache cache) throws NotAuthorizedException {
+     final LogWriter systemLogWriter = cache.getLogger();
+     final String xmlDocumentUri = (String)cache.getDistributedSystem().getSecurityProperties().get(DOC_URI_PROP_NAME);
+ 
+     try {
+       if (xmlDocumentUri == null) {
+         throw new NotAuthorizedException("No ACL file defined using tag [" + DOC_URI_PROP_NAME + "] in system properties");
+       }
+       if (xmlDocumentUri.equals(XmlAuthorization.currentDocUri)) {
+         if (XmlAuthorization.xmlLoadFailure != null) {
+           throw XmlAuthorization.xmlLoadFailure;
+         }
+         return;
+       }
+ 
+       final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+       factory.setIgnoringComments(true);
+       factory.setIgnoringElementContentWhitespace(true);
+       factory.setValidating(true);
+ 
+       final DocumentBuilder builder = factory.newDocumentBuilder();
+       final XmlErrorHandler errorHandler = new XmlErrorHandler(systemLogWriter, xmlDocumentUri);
+       builder.setErrorHandler(errorHandler);
+       builder.setEntityResolver(new AuthzDtdResolver());
+ 
+       final Document xmlDocument = builder.parse(xmlDocumentUri);
+ 
+       XmlAuthorization.userRoles = new HashMap<String, HashSet<String>>();
+       XmlAuthorization.rolePermissions = new HashMap<String, Map<String, Map<OperationCode, FunctionSecurityPrmsHolder>>>();
+ 
+       final NodeList roleUserNodes = xmlDocument.getElementsByTagName(TAG_ROLE);
+ 
+       for (int roleIndex = 0; roleIndex < roleUserNodes.getLength(); roleIndex++) {
+         final Node roleUserNode = roleUserNodes.item(roleIndex);
+         final String roleName = getAttributeValue(roleUserNode, ATTR_ROLENAME);
+         final NodeList userNodes = roleUserNode.getChildNodes();
+ 
+         for (int userIndex = 0; userIndex < userNodes.getLength(); userIndex++) {
+           final Node userNode = userNodes.item(userIndex);
+ 
+           if (userNode.getNodeName() == TAG_USER) {
+             final String userName = getNodeValue(userNode);
+             HashSet<String> userRoleSet = XmlAuthorization.userRoles.get(userName);
+             if (userRoleSet == null) {
+               userRoleSet = new HashSet<String>();
+               XmlAuthorization.userRoles.put(userName, userRoleSet);
+             }
+             userRoleSet.add(roleName);
+ 
+           } else {
+             throw new SAXParseException("Unknown tag [" + userNode.getNodeName() + "] as child of tag [" + TAG_ROLE + ']', null);
+           }
+         }
+       }
+ 
+       final NodeList rolePermissionNodes = xmlDocument.getElementsByTagName(TAG_PERMS);
+ 
+       for (int permIndex = 0; permIndex < rolePermissionNodes.getLength(); permIndex++) {
+         final Node rolePermissionNode = rolePermissionNodes.item(permIndex);
+         final String roleName = getAttributeValue(rolePermissionNode, ATTR_ROLE);
+         Map<String, Map<OperationCode, FunctionSecurityPrmsHolder>> regionOperationMap = XmlAuthorization.rolePermissions.get(roleName);
+ 
+         if (regionOperationMap == null) {
+           regionOperationMap = new HashMap<String, Map<OperationCode, FunctionSecurityPrmsHolder>>();
+           XmlAuthorization.rolePermissions.put(roleName, regionOperationMap);
+         }
+ 
+         final NodeList operationNodes = rolePermissionNode.getChildNodes();
+         final HashMap<OperationCode, FunctionSecurityPrmsHolder> operationMap = new HashMap<OperationCode, FunctionSecurityPrmsHolder>();
+ 
+         for (int opIndex = 0; opIndex < operationNodes.getLength(); opIndex++) {
+           final Node operationNode = operationNodes.item(opIndex);
+ 
+           if (operationNode.getNodeName() == TAG_OP) {
+             final String operationName = getNodeValue(operationNode);
 -            final OperationCode code = OperationCode.parse(operationName);
++            final OperationCode code = OperationCode.valueOf(operationName);
+ 
+             if (code == null) {
+               throw new SAXParseException("Unknown operation [" + operationName + ']', null);
+             }
+ 
+             if (code != OperationCode.EXECUTE_FUNCTION) {
+               operationMap.put(code, null);
+ 
+             } else {
+               final String optimizeForWrite = getAttributeValue(operationNode, ATTR_FUNCTION_OPTIMIZE_FOR_WRITE);
+               final String functionAttr = getAttributeValue(operationNode, ATTR_FUNCTION_IDS);
+               final String keysAttr = getAttributeValue(operationNode, ATTR_FUNCTION_KEY_SET);
+ 
+               Boolean isOptimizeForWrite;
+               HashSet<String> functionIds;
+               HashSet<String> keySet;
+ 
+               if (optimizeForWrite == null || optimizeForWrite.length() == 0) {
+                 isOptimizeForWrite = null;
+               } else {
+                 isOptimizeForWrite = Boolean.parseBoolean(optimizeForWrite);
+               }
+ 
+               if (functionAttr == null || functionAttr.length() == 0) {
+                 functionIds = null;
+               } else {
+                 final String[] functionArray = functionAttr.split(",");
+                 functionIds = new HashSet<String>();
+                 for (int strIndex = 0; strIndex < functionArray.length; ++strIndex) {
+                   functionIds.add((functionArray[strIndex]));
+                 }
+               }
+ 
+               if (keysAttr == null || keysAttr.length() == 0) {
+                 keySet = null;
+               } else {
+                 final String[] keySetArray = keysAttr.split(",");
+                 keySet = new HashSet<String>();
+                 for (int strIndex = 0; strIndex < keySetArray.length; ++strIndex) {
+                   keySet.add((keySetArray[strIndex]));
+                 }
+               }
+ 
+               final FunctionSecurityPrmsHolder functionContext = new FunctionSecurityPrmsHolder(isOptimizeForWrite, functionIds, keySet);
+               operationMap.put(code, functionContext);
+             }
+ 
+           } else {
+             throw new SAXParseException("Unknown tag [" + operationNode.getNodeName() + "] as child of tag [" + TAG_PERMS + ']', null);
+           }
+         }
+ 
+         final String regionNames = getAttributeValue(rolePermissionNode, ATTR_REGIONS);
+         if (regionNames == null || regionNames.length() == 0) {
+           regionOperationMap.put(EMPTY_VALUE, operationMap);
+         } else {
+           final String[] regionNamesSplit = regionNames.split(",");
+           for (int strIndex = 0; strIndex < regionNamesSplit.length; ++strIndex) {
+             regionOperationMap.put(normalizeRegionName(regionNamesSplit[strIndex]), operationMap);
+           }
+         }
+       }
+       XmlAuthorization.currentDocUri = xmlDocumentUri;
+ 
+     } catch (Exception ex) {
+       String message;
+       if (ex instanceof NotAuthorizedException) {
+         message = ex.getMessage();
+       }
+       else {
+         message = ex.getClass().getName() + ": " + ex.getMessage();
+       }
+       systemLogWriter.warning("XmlAuthorization.init: " + message);
+       XmlAuthorization.xmlLoadFailure = new NotAuthorizedException(message, ex);
+       throw XmlAuthorization.xmlLoadFailure;
+     }
+   }
+ 
+   private static class AuthzDtdResolver implements EntityResolver {
+     final Pattern authzPattern = Pattern.compile("authz.*\\.dtd");
+ 
+     @Override
+     public InputSource resolveEntity(final String publicId, final String systemId) throws SAXException, IOException {
+       try {
+         final Matcher matcher = authzPattern.matcher(systemId);
+         if (matcher.find()) {
+           final String dtdName = matcher.group(0);
+           final InputStream stream = XmlAuthorization.class.getResourceAsStream(dtdName);
+           return new InputSource(stream);
+         }
+ 
+       } catch(Exception e) {
+         //do nothing, use the default resolver
+       }
+       
+       return null;
+     }
+   }
+ }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/da7a76de/geode-pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
----------------------------------------------------------------------


[34/54] [abbrv] incubator-geode git commit: GEODE-1103 intermittent suspect string in server cache during shutdown

Posted by je...@apache.org.
GEODE-1103 intermittent suspect string in server cache during shutdown

Added an exception handler for InterruptedException that checks to see
if the AcceptorImpl is shutting down.  If so a warning message about the
interrupt is not logged.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/bec420bf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/bec420bf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/bec420bf

Branch: refs/heads/feature/GEODE-17-2
Commit: bec420bf54d7c78a8a81264f41b578f529453327
Parents: 442718f
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Wed Mar 16 16:02:30 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Wed Mar 16 16:02:30 2016 -0700

----------------------------------------------------------------------
 .../gemfire/internal/cache/tier/sockets/AcceptorImpl.java   | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bec420bf/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
index 89c073f..9f18f50 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
@@ -1682,12 +1682,13 @@ public class AcceptorImpl extends Acceptor implements Runnable
         }
 
       } // synchronized
-    }
-    catch (Exception e) {/* ignore */
+    } catch (InterruptedException e) {
+      if (!this.shutdown) { // GEODE-1103: expect an interrupt during shutdown
+        logger.warn(LocalizedMessage.create(LocalizedStrings.AcceptorImpl_UNEXPECTED), e);
+      }
+    } catch (Exception e) {/* ignore */
       logger.warn(LocalizedMessage.create(LocalizedStrings.AcceptorImpl_UNEXPECTED), e);
     }
-    finally{
-    }
   }
   
   private void shutdownSCs() {


[12/54] [abbrv] incubator-geode git commit: GEODE-1078 CI failure: ClientMembershipSelectorDUnitTest.testClientMembershipEventsInServer

Posted by je...@apache.org.
GEODE-1078 CI failure: ClientMembershipSelectorDUnitTest.testClientMembershipEventsInServer

added an assertion that the distributed system hasn't changed in between
getSystem() and createRegion() calls.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c5d8ea77
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c5d8ea77
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c5d8ea77

Branch: refs/heads/feature/GEODE-17-2
Commit: c5d8ea770d56832b54fb64ade61cef956317b638
Parents: aef84eb
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Mar 14 09:33:20 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Mar 14 09:34:52 2016 -0700

----------------------------------------------------------------------
 .../cache30/ClientMembershipDUnitTest.java      | 138 ++++++++++---------
 1 file changed, 74 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c5d8ea77/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
index a8ea590..d4678ca 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
@@ -42,10 +42,12 @@ import com.gemstone.gemfire.cache.client.ClientCache;
 import com.gemstone.gemfire.cache.client.Pool;
 import com.gemstone.gemfire.cache.client.PoolManager;
 import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.DurableClientAttributes;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
 import com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection;
@@ -57,6 +59,7 @@ import com.gemstone.gemfire.management.membership.ClientMembershipListener;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
@@ -85,15 +88,20 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     super(name);
   }
 
+  @Override
   public void setUp() throws Exception {
     super.setUp();
   }
   
   @Override
-  protected final void postTearDownCacheTestCase() throws Exception {
-    InternalClientMembership.unregisterAllListeners();
+  protected void postTearDown() throws Exception {
+    Invoke.invokeInEveryVM((() -> cleanup()));
   }
-
+  
+  public static void cleanup() {
+    properties = null;
+  }
+  
   private void waitForAcceptsInProgressToBe(final int target)
     throws Exception {
     WaitCriterion ev = new WaitCriterion() {
@@ -138,7 +146,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       SerializableRunnable createMeanSocket = new CacheSerializableRunnable("Connect to server with socket") {
         public void run2() throws CacheException {
           getCache(); // create a cache so we have stats
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("connecting to cache server with socket");
+          System.out.println("connecting to cache server with socket");
           try {
             InetAddress addr = InetAddress.getByName(hostName);
             meanSocket = new Socket(addr, port);
@@ -150,7 +158,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       };
       SerializableRunnable closeMeanSocket = new CacheSerializableRunnable("close mean socket") {
         public void run2() throws CacheException {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("closing mean socket");
+          System.out.println("closing mean socket");
           try {
             meanSocket.close();
           }
@@ -161,28 +169,28 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
 
       assertEquals(0, getAcceptsInProgress());
       
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("creating mean socket");
+      System.out.println("creating mean socket");
       vm0.invoke(createMeanSocket);
       try {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting to see it connect on server");
+        System.out.println("waiting to see it connect on server");
         waitForAcceptsInProgressToBe(1);
       } finally {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("closing mean socket");
+        System.out.println("closing mean socket");
         vm0.invoke(closeMeanSocket);
       }
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting to see accept to go away on server");
+      System.out.println("waiting to see accept to go away on server");
       waitForAcceptsInProgressToBe(0);
 
       // now try it without a close. Server should timeout the mean connect
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("creating mean socket 2");
+      System.out.println("creating mean socket 2");
       vm0.invoke(createMeanSocket);
       try {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting to see it connect on server 2");
+        System.out.println("waiting to see it connect on server 2");
         waitForAcceptsInProgressToBe(1);
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("waiting to see accept to go away on server without us closing");
+        System.out.println("waiting to see accept to go away on server without us closing");
         waitForAcceptsInProgressToBe(0);
       } finally {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("closing mean socket 2");
+        System.out.println("closing mean socket 2");
         vm0.invoke(closeMeanSocket);
       }
 
@@ -749,7 +757,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     // create and register ClientMembershipListener in controller vm...
     ClientMembershipListener listener = new ClientMembershipListener() {
       public synchronized void memberJoined(ClientMembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] memberJoined: " + event);
+        System.out.println("[testClientMembershipEventsInClient] memberJoined: " + event);
         fired[JOINED] = true;
         member[JOINED] = event.getMember();
         memberId[JOINED] = event.getMemberId();
@@ -757,11 +765,11 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         notifyAll();
       }
       public synchronized void memberLeft(ClientMembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] memberLeft: " + event);
+        System.out.println("[testClientMembershipEventsInClient] memberLeft: " + event);
 //        fail("Please update testClientMembershipEventsInClient to handle memberLeft for BridgeServer.");
       }
       public synchronized void memberCrashed(ClientMembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] memberCrashed: " + event);
+        System.out.println("[testClientMembershipEventsInClient] memberCrashed: " + event);
         fired[CRASHED] = true;
         member[CRASHED] = event.getMember();
         memberId[CRASHED] = event.getMemberId();
@@ -779,7 +787,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     vm0.invoke(new CacheSerializableRunnable("Create BridgeServer") {
       public void run2() throws CacheException {
         try {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] Create BridgeServer");
+          System.out.println("[testClientMembershipEventsInClient] Create BridgeServer");
           getSystem();
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -803,9 +811,9 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
 
     String serverMemberId = serverMember.toString();
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] ports[0]=" + ports[0]);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] serverMember=" + serverMember);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] serverMemberId=" + serverMemberId);
+    System.out.println("[testClientMembershipEventsInClient] ports[0]=" + ports[0]);
+    System.out.println("[testClientMembershipEventsInClient] serverMember=" + serverMember);
+    System.out.println("[testClientMembershipEventsInClient] serverMemberId=" + serverMemberId);
 
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
@@ -821,7 +829,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     assertFalse(isClient[CRASHED]);
     
     // sanity check...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] sanity check");
+    System.out.println("[testClientMembershipEventsInClient] sanity check");
     DistributedMember test = new TestDistributedMember("test");
     InternalClientMembership.notifyJoined(test, SERVER);
     synchronized(listener) {
@@ -845,7 +853,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     resetArraysForTesting(fired, member, memberId, isClient);
     
     // create bridge client in controller vm...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] create bridge client");
+    System.out.println("[testClientMembershipEventsInClient] create bridge client");
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
@@ -868,7 +876,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] assert client detected server join");
+    System.out.println("[testClientMembershipEventsInClient] assert client detected server join");
     
     // first check the getCurrentServers() result
     ClientCache clientCache = (ClientCache)getCache();
@@ -897,7 +905,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
 
     vm0.invoke(new SerializableRunnable("Stop BridgeServer") {
       public void run() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] Stop BridgeServer");
+        System.out.println("[testClientMembershipEventsInClient] Stop BridgeServer");
         stopBridgeServers(getCache());
       }
     });
@@ -907,7 +915,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] assert client detected server departure");
+    System.out.println("[testClientMembershipEventsInClient] assert client detected server departure");
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
     assertNull(memberId[JOINED]);
@@ -928,7 +936,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     vm0.invoke(new CacheSerializableRunnable("Recreate BridgeServer") {
       public void run2() throws CacheException {
         try {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] restarting BridgeServer");
+          System.out.println("[testClientMembershipEventsInClient] restarting BridgeServer");
           startBridgeServer(ports[0]);
         }
         catch(IOException e) {
@@ -943,7 +951,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInClient] assert client detected server recovery");
+    System.out.println("[testClientMembershipEventsInClient] assert client detected server recovery");
     assertTrue(fired[JOINED]);
     assertNotNull(member[JOINED]);
     assertNotNull(memberId[JOINED]);
@@ -972,7 +980,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     // create and register ClientMembershipListener in controller vm...
     ClientMembershipListener listener = new ClientMembershipListener() {
       public synchronized void memberJoined(ClientMembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] memberJoined: " + event);
+        System.out.println("[testClientMembershipEventsInServer] memberJoined: " + event);
         fired[JOINED] = true;
         member[JOINED] = event.getMember();
         memberId[JOINED] = event.getMemberId();
@@ -981,7 +989,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         assertFalse(fired[LEFT] || fired[CRASHED]);
       }
       public synchronized void memberLeft(ClientMembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] memberLeft: " + event);
+        System.out.println("[testClientMembershipEventsInServer] memberLeft: " + event);
         fired[LEFT] = true;
         member[LEFT] = event.getMember();
         memberId[LEFT] = event.getMemberId();
@@ -990,7 +998,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         assertFalse(fired[JOINED] || fired[CRASHED]);
       }
       public synchronized void memberCrashed(ClientMembershipEvent event) {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] memberCrashed: " + event);
+        System.out.println("[testClientMembershipEventsInServer] memberCrashed: " + event);
         fired[CRASHED] = true;
         member[CRASHED] = event.getMember();
         memberId[CRASHED] = event.getMemberId();
@@ -1006,7 +1014,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     final int[] ports = new int[1];
 
     // create BridgeServer in controller vm...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] Create BridgeServer");
+    System.out.println("[testClientMembershipEventsInServer] Create BridgeServer");
     getSystem();
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
@@ -1019,9 +1027,9 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     DistributedMember serverMember = getMemberId();
     String serverMemberId = serverMember.toString();
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] ports[0]=" + ports[0]);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] serverMemberId=" + serverMemberId);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] serverMember=" + serverMember);
+    System.out.println("[testClientMembershipEventsInServer] ports[0]=" + ports[0]);
+    System.out.println("[testClientMembershipEventsInServer] serverMemberId=" + serverMemberId);
+    System.out.println("[testClientMembershipEventsInServer] serverMember=" + serverMember);
 
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
@@ -1037,7 +1045,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     assertFalse(isClient[CRASHED]);
     
     // sanity check...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] sanity check");
+    System.out.println("[testClientMembershipEventsInServer] sanity check");
     DistributedMember test = new TestDistributedMember("test");
     InternalClientMembership.notifyJoined(test, CLIENT);
     synchronized(listener) {
@@ -1063,16 +1071,17 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     SerializableCallable createConnectionPool =
     new SerializableCallable("Create connectionPool") {
       public Object call() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] create bridge client");
+        System.out.println("[testClientMembershipEventsInServer] create bridge client");
         Properties config = new Properties();
         config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
         config.setProperty(DistributionConfig.LOCATORS_NAME, "");
-        getSystem(config);
+        properties = config;
+        DistributedSystem s = getSystem(config);
         AttributesFactory factory = new AttributesFactory();
-        factory.setScope(Scope.LOCAL);
-        ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, true, -1, 2, null);
+        Pool pool = ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, true, -1, 2, null);
         createRegion(name, factory.create());
         assertNotNull(getRootRegion().getSubregion(name));
+        assertTrue(s == system); // see geode-1078
         return getMemberId();
       }
     };
@@ -1087,7 +1096,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] assert server detected client join");
+    System.out.println("[testClientMembershipEventsInServer] assert server detected client join");
     assertTrue(fired[JOINED]);
     assertEquals(member[JOINED] + " should equal " + clientMember,
       clientMember, member[JOINED]);
@@ -1108,7 +1117,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     
     vm0.invoke(new SerializableRunnable("Stop bridge client") {
       public void run() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] Stop bridge client");
+        System.out.println("[testClientMembershipEventsInServer] Stop bridge client");
         getRootRegion().getSubregion(name).close();
         Map m = PoolManager.getAll();
         Iterator mit = m.values().iterator();
@@ -1125,7 +1134,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] assert server detected client left");
+    System.out.println("[testClientMembershipEventsInServer] assert server detected client left");
     assertFalse(fired[JOINED]);
     assertNull(member[JOINED]);
     assertNull(memberId[JOINED]);
@@ -1149,7 +1158,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       }
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] assert server detected client re-join");
+    System.out.println("[testClientMembershipEventsInServer] assert server detected client re-join");
     assertTrue(fired[JOINED]);
     assertEquals(clientMember, member[JOINED]);
     assertEquals(clientMemberId, memberId[JOINED]);
@@ -1170,7 +1179,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     try {
       vm0.invoke(new SerializableRunnable("Stop bridge client") {
         public void run() {
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] Stop bridge client");
+          System.out.println("[testClientMembershipEventsInServer] Stop bridge client");
           getRootRegion().getSubregion(name).close();
           Map m = PoolManager.getAll();
           Iterator mit = m.values().iterator();
@@ -1187,7 +1196,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         }
       }
       
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testClientMembershipEventsInServer] assert server detected client crashed");
+      System.out.println("[testClientMembershipEventsInServer] assert server detected client crashed");
       assertFalse(fired[JOINED]);
       assertNull(member[JOINED]);
       assertNull(memberId[JOINED]);
@@ -1253,6 +1262,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+    properties = config;
     getSystem(config);
     
     // assert that event is fired while connected
@@ -1284,6 +1294,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     resetArraysForTesting(fired, member, memberId, isClient);
     
     // assert that event is fired again after reconnecting
+    properties = config;
     InternalDistributedSystem sys = getSystem(config);
     assertTrue(sys.isConnected());
 
@@ -1310,7 +1321,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     IgnoredException.addIgnoredException("ConnectException");
 
     // create BridgeServer in controller vm...
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients] Create BridgeServer");
+    System.out.println("[testGetConnectedClients] Create BridgeServer");
     getSystem();
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
@@ -1322,20 +1333,17 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     assertTrue(ports[0] != 0);
     String serverMemberId = getSystem().getDistributedMember().toString();
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients] ports[0]=" + ports[0]);
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients] serverMemberId=" + serverMemberId);
+    System.out.println("[testGetConnectedClients] ports[0]=" + ports[0]);
+    System.out.println("[testGetConnectedClients] serverMemberId=" + serverMemberId);
 
     final Host host = Host.getHost(0);
     SerializableCallable createPool =
     new SerializableCallable("Create connection pool") {
       public Object call() {
-        com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedClients] create bridge client");
+        System.out.println("[testGetConnectedClients] create bridge client");
         properties = new Properties();
         properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
         properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
-        // 11/30/2015 this test is periodically failing during distributedTest runs
-        // so we are setting the log-level to fine to figure out what's going on
-        properties.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
         getSystem(properties);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
@@ -1407,7 +1415,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       vm.invoke(new CacheSerializableRunnable("Create bridge server") {
         public void run2() throws CacheException {
           // create BridgeServer in controller vm...
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers] Create BridgeServer");
+          System.out.println("[testGetConnectedServers] Create BridgeServer");
           getSystem();
           AttributesFactory factory = new AttributesFactory();
           factory.setScope(Scope.LOCAL);
@@ -1426,9 +1434,9 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
           
           assertTrue(testGetConnectedServers_port != 0);
       
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers] port=" + 
+          System.out.println("[testGetConnectedServers] port=" + 
             ports[whichVM]);
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers] serverMemberId=" + 
+          System.out.println("[testGetConnectedServers] serverMemberId=" + 
             getDistributedMember());
         }
       });
@@ -1436,10 +1444,11 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       assertTrue(ports[whichVM] != 0);
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers] create bridge client");
+    System.out.println("[testGetConnectedServers] create bridge client");
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+    properties = config;
     getSystem(config);
     getCache();
     
@@ -1447,7 +1456,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     factory.setScope(Scope.LOCAL);
 
     for (int i = 0; i < ports.length; i++) {
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers] creating connectionpool for " + 
+      System.out.println("[testGetConnectedServers] creating connectionpool for " + 
         NetworkUtils.getServerHostName(host) + " " + ports[i]);
       int[] thisServerPorts = new int[] { ports[i] };
       ClientServerTestCase.configureConnectionPoolWithName(factory, NetworkUtils.getServerHostName(host), thisServerPorts, false, -1, -1, null,"pooly"+i);
@@ -1489,7 +1498,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     assertEquals(host.getVMCount(), connectedServers.size());
     for (Iterator iter = connectedServers.keySet().iterator(); iter.hasNext();) {
       String connectedServer = (String) iter.next();
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetConnectedServers]  value for connectedServer: " + 
+      System.out.println("[testGetConnectedServers]  value for connectedServer: " + 
                           connectedServers.get(connectedServer));
     }
   }
@@ -1522,7 +1531,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       vm.invoke(new CacheSerializableRunnable("Create bridge server") {
         public void run2() throws CacheException {
           // create BridgeServer in controller vm...
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients] Create BridgeServer");
+          System.out.println("[testGetNotifiedClients] Create BridgeServer");
           getSystem();
           AttributesFactory factory = new AttributesFactory();
           Region region = createRegion(name, factory.create());
@@ -1540,9 +1549,9 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
           
           assertTrue(testGetNotifiedClients_port != 0);
       
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients] port=" + 
+          System.out.println("[testGetNotifiedClients] port=" + 
             ports[whichVM]);
-          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients] serverMemberId=" + 
+          System.out.println("[testGetNotifiedClients] serverMemberId=" + 
             getMemberId());
         }
       });
@@ -1550,17 +1559,18 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       assertTrue(ports[whichVM] != 0);
     }
     
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients] create bridge client");
+    System.out.println("[testGetNotifiedClients] create bridge client");
     Properties config = new Properties();
     config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     config.setProperty(DistributionConfig.LOCATORS_NAME, "");
-    getSystem(config);
+    properties = config;
+    getSystem();
     getCache();
     
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.LOCAL);
 
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testGetNotifiedClients] creating connection pool");
+    System.out.println("[testGetNotifiedClients] creating connection pool");
     ClientServerTestCase.configureConnectionPool(factory, NetworkUtils.getServerHostName(host), ports, true, -1, -1, null);
     Region region = createRegion(name, factory.create());
     assertNotNull(getRootRegion().getSubregion(name));


[26/54] [abbrv] incubator-geode git commit: GEODE-992: Integrate with Travis CI

Posted by je...@apache.org.
GEODE-992: Integrate with Travis CI

use absolute path while cat'ing the result of rat.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/4e84f1a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/4e84f1a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/4e84f1a8

Branch: refs/heads/feature/GEODE-17-2
Commit: 4e84f1a890f244b164001cf381232b9fb06a1eb4
Parents: a904f14
Author: Swapnil Bawaskar <sb...@pivotal.io>
Authored: Wed Mar 16 10:17:36 2016 -0700
Committer: Swapnil Bawaskar <sb...@pivotal.io>
Committed: Wed Mar 16 10:18:46 2016 -0700

----------------------------------------------------------------------
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e84f1a8/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 49197cd..c532f20 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,7 +27,7 @@ cache:
     - $HOME/.gradle/wrapper/
 
 after_failure:
-  - cat build/reports/rat/rat-report.txt
+  - cat /home/travis/build/apache/incubator-geode/build/reports/rat/rat-report.txt
 
 notifications:
   email:


[51/54] [abbrv] incubator-geode git commit: GEODE-1111: Fix apache headers in files added by commit for GEODE-1111

Posted by je...@apache.org.
GEODE-1111: Fix apache headers in files added by commit for GEODE-1111


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ff55590a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ff55590a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ff55590a

Branch: refs/heads/feature/GEODE-17-2
Commit: ff55590ab4e4dad1b48f58c436816d6987e7d777
Parents: 4ed2fd3
Author: Kirk Lund <kl...@apache.org>
Authored: Thu Mar 17 17:00:11 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Thu Mar 17 17:01:04 2016 -0700

----------------------------------------------------------------------
 .../cache/ConnectionPoolAutoDUnitTest.java      | 21 ++++++++++++++------
 .../gemfire/cache/ConnectionPoolDUnitTest.java  | 21 ++++++++++++++------
 2 files changed, 30 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff55590a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java
index ad110d7..bf5a22c 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAutoDUnitTest.java
@@ -1,9 +1,18 @@
-/*=========================================================================
- * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * one or more patents listed at http://www.pivotal.io/patents.
- *=========================================================================
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package com.gemstone.gemfire.cache;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff55590a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java
index 41d48aa..e09a4c9 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java
@@ -1,9 +1,18 @@
-/*=========================================================================
- * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * one or more patents listed at http://www.pivotal.io/patents.
- *=========================================================================
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 package com.gemstone.gemfire.cache;
 


[42/54] [abbrv] incubator-geode git commit: GEODE-949: refactor and repackage security test code

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/templates/authz6_0.dtd
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/templates/authz6_0.dtd b/geode-core/src/test/resources/com/gemstone/gemfire/security/templates/authz6_0.dtd
new file mode 100755
index 0000000..a77563a
--- /dev/null
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/security/templates/authz6_0.dtd
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
+
+This is the XML DTD for the GemFire sample XML based authorization callback
+in com.gemstone.gemfire.security.templates.XmlAuthorization.
+
+All XMLs must include a DOCTYPE of the following form:
+
+  <!DOCTYPE acl PUBLIC
+    "-//GemStone Systems, Inc.//GemFire XML Authorization 1.0//EN"
+    "http://www.gemstone.com/dtd/authz5_5.dtd">
+
+The contents of a declarative XML file correspond to APIs found in the
+
+                      com.gemstone.gemfire.security.AccessControl
+
+package. The sample implementation may be used to specify access control
+policies.
+
+-->
+
+<!--
+
+The following conventions apply to all GemFire sample authorization
+XML file elements unless indicated otherwise.
+
+- In elements that contain PCDATA, leading and trailing whitespace in
+  the data may be ignored.
+
+- In elements whose value is an "enumerated type", the value is case
+  sensitive.
+
+-->
+
+
+<!--
+The "acl" element is the root element of the authorization file.
+This element contains the role to user mappings and role to permissions
+mapping on a per region per operation basis.
+-->
+
+<!ELEMENT acl (role+,permission+)>
+
+<!--
+The "role" element contains the set of users that have the permissions of
+given role. A user can be present in more than one "role" elements in
+which case the union of the permissions to all those roles determines
+the full set of permissions to be given to the user.
+-->
+
+<!ELEMENT role (user*)>
+<!ATTLIST role
+  name CDATA #REQUIRED
+>
+
+<!--
+The "user" element is contained within the "role" element and contains
+the name of a user having the permissions of that role.
+-->
+
+<!ELEMENT user (#PCDATA)>
+
+<!--
+The "permission" element specifies the list of operations that are allowed
+for a particular role in the given regions as provided in the optional
+"regions" attribute. The value of "regions" attribute should be a comma
+separated list of region names for which permissions are to be provided.
+If no "regions" attribute is provided then those permissions are provided
+for all the other regions (i.e. other than those that have been explicitly
+specified). Permissions for cache level operations REGION_DESTROY,
+REGION_CREATE, QUERY and CQ operations should be specified with no "regions"
+attribute. If cache-level permission is not provided for QUERY or CQ operations
+then the permission for all the region names in the query string is checked.
+-->
+
+<!ELEMENT permission (operation*)>
+<!ATTLIST permission
+  role CDATA #REQUIRED
+  regions CDATA #IMPLIED
+>
+
+
+<!--
+The operation should be one of the following strings:
+ GET, PUT, PUTALL, DESTROY, REGISTER_INTEREST, UNREGISTER_INTEREST,
+ CONTAINS_KEY, KEY_SET, QUERY, EXECUTE_CQ, STOP_CQ, CLOSE_CQ, REGION_CLEAR,
+ REGION_CREATE, REGION_DESTROY
+-->
+<!ELEMENT operation (#PCDATA)>
+<!ATTLIST operation
+  functionIds CDATA #IMPLIED
+  optimizeForWrite CDATA #IMPLIED
+  keySet CDATA #IMPLIED
+>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/authz-dummy.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/authz-dummy.xml b/geode-core/src/test/resources/lib/authz-dummy.xml
deleted file mode 100644
index 7f73808..0000000
--- a/geode-core/src/test/resources/lib/authz-dummy.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<!DOCTYPE acl PUBLIC "-//GemStone Systems, Inc.//GemFire XML Authorization 1.0//EN"
-              "authz6_0.dtd" >
-<acl>
-
-  <role name="reader">
-    <user>reader0</user>
-    <user>reader1</user>
-    <user>reader2</user>
-    <user>root</user>
-    <user>admin</user>
-    <user>administrator</user>
-  </role>
-
-  <role name="writer">
-    <user>writer0</user>
-    <user>writer1</user>
-    <user>writer2</user>
-    <user>root</user>
-    <user>admin</user>
-    <user>administrator</user>
-  </role>
-
-  <role name="cacheOps">
-    <user>root</user>
-    <user>admin</user>
-    <user>administrator</user>
-  </role>
-
-  <role name="queryRegions">
-    <user>reader3</user>
-    <user>reader4</user>
-  </role>
-
-  <role name="registerInterest">
-    <user>reader5</user>
-    <user>reader6</user>
-  </role>
-
-  <role name="unregisterInterest">
-    <user>reader5</user>
-    <user>reader7</user>
-  </role>
-  
-  <role name="onRegionFunctionExecutor">
-    <user>reader8</user>
-  </role>
-  
-  <role name="onServerFunctionExecutor">
-    <user>reader9</user>
-  </role>
-
-  <permission role="cacheOps">
-    <operation>QUERY</operation>
-    <operation>EXECUTE_CQ</operation>
-    <operation>STOP_CQ</operation>
-    <operation>CLOSE_CQ</operation>
-    <operation>REGION_CREATE</operation>
-    <operation>REGION_DESTROY</operation>
-  </permission>
-
-  <permission role="reader">
-    <operation>GET</operation>
-    <operation>REGISTER_INTEREST</operation>
-    <operation>UNREGISTER_INTEREST</operation>
-    <operation>KEY_SET</operation>
-    <operation>CONTAINS_KEY</operation>
-    <operation>EXECUTE_FUNCTION</operation>
-  </permission>
-
-  <permission role="writer">
-    <operation>PUT</operation>
-    <operation>PUTALL</operation>
-    <operation>DESTROY</operation>
-    <operation>INVALIDATE</operation>
-    <operation>REGION_CLEAR</operation>
-  </permission>
-
-  <permission role="queryRegions" regions="//Portfolios,/Positions/,AuthRegion">
-    <operation>QUERY</operation>
-    <operation>EXECUTE_CQ</operation>
-    <operation>STOP_CQ</operation>
-    <operation>CLOSE_CQ</operation>
-  </permission>
-  
-  <permission role="onRegionFunctionExecutor" regions="secureRegion,Positions">
-    <operation>PUT</operation>
-    <operation functionIds="SecureFunction,OptimizationFunction" optimizeForWrite="false" keySet="KEY-0,KEY-1">EXECUTE_FUNCTION</operation>
-  </permission>
-  
-  <permission role="onServerFunctionExecutor" >
-    <operation>PUT</operation>
-    <operation functionIds="SecureFunction,OptimizationFunction">EXECUTE_FUNCTION</operation>
-  </permission>
-
-  <permission role="registerInterest">
-    <operation>REGISTER_INTEREST</operation>
-    <operation>GET</operation>
-  </permission>
-
-  <permission role="unregisterInterest">
-    <operation>UNREGISTER_INTEREST</operation>
-    <operation>GET</operation>
-  </permission>
-
-</acl>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/authz-ldap.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/authz-ldap.xml b/geode-core/src/test/resources/lib/authz-ldap.xml
deleted file mode 100644
index e63c23b..0000000
--- a/geode-core/src/test/resources/lib/authz-ldap.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<!DOCTYPE acl PUBLIC "-//GemStone Systems, Inc.//GemFire XML Authorization 1.0//EN"
-              "authz5_5.dtd" >
-<acl>
-
-  <role name="reader">
-    <user>gemfire1</user>
-    <user>gemfire2</user>
-    <user>gemfire3</user>
-    <user>gemfire4</user>
-    <user>gemfire5</user>
-  </role>
-
-  <role name="writer">
-    <user>gemfire1</user>
-    <user>gemfire2</user>
-    <user>gemfire6</user>
-    <user>gemfire7</user>
-    <user>gemfire8</user>
-  </role>
-
-  <role name="cacheOps">
-    <user>gemfire1</user>
-    <user>gemfire2</user>
-  </role>
-
-  <role name="queryRegions">
-    <user>gemfire9</user>
-    <user>gemfire10</user>
-  </role>
-
-  <permission role="cacheOps">
-    <operation>QUERY</operation>
-    <operation>EXECUTE_CQ</operation>
-    <operation>STOP_CQ</operation>
-    <operation>CLOSE_CQ</operation>
-    <operation>REGION_CREATE</operation>
-    <operation>REGION_DESTROY</operation>
-  </permission>
-
-  <permission role="reader">
-    <operation>GET</operation>
-    <operation>REGISTER_INTEREST</operation>
-    <operation>UNREGISTER_INTEREST</operation>
-    <operation>KEY_SET</operation>
-    <operation>CONTAINS_KEY</operation>
-    <operation>EXECUTE_FUNCTION</operation>
-  </permission>
-
-  <permission role="writer">
-    <operation>PUT</operation>
-    <operation>PUTALL</operation>
-    <operation>DESTROY</operation>
-    <operation>INVALIDATE</operation>
-    <operation>REGION_CLEAR</operation>
-  </permission>
-
-  <permission role="queryRegions" regions="Portfolios,/Positions//,/AuthRegion">
-    <operation>QUERY</operation>
-    <operation>EXECUTE_CQ</operation>
-    <operation>STOP_CQ</operation>
-    <operation>CLOSE_CQ</operation>
-  </permission>
-
-</acl>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/authz-multiUser-dummy.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/authz-multiUser-dummy.xml b/geode-core/src/test/resources/lib/authz-multiUser-dummy.xml
deleted file mode 100644
index 0f3bbab..0000000
--- a/geode-core/src/test/resources/lib/authz-multiUser-dummy.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<!DOCTYPE acl PUBLIC "-//GemStone Systems, Inc.//GemFire XML Authorization 1.0//EN"
-              "authz6_0.dtd" >
-<acl>
-
-  <role name="reader">
-    <user>user1</user>
-    <user>user2</user>
-    <user>root</user>
-    <user>admin</user>
-    <user>administrator</user>
-  </role>
-
-  <role name="writer">
-    <user>user3</user>
-    <user>user4</user>
-    <user>root</user>
-    <user>admin</user>
-    <user>administrator</user>
-  </role>
-  
-  <role name="cacheOps">
-    <user>user1</user>
-    <user>user2</user>
-    <user>root</user>
-    <user>admin</user>
-    <user>administrator</user>
-  </role>
-
-  <role name="queryRegions">
-    <user>user5</user>
-    <user>user6</user>
-  </role>
-
-  <role name="registerInterest">
-    <user>user7</user>
-    <user>user8</user>
-  </role>
-
-  <role name="unregisterInterest">
-    <user>user5</user>
-    <user>user7</user>
-  </role>
-  
-  <permission role="cacheOps">
-    <operation>QUERY</operation>
-    <operation>EXECUTE_CQ</operation>
-    <operation>STOP_CQ</operation>
-    <operation>CLOSE_CQ</operation>
-  </permission>
-
-  <permission role="reader">
-    <operation>GET</operation>
-    <operation>REGISTER_INTEREST</operation>
-    <operation>UNREGISTER_INTEREST</operation>
-    <operation>KEY_SET</operation>
-    <operation>CONTAINS_KEY</operation>
-    <operation>EXECUTE_FUNCTION</operation>
-  </permission>
-
-  <permission role="writer">
-    <operation>PUT</operation>
-    <operation>PUTALL</operation>
-    <operation>DESTROY</operation>
-    <operation>INVALIDATE</operation>
-    <operation>REGION_CLEAR</operation>
-  </permission>
-
-  <permission role="queryRegions" regions="//Portfolios,/Positions/,AuthRegion">
-    <operation>QUERY</operation>
-    <operation>EXECUTE_CQ</operation>
-    <operation>STOP_CQ</operation>
-    <operation>CLOSE_CQ</operation>
-  </permission>
-  
-  <permission role="registerInterest">
-    <operation>REGISTER_INTEREST</operation>
-    <operation>GET</operation>
-  </permission>
-
-  <permission role="unregisterInterest">
-    <operation>UNREGISTER_INTEREST</operation>
-    <operation>GET</operation>
-  </permission>
-
-</acl>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/authz-multiUser-ldap.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/authz-multiUser-ldap.xml b/geode-core/src/test/resources/lib/authz-multiUser-ldap.xml
deleted file mode 100644
index a8e5392..0000000
--- a/geode-core/src/test/resources/lib/authz-multiUser-ldap.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<!DOCTYPE acl PUBLIC "-//GemStone Systems, Inc.//GemFire XML Authorization 1.0//EN"
-              "authz5_5.dtd" >
-<acl>
-
-  <role name="reader">
-    <user>gemfire1</user>
-    <user>gemfire2</user>
-    <user>gemfire3</user>
-    <user>gemfire4</user>
-    <user>gemfire5</user>
-  </role>
-
-  <role name="writer">
-    <user>gemfire1</user>
-    <user>gemfire2</user>
-    <user>gemfire6</user>
-    <user>gemfire7</user>
-    <user>gemfire8</user>
-  </role>
-
-  <role name="cacheOps">
-    <user>gemfire1</user>
-    <user>gemfire2</user>
-  </role>
-
-  <role name="queryRegions">
-    <user>gemfire9</user>
-    <user>gemfire10</user>
-  </role>
-
-  <permission role="cacheOps">
-    <operation>QUERY</operation>
-    <operation>EXECUTE_CQ</operation>
-    <operation>STOP_CQ</operation>
-    <operation>CLOSE_CQ</operation>
-  </permission>
-
-  <permission role="reader">
-    <operation>GET</operation>
-    <operation>REGISTER_INTEREST</operation>
-    <operation>UNREGISTER_INTEREST</operation>
-    <operation>KEY_SET</operation>
-    <operation>CONTAINS_KEY</operation>
-    <operation>EXECUTE_FUNCTION</operation>
-  </permission>
-
-  <permission role="writer">
-    <operation>PUT</operation>
-    <operation>PUTALL</operation>
-    <operation>DESTROY</operation>
-    <operation>INVALIDATE</operation>
-    <operation>REGION_CLEAR</operation>
-  </permission>
-
-  <permission role="queryRegions" regions="Portfolios,/Positions//,/AuthRegion">
-    <operation>QUERY</operation>
-    <operation>EXECUTE_CQ</operation>
-    <operation>STOP_CQ</operation>
-    <operation>CLOSE_CQ</operation>
-  </permission>
-
-</acl>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/gemfire1.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/gemfire1.keystore b/geode-core/src/test/resources/lib/keys/gemfire1.keystore
deleted file mode 100644
index 15270bb..0000000
Binary files a/geode-core/src/test/resources/lib/keys/gemfire1.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/gemfire10.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/gemfire10.keystore b/geode-core/src/test/resources/lib/keys/gemfire10.keystore
deleted file mode 100644
index bb6f827..0000000
Binary files a/geode-core/src/test/resources/lib/keys/gemfire10.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/gemfire11.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/gemfire11.keystore b/geode-core/src/test/resources/lib/keys/gemfire11.keystore
deleted file mode 100644
index 6839c74..0000000
Binary files a/geode-core/src/test/resources/lib/keys/gemfire11.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/gemfire2.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/gemfire2.keystore b/geode-core/src/test/resources/lib/keys/gemfire2.keystore
deleted file mode 100644
index fcb7ab8..0000000
Binary files a/geode-core/src/test/resources/lib/keys/gemfire2.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/gemfire3.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/gemfire3.keystore b/geode-core/src/test/resources/lib/keys/gemfire3.keystore
deleted file mode 100644
index 19afc4b..0000000
Binary files a/geode-core/src/test/resources/lib/keys/gemfire3.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/gemfire4.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/gemfire4.keystore b/geode-core/src/test/resources/lib/keys/gemfire4.keystore
deleted file mode 100644
index c65916a..0000000
Binary files a/geode-core/src/test/resources/lib/keys/gemfire4.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/gemfire5.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/gemfire5.keystore b/geode-core/src/test/resources/lib/keys/gemfire5.keystore
deleted file mode 100644
index d738cca..0000000
Binary files a/geode-core/src/test/resources/lib/keys/gemfire5.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/gemfire6.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/gemfire6.keystore b/geode-core/src/test/resources/lib/keys/gemfire6.keystore
deleted file mode 100644
index 1fea2d3..0000000
Binary files a/geode-core/src/test/resources/lib/keys/gemfire6.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/gemfire7.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/gemfire7.keystore b/geode-core/src/test/resources/lib/keys/gemfire7.keystore
deleted file mode 100644
index 7a3187c..0000000
Binary files a/geode-core/src/test/resources/lib/keys/gemfire7.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/gemfire8.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/gemfire8.keystore b/geode-core/src/test/resources/lib/keys/gemfire8.keystore
deleted file mode 100644
index a3bb886..0000000
Binary files a/geode-core/src/test/resources/lib/keys/gemfire8.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/gemfire9.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/gemfire9.keystore b/geode-core/src/test/resources/lib/keys/gemfire9.keystore
deleted file mode 100644
index 674b4e6..0000000
Binary files a/geode-core/src/test/resources/lib/keys/gemfire9.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/ibm/gemfire1.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/ibm/gemfire1.keystore b/geode-core/src/test/resources/lib/keys/ibm/gemfire1.keystore
deleted file mode 100644
index 4f9120c..0000000
Binary files a/geode-core/src/test/resources/lib/keys/ibm/gemfire1.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/ibm/gemfire10.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/ibm/gemfire10.keystore b/geode-core/src/test/resources/lib/keys/ibm/gemfire10.keystore
deleted file mode 100644
index 0bd97d7..0000000
Binary files a/geode-core/src/test/resources/lib/keys/ibm/gemfire10.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/ibm/gemfire11.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/ibm/gemfire11.keystore b/geode-core/src/test/resources/lib/keys/ibm/gemfire11.keystore
deleted file mode 100644
index 62ae3c7..0000000
Binary files a/geode-core/src/test/resources/lib/keys/ibm/gemfire11.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/ibm/gemfire2.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/ibm/gemfire2.keystore b/geode-core/src/test/resources/lib/keys/ibm/gemfire2.keystore
deleted file mode 100644
index c65bc81..0000000
Binary files a/geode-core/src/test/resources/lib/keys/ibm/gemfire2.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/ibm/gemfire3.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/ibm/gemfire3.keystore b/geode-core/src/test/resources/lib/keys/ibm/gemfire3.keystore
deleted file mode 100644
index b0796e0..0000000
Binary files a/geode-core/src/test/resources/lib/keys/ibm/gemfire3.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/ibm/gemfire4.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/ibm/gemfire4.keystore b/geode-core/src/test/resources/lib/keys/ibm/gemfire4.keystore
deleted file mode 100644
index 9c94018..0000000
Binary files a/geode-core/src/test/resources/lib/keys/ibm/gemfire4.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/ibm/gemfire5.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/ibm/gemfire5.keystore b/geode-core/src/test/resources/lib/keys/ibm/gemfire5.keystore
deleted file mode 100644
index 33f6937..0000000
Binary files a/geode-core/src/test/resources/lib/keys/ibm/gemfire5.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/ibm/gemfire6.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/ibm/gemfire6.keystore b/geode-core/src/test/resources/lib/keys/ibm/gemfire6.keystore
deleted file mode 100644
index 568f674..0000000
Binary files a/geode-core/src/test/resources/lib/keys/ibm/gemfire6.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/ibm/gemfire7.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/ibm/gemfire7.keystore b/geode-core/src/test/resources/lib/keys/ibm/gemfire7.keystore
deleted file mode 100644
index 80e2d80..0000000
Binary files a/geode-core/src/test/resources/lib/keys/ibm/gemfire7.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/ibm/gemfire8.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/ibm/gemfire8.keystore b/geode-core/src/test/resources/lib/keys/ibm/gemfire8.keystore
deleted file mode 100644
index a15def5..0000000
Binary files a/geode-core/src/test/resources/lib/keys/ibm/gemfire8.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/ibm/gemfire9.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/ibm/gemfire9.keystore b/geode-core/src/test/resources/lib/keys/ibm/gemfire9.keystore
deleted file mode 100644
index 72087f3..0000000
Binary files a/geode-core/src/test/resources/lib/keys/ibm/gemfire9.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/ibm/publickeyfile
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/ibm/publickeyfile b/geode-core/src/test/resources/lib/keys/ibm/publickeyfile
deleted file mode 100644
index 1b13872..0000000
Binary files a/geode-core/src/test/resources/lib/keys/ibm/publickeyfile and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/lib/keys/publickeyfile
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/lib/keys/publickeyfile b/geode-core/src/test/resources/lib/keys/publickeyfile
deleted file mode 100644
index 9c2daa3..0000000
Binary files a/geode-core/src/test/resources/lib/keys/publickeyfile and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/templates/security/authz5_5.dtd
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/templates/security/authz5_5.dtd b/geode-core/src/test/resources/templates/security/authz5_5.dtd
deleted file mode 100644
index 81a8150..0000000
--- a/geode-core/src/test/resources/templates/security/authz5_5.dtd
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<!--
-
-This is the XML DTD for the GemFire sample XML based authorization callback
-in templates.security.XmlAuthorization.
-
-All XMLs must include a DOCTYPE of the following form:
-
-  <!DOCTYPE acl PUBLIC
-    "-//GemStone Systems, Inc.//GemFire XML Authorization 1.0//EN"
-    "http://www.gemstone.com/dtd/authz5_5.dtd">
-
-The contents of a declarative XML file correspond to APIs found in the
-
-                      com.gemstone.gemfire.security.AccessControl
-
-package. The sample implementation may be used to specify access control
-policies.
-
--->
-
-<!--
-
-The following conventions apply to all GemFire sample authorization
-XML file elements unless indicated otherwise.
-
-- In elements that contain PCDATA, leading and trailing whitespace in
-  the data may be ignored.
-
-- In elements whose value is an "enumerated type", the value is case
-  sensitive.
-
--->
-
-
-<!--
-The "acl" element is the root element of the authorization file.
-This element contains the role to user mappings and role to permissions
-mapping on a per region per operation basis.
--->
-
-<!ELEMENT acl (role+,permission+)>
-
-<!--
-The "role" element contains the set of users that have the permissions of
-given role. A user can be present in more than one "role" elements in
-which case the union of the permissions to all those roles determines
-the full set of permissions to be given to the user.
--->
-
-<!ELEMENT role (user*)>
-<!ATTLIST role
-  name CDATA #REQUIRED
->
-
-<!--
-The "user" element is contained within the "role" element and contains
-the name of a user having the permissions of that role.
--->
-
-<!ELEMENT user (#PCDATA)>
-
-<!--
-The "permission" element specifies the list of operations that are allowed
-for a particular role in the given regions as provided in the optional
-"regions" attribute. The value of "regions" attribute should be a comma
-separated list of region names for which permissions are to be provided.
-If no "regions" attribute is provided then those permissions are provided
-for all the other regions (i.e. other than those that have been explicitly
-specified). Permissions for cache level operations REGION_DESTROY,
-REGION_CREATE, QUERY and CQ operations should be specified with no "regions"
-attribute. If cache-level permission is not provided for QUERY or CQ operations
-then the permission for all the region names in the query string is checked.
--->
-
-<!ELEMENT permission (operation*)>
-<!ATTLIST permission
-  role CDATA #REQUIRED
-  regions CDATA #IMPLIED
->
-
-
-<!--
-The operation should be one of the following strings:
- GET, PUT, PUTALL, DESTROY, REGISTER_INTEREST, UNREGISTER_INTEREST,
- CONTAINS_KEY, KEY_SET, QUERY, EXECUTE_CQ, STOP_CQ, CLOSE_CQ, REGION_CLEAR,
- REGION_CREATE, REGION_DESTROY
--->
-<!ELEMENT operation (#PCDATA)>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/templates/security/authz6_0.dtd
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/templates/security/authz6_0.dtd b/geode-core/src/test/resources/templates/security/authz6_0.dtd
deleted file mode 100755
index 06cceff..0000000
--- a/geode-core/src/test/resources/templates/security/authz6_0.dtd
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<!--
-
-This is the XML DTD for the GemFire sample XML based authorization callback
-in templates.security.XmlAuthorization.
-
-All XMLs must include a DOCTYPE of the following form:
-
-  <!DOCTYPE acl PUBLIC
-    "-//GemStone Systems, Inc.//GemFire XML Authorization 1.0//EN"
-    "http://www.gemstone.com/dtd/authz5_5.dtd">
-
-The contents of a declarative XML file correspond to APIs found in the
-
-                      com.gemstone.gemfire.security.AccessControl
-
-package. The sample implementation may be used to specify access control
-policies.
-
--->
-
-<!--
-
-The following conventions apply to all GemFire sample authorization
-XML file elements unless indicated otherwise.
-
-- In elements that contain PCDATA, leading and trailing whitespace in
-  the data may be ignored.
-
-- In elements whose value is an "enumerated type", the value is case
-  sensitive.
-
--->
-
-
-<!--
-The "acl" element is the root element of the authorization file.
-This element contains the role to user mappings and role to permissions
-mapping on a per region per operation basis.
--->
-
-<!ELEMENT acl (role+,permission+)>
-
-<!--
-The "role" element contains the set of users that have the permissions of
-given role. A user can be present in more than one "role" elements in
-which case the union of the permissions to all those roles determines
-the full set of permissions to be given to the user.
--->
-
-<!ELEMENT role (user*)>
-<!ATTLIST role
-  name CDATA #REQUIRED
->
-
-<!--
-The "user" element is contained within the "role" element and contains
-the name of a user having the permissions of that role.
--->
-
-<!ELEMENT user (#PCDATA)>
-
-<!--
-The "permission" element specifies the list of operations that are allowed
-for a particular role in the given regions as provided in the optional
-"regions" attribute. The value of "regions" attribute should be a comma
-separated list of region names for which permissions are to be provided.
-If no "regions" attribute is provided then those permissions are provided
-for all the other regions (i.e. other than those that have been explicitly
-specified). Permissions for cache level operations REGION_DESTROY,
-REGION_CREATE, QUERY and CQ operations should be specified with no "regions"
-attribute. If cache-level permission is not provided for QUERY or CQ operations
-then the permission for all the region names in the query string is checked.
--->
-
-<!ELEMENT permission (operation*)>
-<!ATTLIST permission
-  role CDATA #REQUIRED
-  regions CDATA #IMPLIED
->
-
-
-<!--
-The operation should be one of the following strings:
- GET, PUT, PUTALL, DESTROY, REGISTER_INTEREST, UNREGISTER_INTEREST,
- CONTAINS_KEY, KEY_SET, QUERY, EXECUTE_CQ, STOP_CQ, CLOSE_CQ, REGION_CLEAR,
- REGION_CREATE, REGION_DESTROY
--->
-<!ELEMENT operation (#PCDATA)>
-<!ATTLIST operation
-  functionIds CDATA #IMPLIED
-  optimizeForWrite CDATA #IMPLIED
-  keySet CDATA #IMPLIED
->

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
index 344c977..efc8f48 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
@@ -21,10 +21,12 @@ import java.util.List;
 import java.util.Properties;
 import java.util.Random;
 
-import security.CredentialGenerator;
-import security.DummyAuthzCredentialGenerator;
-import security.DummyCredentialGenerator;
-import templates.security.UserPasswordAuthInit;
+import com.gemstone.gemfire.internal.security.FilterPostAuthorization;
+import com.gemstone.gemfire.internal.security.FilterPreAuthorization;
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
+import com.gemstone.gemfire.security.generator.DummyAuthzCredentialGenerator;
+import com.gemstone.gemfire.security.generator.DummyCredentialGenerator;
+import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
 
 import com.gemstone.gemfire.DataSerializable;
 import com.gemstone.gemfire.Instantiator;
@@ -62,11 +64,9 @@ public class ClientAuthzObjectModDUnitTest extends ClientAuthorizationTestBase {
     super(name);
   }
 
-  private static final String preAccessor = "com.gemstone.gemfire.internal."
-      + "security.FilterPreAuthorization.create";
+  private static final String preAccessor = FilterPreAuthorization.class.getName() + ".create";
 
-  private static final String postAccessor = "com.gemstone.gemfire.internal."
-      + "security.FilterPostAuthorization.create";
+  private static final String postAccessor = FilterPostAuthorization.class.getName() + ".create";
 
   private static class TestPostCredentialGenerator implements
       TestCredentialGenerator {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java
index 0cb125f..138b90b 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientCQPostAuthorizationDUnitTest.java
@@ -22,9 +22,6 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Random;
 
-import security.AuthzCredentialGenerator;
-import security.CredentialGenerator;
-
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
 import com.gemstone.gemfire.cache.query.CqAttributes;
@@ -42,6 +39,8 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
+import com.gemstone.gemfire.security.generator.AuthzCredentialGenerator;
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java
index 62bff2b..6cef09a 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientPostAuthorizationDUnitTest.java
@@ -22,10 +22,10 @@ import java.util.List;
 import java.util.Properties;
 import java.util.Random;
 
-import security.AuthzCredentialGenerator;
-import security.CredentialGenerator;
 import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
 import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.security.generator.AuthzCredentialGenerator;
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java
index 7161830..8693217 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserAPIDUnitTest.java
@@ -16,6 +16,8 @@
  */
 package com.gemstone.gemfire.security;
 
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
+import com.gemstone.gemfire.security.generator.DummyCredentialGenerator;
 import hydra.Log;
 
 import java.io.IOException;
@@ -24,8 +26,6 @@ import java.util.Properties;
 import javax.net.ssl.SSLException;
 import javax.net.ssl.SSLHandshakeException;
 
-import security.CredentialGenerator;
-
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.client.Pool;
 import com.gemstone.gemfire.cache.execute.FunctionService;
@@ -41,8 +41,6 @@ import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
-import security.DummyCredentialGenerator;
-
 public class MultiuserAPIDUnitTest extends ClientAuthorizationTestBase {
 
   /** constructor */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java
index 9f9d4c0..6c641d0 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiuserDurableCQAuthzDUnitTest.java
@@ -21,9 +21,6 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Random;
 
-import security.AuthzCredentialGenerator;
-import security.CredentialGenerator;
-
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
 import com.gemstone.gemfire.cache.query.CqAttributes;
@@ -38,6 +35,8 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
+import com.gemstone.gemfire.security.generator.AuthzCredentialGenerator;
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
@@ -140,7 +139,7 @@ public class MultiuserDurableCQAuthzDUnitTest extends
   }
 
   private void doTest(Integer numOfUsers, Integer numOfPuts,
-      Boolean[] postAuthzAllowed, AuthzCredentialGenerator gen, Boolean keepAlive)
+                      Boolean[] postAuthzAllowed, AuthzCredentialGenerator gen, Boolean keepAlive)
       throws Exception {
     CredentialGenerator cGen = gen.getCredentialGenerator();
     Properties extraAuthProps = cGen.getSystemProperties();



[23/54] [abbrv] incubator-geode git commit: GEODE-640 CI failure: CacheXml80DUnitTest.testCacheServerDisableTcpNoDelay

Posted by je...@apache.org.
GEODE-640 CI failure: CacheXml80DUnitTest.testCacheServerDisableTcpNoDelay

Use TCP port 0, so that an available port will be automatically assigned.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f7ca6346
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f7ca6346
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f7ca6346

Branch: refs/heads/feature/GEODE-17-2
Commit: f7ca6346dc21aa2359ee5f5a2e2c97705e611e72
Parents: 44c388e
Author: Jianxia Chen <jc...@pivotal.io>
Authored: Tue Mar 15 16:09:11 2016 -0700
Committer: Jianxia Chen <jc...@pivotal.io>
Committed: Tue Mar 15 16:09:11 2016 -0700

----------------------------------------------------------------------
 .../test/java/com/gemstone/gemfire/cache30/CacheXml80DUnitTest.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f7ca6346/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml80DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml80DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml80DUnitTest.java
index 155fb78..346c58a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml80DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml80DUnitTest.java
@@ -183,6 +183,7 @@ public class CacheXml80DUnitTest extends CacheXml70DUnitTest {
     CacheCreation cache = new CacheCreation();
 
     CacheServer cs = cache.addCacheServer();
+    cs.setPort(0);
     cs.setTcpNoDelay(false);
     RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
     attrs.setDataPolicy(DataPolicy.NORMAL);


[47/54] [abbrv] incubator-geode git commit: GEODE-982: Fix javadoc issue introduced in fix for GEODE-982

Posted by je...@apache.org.
GEODE-982: Fix javadoc issue introduced in fix for GEODE-982


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/aed5e5f6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/aed5e5f6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/aed5e5f6

Branch: refs/heads/feature/GEODE-17-2
Commit: aed5e5f6c1bd1f59c1c6323616b45af31d3f748c
Parents: 8de59df
Author: Kirk Lund <kl...@apache.org>
Authored: Thu Mar 17 14:38:16 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Thu Mar 17 14:38:16 2016 -0700

----------------------------------------------------------------------
 .../main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java  | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/aed5e5f6/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java
index 08101c2..55df7a5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEntry.java
@@ -31,6 +31,7 @@ import com.gemstone.gemfire.internal.cache.lru.NewLRUClockHand;
 import com.gemstone.gemfire.internal.cache.versions.VersionSource;
 import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
+import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;


[48/54] [abbrv] incubator-geode git commit: GEODE-857: Wait for watchdog threads to start in SystemFailureJUnitTest

Posted by je...@apache.org.
GEODE-857: Wait for watchdog threads to start in SystemFailureJUnitTest

I can't reproduce this failure, but maybe it's possible the isAlive flag
is not set immediately on all platforms. So we'll have the test wait for
the threads to be alive, rather than assert.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ac3d3b4c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ac3d3b4c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ac3d3b4c

Branch: refs/heads/feature/GEODE-17-2
Commit: ac3d3b4c5294bbb64a54fef191584c6d4306de04
Parents: aed5e5f
Author: Dan Smith <up...@apache.org>
Authored: Thu Mar 17 14:23:05 2016 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Thu Mar 17 14:44:54 2016 -0700

----------------------------------------------------------------------
 .../test/java/com/gemstone/gemfire/SystemFailureJUnitTest.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ac3d3b4c/geode-core/src/test/java/com/gemstone/gemfire/SystemFailureJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/SystemFailureJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/SystemFailureJUnitTest.java
index e33eba4..c5efaf0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/SystemFailureJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/SystemFailureJUnitTest.java
@@ -26,6 +26,7 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.jayway.awaitility.Awaitility;
 
 @Category(UnitTest.class)
 public class SystemFailureJUnitTest {
@@ -48,8 +49,8 @@ public class SystemFailureJUnitTest {
     long start = System.nanoTime();
     Thread watchDog = SystemFailure.getWatchDogForTest();
     Thread proctor= SystemFailure.getProctorForTest();
-    assertTrue(watchDog.isAlive());
-    assertTrue(proctor.isAlive());
+    Awaitility.await().atMost(30, TimeUnit.SECONDS).until(() -> watchDog.isAlive());
+    Awaitility.await().atMost(30, TimeUnit.SECONDS).until(() -> proctor.isAlive());
     SystemFailure.stopThreads();
     long elapsed = System.nanoTime() - start;
     assertTrue("Waited too long to shutdown: " + elapsed, elapsed < TimeUnit.MILLISECONDS.toNanos(LONG_WAIT));


[04/54] [abbrv] incubator-geode git commit: GEODE-573: Fix broken image links in javadocs

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/region-implementation.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/region-implementation.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/region-implementation.fig
deleted file mode 100644
index 62a20b2..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/region-implementation.fig
+++ /dev/null
@@ -1,262 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 3150 2250 4500 2550
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3150 2250 4500 2250 4500 2550 3150 2550 3150 2250
-4 0 0 50 -1 2 12 0.0000 4 180 1215 3225 2475 AbstractRegion\001
--6
-6 3225 3225 4350 3525
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3225 3225 4350 3225 4350 3525 3225 3525 3225 3225
-4 0 0 50 -1 2 12 0.0000 4 180 960 3300 3450 LocalRegion\001
--6
-6 4950 3225 6525 3525
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4950 3225 6525 3225 6525 3525 4950 3525 4950 3225
-4 0 0 50 -1 2 12 0.0000 4 180 1470 5025 3450 SharedRegionData\001
--6
-6 3375 1275 4050 1575
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3375 1275 4050 1275 4050 1575 3375 1575 3375 1275
-4 0 0 50 -1 1 12 0.0000 4 180 495 3450 1500 Region\001
--6
-6 1800 1275 3075 1575
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1800 1275 3075 1275 3075 1575 1800 1575 1800 1275
-4 0 0 50 -1 1 12 0.0000 4 180 1185 1875 1500 RegionAttributes\001
--6
-6 4350 1275 5775 1575
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4350 1275 5775 1275 5775 1575 4350 1575 4350 1275
-4 0 0 50 -1 1 12 0.0000 4 135 1275 4425 1500 AttributesMutator\001
--6
-6 3000 3975 4575 4275
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3000 3975 4575 3975 4575 4275 3000 4275 3000 3975
-4 0 0 50 -1 2 12 0.0000 4 180 1425 3075 4200 DistributedRegion\001
--6
-6 375 4275 2325 4575
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 375 4275 2325 4275 2325 4575 375 4575 375 4275
-4 0 0 50 -1 2 12 0.0000 4 135 1815 450 4500 DistributedLockService\001
--6
-6 150 3750 2325 4050
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 150 3750 2325 3750 2325 4050 150 4050 150 3750
-4 0 0 50 -1 2 12 0.0000 4 135 2040 225 3975 CacheDistributionAdvisor\001
--6
-6 7875 7050 8850 7350
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7875 7050 8850 7050 8850 7350 7875 7350 7875 7050
-4 0 0 50 -1 2 12 0.0000 4 180 840 7950 7275 StatsEntry\001
--6
-6 8475 6150 9450 6450
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8475 6150 9450 6150 9450 6450 8475 6450 8475 6150
-4 0 0 50 -1 2 12 0.0000 4 180 825 8550 6375 ThinEntry\001
--6
-6 9225 7050 10575 7350
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9225 7050 10575 7050 10575 7350 9225 7350 9225 7050
-4 0 0 50 -1 2 12 0.0000 4 180 1215 9300 7275 ThinLRUEntry\001
--6
-6 8025 5325 9450 5625
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8025 5325 9450 5325 9450 5625 8025 5625 8025 5325
-4 0 0 50 -1 1 12 0.0000 4 180 1275 8100 5550 EntriesMap.Entry\001
--6
-6 9825 5325 11100 5625
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9825 5325 11100 5325 11100 5625 9825 5625 9825 5325
-4 0 0 50 -1 1 12 0.0000 4 135 1125 9900 5550 LRUClockNode\001
--6
-6 10200 6150 11100 6450
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 10200 6150 11100 6150 11100 6450 10200 6450 10200 6150
-4 0 0 50 -1 1 12 0.0000 4 180 735 10275 6375 LRUEntry\001
--6
-6 7875 7875 9225 8175
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7875 7875 9225 7875 9225 8175 7875 8175 7875 7875
-4 0 0 50 -1 2 12 0.0000 4 180 1230 7950 8100 StatsLRUEntry\001
--6
-6 5025 5325 6000 5625
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5025 5325 6000 5325 6000 5625 5025 5625 5025 5325
-4 0 0 50 -1 1 12 0.0000 4 180 840 5100 5550 EntriesMap\001
--6
-6 4050 4650 5325 4950
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4050 4650 5325 4650 5325 4950 4050 4950 4050 4650
-4 0 0 50 -1 1 12 0.0000 4 180 1155 4125 4875 ConcurrentMap\001
--6
-6 3450 6150 5250 6450
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3450 6150 5250 6150 5250 6450 3450 6450 3450 6150
-4 0 0 50 -1 2 12 0.0000 4 180 1680 3510 6375 UnsharedEntriesMap\001
--6
-6 2625 5325 4425 5625
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2625 5325 4425 5325 4425 5625 2625 5625 2625 5325
-4 0 0 50 -1 2 12 0.0000 4 180 1665 2700 5550 ConcurrentHashMap\001
--6
-6 1275 5325 2100 5625
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1275 5325 2100 5325 2100 5625 1275 5625 1275 5325
-4 0 0 50 -1 2 12 0.0000 4 180 660 1350 5550 Segment\001
--6
-6 5625 6150 7200 6450
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5625 6150 7200 6150 7200 6450 5625 6450 5625 6150
-4 0 0 50 -1 2 12 0.0000 4 180 1470 5678 6375 SharedEntriesMap\001
--6
-6 4575 6825 6075 7125
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4575 6825 6075 6825 6075 7125 4575 7125 4575 6825
-4 0 0 50 -1 1 12 0.0000 4 180 1380 4650 7050 LRUMapCallbacks\001
--6
-6 3150 7875 5325 8175
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3150 7875 5325 7875 5325 8175 3150 8175 3150 7875
-4 0 0 50 -1 2 12 0.0000 4 180 2070 3203 8100 UnsharedLRUEntriesMap\001
--6
-6 1200 7875 2400 8175
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1200 7875 2400 7875 2400 8175 1200 8175 1200 7875
-4 0 0 50 -1 2 12 0.0000 4 180 1050 1275 8100 LRUSegment\001
--6
-6 5700 7875 7650 8175
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5700 7875 7650 7875 7650 8175 5700 8175 5700 7875
-4 0 0 50 -1 2 12 0.0000 4 180 1860 5745 8100 SharedLRUEntriesMap\001
--6
-6 9000 1500 10950 2475
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9075 1575 10875 1575 10875 2400 9075 2400 9075 1575
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9000 1500 10950 1500 10950 2475 9000 2475 9000 1500
-4 1 0 50 -1 0 12 0.0000 4 180 1665 9975 1800 GemFire Cache Region\001
-4 1 0 50 -1 0 12 0.0000 6 165 1440 9975 2280 Revision: 1.2\001
-4 1 0 50 -1 0 12 0.0000 4 180 1680 9975 2040 Implementation Classes\001
--6
-6 9525 7875 11250 8175
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9525 7875 11250 7875 11250 8175 9525 8175 9525 7875
-4 0 0 50 -1 2 12 0.0000 4 180 1575 9600 8100 DiskThinLRUEntry\001
--6
-6 3000 8625 5550 8925
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3000 8625 5550 8625 5550 8925 3000 8925 3000 8625
-4 0 0 50 -1 2 12 0.0000 4 180 2430 3075 8850 DiskUnsharedLRUEntriesMap\001
--6
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 3750 2250 3750 1575
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 3750 3225 3750 2550
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
-	 3225 3375 2700 3375 2700 2400 3150 2400
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 4
-	1 0 1.00 120.00 120.00
-	1 0 1.00 120.00 120.00
-	 2400 1575 2400 1875 5025 1875 5025 1575
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 3750 3975 3750 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
-	 2325 3900 2625 3900 2625 4425 2325 4425
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2625 4125 3000 4125
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4350 3450 4950 3450
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 5
-	0 0 1.00 60.00 120.00
-	 4350 3300 4575 3300 4575 3000 4200 3000 4200 3225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 5
-	0 0 1.00 60.00 120.00
-	 6525 3375 6825 3375 6825 2925 6300 2925 6300 3225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3
-	 4125 3525 4125 3825 5775 3825
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 5775 3525 5775 5325
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 8925 6150 8925 5625
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
-	 8325 7050 8325 6750 9600 6750 9600 7050
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 8925 6750 8925 6450
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 10425 7050 10425 6450
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 10575 6150 10575 5625
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 5
-	0 0 1.00 60.00 120.00
-	 11100 5475 11325 5475 11325 5025 10875 5025 10875 5325
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
-	1 0 1.00 120.00 120.00
-	 8325 7350 8325 7875
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
-	 10425 6825 10950 6825 10950 7575 8850 7575 8850 7875
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 4
-	 4575 6150 4575 5925 6300 5925 6300 6150
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 5475 5925 5475 5625
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6000 5475 8025 5475
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 4
-	1 0 1.00 120.00 120.00
-	 5325 5325 5325 5175 4800 5175 4800 4950
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 4200 5325 4200 4950
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 1650 7875 1650 5625
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2100 5475 2625 5475
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 3750 6150 3750 5625
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3150 8025 2400 8025
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 3750 7875 3750 6450
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 6825 7875 6825 6450
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 4
-	 4425 7875 4425 7575 6150 7575 6150 7875
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 5325 7575 5325 7125
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 10200 7875 10200 7350
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 4125 8625 4125 8175
-4 0 0 50 -1 0 12 0.0000 4 75 90 3000 2400 *\001
-4 0 0 50 -1 0 12 0.0000 4 180 780 1875 2850 subregions\001
-4 0 0 50 -1 0 12 0.0000 4 165 435 6600 2850 parent\001
-4 0 0 50 -1 0 12 0.0000 4 165 435 4425 2925 parent\001
-4 0 0 50 -1 0 12 0.0000 4 135 465 5850 4350 entries\001
-4 0 0 50 -1 0 12 0.0000 4 135 1050 11400 5325 nextLRUNode\001
-4 0 0 50 -1 0 12 0.0000 4 75 90 2175 5475 *\001
-4 0 0 50 -1 0 12 0.0000 4 75 90 7875 5475 *\001
-4 0 0 50 -1 0 12 0.0000 4 75 90 2475 8025 *\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/package.html
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/package.html b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/package.html
index cdef772..bd8713e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/package.html
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/package.html
@@ -85,7 +85,7 @@ buckets to be accessed without delay.  The below diagram demonstrates
 bucket splitting with extensible hashing.</P>
 
 <P align="center">
-<IMG src="doc-files/extensible-hashing.gif" width="641" width="292">
+<IMG src="{@docRoot}/javadoc-images/extensible-hashing.gif" width="641" width="292">
 </P>
 
 <P>A <code>BucketInfo</code> contains metadata about a bucket (most
@@ -97,7 +97,7 @@ a number of <code>Bucket</code>s that hold the values for keys that
 match the bucket's mask as shown in the below diagram.</P>
 
 <P align="center">
-<IMG src="doc-files/partitioned-regions.gif" width="592" height="483">
+<IMG src="{@docRoot}/javadoc-images/partitioned-regions.gif" width="592" height="483">
 </P>
 
 <P>The total size (in bytes) of a bucket is maintained as key/value
@@ -134,7 +134,7 @@ target the primary and are passed on to the backups from the primary.</P>
 state transitions of the <code>BucketAdvisor</code>:</P>
 
 <P align="center">
-<IMG src="doc-files/BucketAdvisor-state.png" width="640" height="372">
+<IMG src="{@docRoot}/javadoc-images/BucketAdvisor-state.png" width="640" height="372">
 </P>
 
 <H3>Partitioned Region Cache Listeners</H3>
@@ -234,7 +234,7 @@ that multiple copies of a bucket are not hosted by the same member.
 <H1>System Properties</H1>
 
 All of the system properties used by GemFire are discussed
-<a href="doc-files/properties.html">here</a>.
+<a href="properties.html">here</a>.
 
 </BODY>
 


[10/54] [abbrv] incubator-geode git commit: GEODE-1084 strip copyright from jgroups configuration before parsing

Posted by je...@apache.org.
GEODE-1084 strip copyright from jgroups configuration before parsing

Remove the copyright comment from jgroups configuration string prior
to adding settings and creating the JChannel.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/7971a774
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/7971a774
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/7971a774

Branch: refs/heads/feature/GEODE-17-2
Commit: 7971a774b31a547cf4418bb6955f9a3bb1dc37ef
Parents: dc9e28a
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Mar 14 09:26:49 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Mar 14 09:34:50 2016 -0700

----------------------------------------------------------------------
 .../internal/membership/gms/messenger/JGroupsMessenger.java     | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7971a774/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index 75db969..d95d8df 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -197,6 +197,11 @@ public class JGroupsMessenger implements Messenger {
       throw new GemFireConfigException(LocalizedStrings.GroupMembershipService_AN_EXCEPTION_WAS_THROWN_WHILE_READING_JGROUPS_CONFIG.toLocalizedString(), ex);
     }
     
+    if (properties.startsWith("<!--")) {
+      int commentEnd = properties.indexOf("-->");
+      properties = properties.substring(commentEnd+3);
+    }
+    
     
     if (transport.isMcastEnabled()) {
       properties = replaceStrings(properties, "MCAST_PORT", String.valueOf(transport.getMcastId().getPort()));


[29/54] [abbrv] incubator-geode git commit: GEODE-1101: rename SimpleMemoryAllocator to MemoryAllocator

Posted by je...@apache.org.
GEODE-1101: rename SimpleMemoryAllocator to MemoryAllocator


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/82faa8af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/82faa8af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/82faa8af

Branch: refs/heads/feature/GEODE-17-2
Commit: 82faa8affc7517776418d84c21df9304ebf988de
Parents: 4e84f1a
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Tue Mar 15 11:39:30 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed Mar 16 11:05:37 2016 -0700

----------------------------------------------------------------------
 .../internal/cache/AbstractRegionEntry.java     |  22 +-
 .../gemfire/internal/cache/UpdateOperation.java |   2 +-
 .../tier/sockets/ClientUpdateMessageImpl.java   |   2 +-
 .../cache/wan/GatewaySenderEventImpl.java       |  10 -
 .../gemfire/internal/offheap/Fragment.java      |   2 +-
 .../internal/offheap/FreeListManager.java       |   8 +-
 .../internal/offheap/LifecycleListener.java     |  20 +-
 .../internal/offheap/MemoryAllocatorImpl.java   | 507 ++++++++++++++++
 .../internal/offheap/MemoryBlockNode.java       |   4 +-
 .../internal/offheap/OffHeapStorage.java        |   2 +-
 .../internal/offheap/OffHeapStoredObject.java   |  26 +-
 .../OffHeapStoredObjectAddressStack.java        |   4 +-
 .../internal/offheap/RefCountChangeInfo.java    |   2 +-
 .../internal/offheap/ReferenceCountHelper.java  |   4 +-
 .../offheap/SimpleMemoryAllocatorImpl.java      | 507 ----------------
 .../gemfire/cache30/MultiVMRegionTestCase.java  |  22 +-
 .../cache/ClientServerGetAllDUnitTest.java      |   4 +-
 .../gemfire/internal/cache/OffHeapTestUtil.java |   6 +-
 .../cache/OffHeapValueWrapperJUnitTest.java     |   8 +-
 .../cache/OldValueImporterTestBase.java         |  26 +-
 .../internal/offheap/FreeListManagerTest.java   |   6 +-
 .../offheap/LifecycleListenerJUnitTest.java     |  36 +-
 ...moryAllocatorFillPatternIntegrationTest.java | 246 ++++++++
 .../MemoryAllocatorFillPatternJUnitTest.java    | 183 ++++++
 .../offheap/MemoryAllocatorJUnitTest.java       | 594 +++++++++++++++++++
 .../offheap/MemoryBlockNodeJUnitTest.java       |   6 +-
 .../offheap/OffHeapHelperJUnitTest.java         |   4 +-
 .../internal/offheap/OffHeapIndexJUnitTest.java |   2 +-
 .../internal/offheap/OffHeapRegionBase.java     |   4 +-
 .../OffHeapRegionEntryHelperJUnitTest.java      |   4 +-
 .../offheap/OffHeapStorageJUnitTest.java        |   6 +-
 ...ffHeapStoredObjectAddressStackJUnitTest.java |  40 +-
 .../offheap/OffHeapStoredObjectJUnitTest.java   |   4 +-
 .../offheap/OffHeapValidationJUnitTest.java     |   2 +-
 .../OffHeapWriteObjectAsByteArrayJUnitTest.java |   8 +-
 .../offheap/OutOfOffHeapMemoryDUnitTest.java    |   2 +-
 ...moryAllocatorFillPatternIntegrationTest.java | 246 --------
 ...mpleMemoryAllocatorFillPatternJUnitTest.java | 183 ------
 .../offheap/SimpleMemoryAllocatorJUnitTest.java | 594 -------------------
 .../offheap/TinyMemoryBlockJUnitTest.java       |   8 +-
 .../TxReleasesOffHeapOnCloseJUnitTest.java      |   2 +-
 .../OffHeapByteBufferByteSourceJUnitTest.java   |   4 +-
 .../gemfire/pdx/OffHeapByteSourceJUnitTest.java |   8 +-
 43 files changed, 1676 insertions(+), 1704 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
index a103e96..90d36d1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
@@ -64,7 +64,7 @@ import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
 import com.gemstone.gemfire.internal.offheap.MemoryAllocator;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
 import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
@@ -1084,24 +1084,6 @@ public abstract class AbstractRegionEntry implements RegionEntry,
       }
       return basicEquals(deserializedObj, cd.getDeserializedForReading());
       }
-//      boolean result = Arrays.equals((byte[])cdVal, serializedObj);
-//      if (!result) {
-//        try {
-//          Object o1 = BlobHelper.deserializeBlob((byte[])cdVal);
-//          Object o2 = BlobHelper.deserializeBlob(serializedObj);
-//          SimpleMemoryAllocatorImpl.debugLog("checkCDEquals o1=<" + o1 + "> o2=<" + o2 + ">", false);
-//          if (o1.equals(o2)) {
-//            SimpleMemoryAllocatorImpl.debugLog("they are equal! a1=<" + Arrays.toString((byte[])cdVal) + "> a2=<" + Arrays.toString(serializedObj) + ">", false);
-//          }
-//        } catch (IOException e) {
-//          // TODO Auto-generated catch block
-//          e.printStackTrace();
-//        } catch (ClassNotFoundException e) {
-//          // TODO Auto-generated catch block
-//          e.printStackTrace();
-//        }
-//      }
-//      return result;
     } else {
       // prefer object form
       if (obj instanceof CachedDeserializable) {
@@ -1337,7 +1319,7 @@ public abstract class AbstractRegionEntry implements RegionEntry,
         byte[] compressedData = compressBytes(r, data);
         boolean isCompressed = compressedData != data;
         ReferenceCountHelper.setReferenceCountOwner(this);
-        MemoryAllocator ma = SimpleMemoryAllocatorImpl.getAllocator(); // fix for bug 47875
+        MemoryAllocator ma = MemoryAllocatorImpl.getAllocator(); // fix for bug 47875
         val = ma.allocateAndInitialize(compressedData, isSerialized, isCompressed, data);
         ReferenceCountHelper.setReferenceCountOwner(null);
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java
index d26f50c..acdec28 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/UpdateOperation.java
@@ -43,7 +43,7 @@ import com.gemstone.gemfire.internal.cache.EntryEventImpl.SerializedCacheValueIm
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
 import com.gemstone.gemfire.internal.util.BlobHelper;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientUpdateMessageImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientUpdateMessageImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientUpdateMessageImpl.java
index 97d9a3d..6d1508f 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientUpdateMessageImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientUpdateMessageImpl.java
@@ -56,7 +56,7 @@ import com.gemstone.gemfire.internal.cache.lru.Sizeable;
 import com.gemstone.gemfire.internal.cache.tier.MessageType;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 
 /**
  * Class <code>ClientUpdateMessageImpl</code> is a message representing a cache

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
index b64a654..d8922f8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
@@ -571,16 +571,6 @@ public class GatewaySenderEventImpl implements
   }
 
   /**
-   * This method is meant for internal use by the SimpleMemoryAllocatorImpl.
-   * Others should use getRawValue instead.
-   * @return if the result is an off-heap reference then callers must use it before this event is released.
-   */
-  @Unretained(OffHeapIdentifier.GATEWAY_SENDER_EVENT_IMPL_VALUE)
-  public Object getValueObject() {
-    return this.valueObj;
-  }
-
-  /**
    * Return this event's deserialized value
    * 
    * @return this event's deserialized value

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
index d36a71c..0ea6cf8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
@@ -38,7 +38,7 @@ public class Fragment implements MemoryBlock {
   private static AtomicIntegerFieldUpdater<Fragment> freeIdxUpdater = AtomicIntegerFieldUpdater.newUpdater(Fragment.class, "freeIdx");
   
   public Fragment(long addr, int size) {
-    SimpleMemoryAllocatorImpl.validateAddress(addr);
+    MemoryAllocatorImpl.validateAddress(addr);
     this.baseAddr = addr;
     this.size = size;
     freeIdxUpdater.set(this, 0);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
index 05010ab..c943a7e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
@@ -35,7 +35,7 @@ import com.gemstone.gemfire.OutOfOffHeapMemoryException;
 import com.gemstone.gemfire.internal.logging.LogService;
 
 /**
- * Manages the free lists for a SimpleMemoryAllocatorImpl
+ * Manages the free lists and slabs for a MemoryAllocator
  */
 public class FreeListManager {
   static final Logger logger = LogService.getLogger();
@@ -127,9 +127,9 @@ public class FreeListManager {
    */
   private final AtomicInteger lastFragmentAllocation = new AtomicInteger(0);
   private final CopyOnWriteArrayList<Fragment> fragmentList;
-  private final SimpleMemoryAllocatorImpl ma;
+  private final MemoryAllocatorImpl ma;
 
-  public FreeListManager(SimpleMemoryAllocatorImpl ma, final Slab[] slabs) {
+  public FreeListManager(MemoryAllocatorImpl ma, final Slab[] slabs) {
     this.ma = ma;
     this.slabs = slabs;
     long total = 0;
@@ -762,7 +762,7 @@ public class FreeListManager {
   
   private List<MemoryBlock> getTinyFreeBlocks() {
     final List<MemoryBlock> value = new ArrayList<MemoryBlock>();
-    final SimpleMemoryAllocatorImpl sma = this.ma;
+    final MemoryAllocatorImpl sma = this.ma;
     for (int i = 0; i < this.tinyFreeLists.length(); i++) {
       if (this.tinyFreeLists.get(i) == null) continue;
       long addr = this.tinyFreeLists.get(i).getTopAddress();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/LifecycleListener.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/LifecycleListener.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/LifecycleListener.java
index 613b12a..4a80057 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/LifecycleListener.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/LifecycleListener.java
@@ -22,23 +22,23 @@ import java.util.concurrent.CopyOnWriteArrayList;
 
 /**
  * Used by tests to get notifications about the lifecycle of a 
- * SimpleMemoryAllocatorImpl.
+ * MemoryAllocatorImpl.
  * 
  * @author Kirk Lund
  */
 public interface LifecycleListener {
 
   /**
-   * Callback is invoked after creating a new SimpleMemoryAllocatorImpl. 
+   * Callback is invoked after creating a new MemoryAllocatorImpl. 
    * 
    * Create occurs during the first initialization of an 
    * InternalDistributedSystem within the JVM.
    * 
    * @param allocator the instance that has just been created
    */
-  public void afterCreate(SimpleMemoryAllocatorImpl allocator);
+  public void afterCreate(MemoryAllocatorImpl allocator);
   /**
-   * Callback is invoked after reopening an existing SimpleMemoryAllocatorImpl 
+   * Callback is invoked after reopening an existing MemoryAllocatorImpl 
    * for reuse. 
    * 
    * Reuse occurs during any intialization of an 
@@ -47,30 +47,30 @@ public interface LifecycleListener {
    * 
    * @param allocator the instance that has just been reopened for reuse
    */
-  public void afterReuse(SimpleMemoryAllocatorImpl allocator);
+  public void afterReuse(MemoryAllocatorImpl allocator);
   /**
-   * Callback is invoked before closing the SimpleMemoryAllocatorImpl
+   * Callback is invoked before closing the MemoryAllocatorImpl
    * 
    * Close occurs after the InternalDistributedSystem and DistributionManager 
    * have completely disconnected. 
    * 
    * @param allocator the instance that is about to be closed
    */
-  public void beforeClose(SimpleMemoryAllocatorImpl allocator);
+  public void beforeClose(MemoryAllocatorImpl allocator);
   
-  static  void invokeBeforeClose(SimpleMemoryAllocatorImpl allocator) {
+  static  void invokeBeforeClose(MemoryAllocatorImpl allocator) {
     for (Iterator<LifecycleListener> iter = lifecycleListeners.iterator(); iter.hasNext();) {
       LifecycleListener listener = iter.next();
       listener.beforeClose(allocator);
     }
   }
-  static void invokeAfterReuse(SimpleMemoryAllocatorImpl allocator) {
+  static void invokeAfterReuse(MemoryAllocatorImpl allocator) {
     for (Iterator<LifecycleListener> iter = lifecycleListeners.iterator(); iter.hasNext();) {
       LifecycleListener listener = iter.next();
       listener.afterReuse(allocator);
     }
   }
-  static void invokeAfterCreate(SimpleMemoryAllocatorImpl allocator) {
+  static void invokeAfterCreate(MemoryAllocatorImpl allocator) {
     for (Iterator<LifecycleListener> iter = lifecycleListeners.iterator(); iter.hasNext();) {
       LifecycleListener listener = iter.next();
       listener.afterCreate(allocator);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java
new file mode 100644
index 0000000..2050dd4
--- /dev/null
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java
@@ -0,0 +1,507 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.logging.log4j.Logger;
+
+import com.gemstone.gemfire.cache.CacheClosedException;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionService;
+import com.gemstone.gemfire.internal.cache.BucketRegion;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
+import com.gemstone.gemfire.internal.cache.RegionEntry;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier;
+import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
+
+/**
+ * This allocator is somewhat like an Arena allocator.
+ * We start out with an array of multiple large chunks of memory.
+ * We also keep lists of any chunk that have been allocated and freed.
+ * An allocation will always try to find a chunk in a free list that is a close fit to the requested size.
+ * If no close fits exist then it allocates the next slice from the front of one the original large chunks.
+ * If we can not find enough free memory then all the existing free memory is compacted.
+ * If we still do not have enough to make the allocation an exception is thrown.
+ * 
+ * @author darrel
+ * @author Kirk Lund
+ * @since 9.0
+ */
+public class MemoryAllocatorImpl implements MemoryAllocator {
+
+  static final Logger logger = LogService.getLogger();
+  
+  public static final String FREE_OFF_HEAP_MEMORY_PROPERTY = "gemfire.free-off-heap-memory";
+  
+  private volatile OffHeapMemoryStats stats;
+  
+  private volatile OutOfOffHeapMemoryListener ooohml;
+  
+  OutOfOffHeapMemoryListener getOutOfOffHeapMemoryListener() {
+    return this.ooohml;
+  }
+
+  public final FreeListManager freeList;
+
+  private MemoryInspector memoryInspector;
+
+  private volatile MemoryUsageListener[] memoryUsageListeners = new MemoryUsageListener[0];
+  
+  private static MemoryAllocatorImpl singleton = null;
+  
+  public static MemoryAllocatorImpl getAllocator() {
+    MemoryAllocatorImpl result = singleton;
+    if (result == null) {
+      throw new CacheClosedException("Off Heap memory allocator does not exist.");
+    }
+    return result;
+  }
+
+  private static final boolean DO_EXPENSIVE_VALIDATION = Boolean.getBoolean("gemfire.OFF_HEAP_DO_EXPENSIVE_VALIDATION");
+  
+  public static MemoryAllocator create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, int slabCount, 
+      long offHeapMemorySize, long maxSlabSize) {
+    return create(ooohml, stats, slabCount, offHeapMemorySize, maxSlabSize, null,
+        new SlabFactory() {
+      @Override
+      public Slab create(int size) {
+        return new SlabImpl(size);
+      }
+    });
+  }
+
+  private static MemoryAllocatorImpl create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, int slabCount, 
+      long offHeapMemorySize, long maxSlabSize, Slab[] slabs, 
+      SlabFactory slabFactory) {
+    MemoryAllocatorImpl result = singleton;
+    boolean created = false;
+    try {
+    if (result != null) {
+      result.reuse(ooohml, stats, offHeapMemorySize, slabs);
+      logger.info("Reusing {}  bytes of off-heap memory. The maximum size of a single off-heap object is {}  bytes.", result.getTotalMemory(), result.freeList.getLargestSlabSize());
+      created = true;
+      LifecycleListener.invokeAfterReuse(result);
+    } else {
+      if (slabs == null) {
+        // allocate memory chunks
+        logger.info("Allocating {} bytes of off-heap memory. The maximum size of a single off-heap object is {} bytes.", offHeapMemorySize, maxSlabSize);
+        slabs = new SlabImpl[slabCount];
+        long uncreatedMemory = offHeapMemorySize;
+        for (int i=0; i < slabCount; i++) {
+          try {
+            if (uncreatedMemory >= maxSlabSize) {
+              slabs[i] = slabFactory.create((int) maxSlabSize);
+              uncreatedMemory -= maxSlabSize;
+            } else {
+              // the last slab can be smaller then maxSlabSize
+              slabs[i] = slabFactory.create((int) uncreatedMemory);
+            }
+          } catch (OutOfMemoryError err) {
+            if (i > 0) {
+              logger.error("Off-heap memory creation failed after successfully allocating {} bytes of off-heap memory.", (i*maxSlabSize));
+            }
+            for (int j=0; j < i; j++) {
+              if (slabs[j] != null) {
+                slabs[j].free();
+              }
+            }
+            throw err;
+          }
+        }
+      }
+
+      result = new MemoryAllocatorImpl(ooohml, stats, slabs);
+      singleton = result;
+      LifecycleListener.invokeAfterCreate(result);
+      created = true;
+    }
+    } finally {
+      if (!created) {
+        if (stats != null) {
+          stats.close();
+        }
+        if (ooohml != null) {
+          ooohml.close();
+        }
+      }
+    }
+    return result;
+  }
+  static MemoryAllocatorImpl createForUnitTest(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, int slabCount, 
+      long offHeapMemorySize, long maxSlabSize, SlabFactory memChunkFactory) {
+    return create(ooohml, stats, slabCount, offHeapMemorySize, maxSlabSize, null, 
+        memChunkFactory);
+  }
+  public static MemoryAllocatorImpl createForUnitTest(OutOfOffHeapMemoryListener oooml, OffHeapMemoryStats stats, Slab[] slabs) {
+    int slabCount = 0;
+    long offHeapMemorySize = 0;
+    long maxSlabSize = 0;
+    if (slabs != null) {
+      slabCount = slabs.length;
+      for (int i=0; i < slabCount; i++) {
+        int slabSize = slabs[i].getSize();
+        offHeapMemorySize += slabSize;
+        if (slabSize > maxSlabSize) {
+          maxSlabSize = slabSize;
+        }
+      }
+    }
+    return create(oooml, stats, slabCount, offHeapMemorySize, maxSlabSize, slabs, null);
+  }
+  
+  
+  private void reuse(OutOfOffHeapMemoryListener oooml, OffHeapMemoryStats newStats, long offHeapMemorySize, Slab[] slabs) {
+    if (isClosed()) {
+      throw new IllegalStateException("Can not reuse a closed off-heap memory manager.");
+    }
+    if (oooml == null) {
+      throw new IllegalArgumentException("OutOfOffHeapMemoryListener is null");
+    }
+    if (getTotalMemory() != offHeapMemorySize) {
+      logger.warn("Using {} bytes of existing off-heap memory instead of the requested {}.", getTotalMemory(), offHeapMemorySize);
+    }
+    if (!this.freeList.okToReuse(slabs)) {
+      throw new IllegalStateException("attempted to reuse existing off-heap memory even though new off-heap memory was allocated");
+    }
+    this.ooohml = oooml;
+    newStats.initialize(this.stats);
+    this.stats = newStats;
+  }
+
+  private MemoryAllocatorImpl(final OutOfOffHeapMemoryListener oooml, final OffHeapMemoryStats stats, final Slab[] slabs) {
+    if (oooml == null) {
+      throw new IllegalArgumentException("OutOfOffHeapMemoryListener is null");
+    }
+    
+    this.ooohml = oooml;
+    this.stats = stats;
+
+    this.stats.setFragments(slabs.length);
+    this.stats.setLargestFragment(slabs[0].getSize());
+    
+    this.freeList = new FreeListManager(this, slabs);
+    this.memoryInspector = new MemoryInspectorImpl(this.freeList);
+
+    this.stats.incMaxMemory(this.freeList.getTotalMemory());
+    this.stats.incFreeMemory(this.freeList.getTotalMemory());
+  }
+  
+  public List<OffHeapStoredObject> getLostChunks() {
+    List<OffHeapStoredObject> liveChunks = this.freeList.getLiveChunks();
+    List<OffHeapStoredObject> regionChunks = getRegionLiveChunks();
+    Set<OffHeapStoredObject> liveChunksSet = new HashSet<>(liveChunks);
+    Set<OffHeapStoredObject> regionChunksSet = new HashSet<>(regionChunks);
+    liveChunksSet.removeAll(regionChunksSet);
+    return new ArrayList<OffHeapStoredObject>(liveChunksSet);
+  }
+  
+  /**
+   * Returns a possibly empty list that contains all the Chunks used by regions.
+   */
+  private List<OffHeapStoredObject> getRegionLiveChunks() {
+    ArrayList<OffHeapStoredObject> result = new ArrayList<OffHeapStoredObject>();
+    RegionService gfc = GemFireCacheImpl.getInstance();
+    if (gfc != null) {
+      Iterator<Region<?,?>> rootIt = gfc.rootRegions().iterator();
+      while (rootIt.hasNext()) {
+        Region<?,?> rr = rootIt.next();
+        getRegionLiveChunks(rr, result);
+        Iterator<Region<?,?>> srIt = rr.subregions(true).iterator();
+        while (srIt.hasNext()) {
+          getRegionLiveChunks(srIt.next(), result);
+        }
+      }
+    }
+    return result;
+  }
+
+  private void getRegionLiveChunks(Region<?,?> r, List<OffHeapStoredObject> result) {
+    if (r.getAttributes().getOffHeap()) {
+
+      if (r instanceof PartitionedRegion) {
+        PartitionedRegionDataStore prs = ((PartitionedRegion) r).getDataStore();
+        if (prs != null) {
+          Set<BucketRegion> brs = prs.getAllLocalBucketRegions();
+          if (brs != null) {
+            for (BucketRegion br : brs) {
+              if (br != null && !br.isDestroyed()) {
+                this.basicGetRegionLiveChunks(br, result);
+              }
+
+            }
+          }
+        }
+      } else {
+        this.basicGetRegionLiveChunks((LocalRegion) r, result);
+      }
+
+    }
+
+  }
+  
+  private void basicGetRegionLiveChunks(LocalRegion r, List<OffHeapStoredObject> result) {
+    for (Object key : r.keySet()) {
+      RegionEntry re = ((LocalRegion) r).getRegionEntry(key);
+      if (re != null) {
+        /**
+         * value could be GATEWAY_SENDER_EVENT_IMPL_VALUE or region entry value.
+         */
+        @Unretained(OffHeapIdentifier.GATEWAY_SENDER_EVENT_IMPL_VALUE)
+        Object value = re._getValue();
+        if (value instanceof OffHeapStoredObject) {
+          result.add((OffHeapStoredObject) value);
+        }
+      }
+    }
+  }
+
+  private OffHeapStoredObject allocateOffHeapStoredObject(int size) {
+    OffHeapStoredObject result = this.freeList.allocate(size);
+    int resultSize = result.getSize();
+    stats.incObjects(1);
+    stats.incUsedMemory(resultSize);
+    stats.incFreeMemory(-resultSize);
+    notifyListeners();
+    if (ReferenceCountHelper.trackReferenceCounts()) {
+      ReferenceCountHelper.refCountChanged(result.getAddress(), false, 1);
+    }
+    return result;
+  }
+  
+  @Override
+  public StoredObject allocate(int size) {
+    //System.out.println("allocating " + size);
+    OffHeapStoredObject result = allocateOffHeapStoredObject(size);
+    //("allocated off heap object of size " + size + " @" + Long.toHexString(result.getMemoryAddress()), true);
+    return result;
+  }
+  
+  public static void debugLog(String msg, boolean logStack) {
+    if (logStack) {
+      logger.info(msg, new RuntimeException(msg));
+    } else {
+      logger.info(msg);
+    }
+  }
+  
+  @Override
+  public StoredObject allocateAndInitialize(byte[] v, boolean isSerialized, boolean isCompressed) {
+    return allocateAndInitialize(v, isSerialized, isCompressed, null);
+  }
+  @Override
+  public StoredObject allocateAndInitialize(byte[] v, boolean isSerialized, boolean isCompressed, byte[] originalHeapData) {
+    long addr = OffHeapRegionEntryHelper.encodeDataAsAddress(v, isSerialized, isCompressed);
+    if (addr != 0L) {
+      return new TinyStoredObject(addr);
+    }
+    OffHeapStoredObject result = allocateOffHeapStoredObject(v.length);
+    //debugLog("allocated off heap object of size " + v.length + " @" + Long.toHexString(result.getMemoryAddress()), true);
+    //debugLog("allocated off heap object of size " + v.length + " @" + Long.toHexString(result.getMemoryAddress()) +  "chunkSize=" + result.getSize() + " isSerialized=" + isSerialized + " v=" + Arrays.toString(v), true);
+    result.setSerializedValue(v);
+    result.setSerialized(isSerialized);
+    result.setCompressed(isCompressed);
+    if (originalHeapData != null) {
+      result = new OffHeapStoredObjectWithHeapForm(result, originalHeapData);
+    }
+    return result;
+  }
+  
+  @Override
+  public long getFreeMemory() {
+    return this.freeList.getFreeMemory();
+  }
+
+  @Override
+  public long getUsedMemory() {
+    return this.freeList.getUsedMemory();
+  }
+
+  @Override
+  public long getTotalMemory() {
+    return this.freeList.getTotalMemory();
+  }
+  
+  @Override
+  public void close() {
+    try {
+      LifecycleListener.invokeBeforeClose(this);
+    } finally {
+      this.ooohml.close();
+      if (Boolean.getBoolean(FREE_OFF_HEAP_MEMORY_PROPERTY)) {
+        realClose();
+      }
+    }
+  }
+  
+  public static void freeOffHeapMemory() {
+    MemoryAllocatorImpl ma = singleton;
+    if (ma != null) {
+      ma.realClose();
+    }
+  }
+  
+  private void realClose() {
+    // Removing this memory immediately can lead to a SEGV. See 47885.
+    if (setClosed()) {
+      this.freeList.freeSlabs();
+      this.stats.close();
+      singleton = null;
+    }
+  }
+  
+  private final AtomicBoolean closed = new AtomicBoolean();
+  private boolean isClosed() {
+    return this.closed.get();
+  }
+  /**
+   * Returns true if caller is the one who should close; false if some other thread
+   * is already closing.
+   */
+  private boolean setClosed() {
+    return this.closed.compareAndSet(false, true);
+  }
+  
+
+  FreeListManager getFreeListManager() {
+    return this.freeList;
+  }
+  
+  /**
+   * Return the slabId of the slab that contains the given addr.
+   */
+  int findSlab(long addr) {
+    return this.freeList.findSlab(addr);
+  }
+  
+  public OffHeapMemoryStats getStats() {
+    return this.stats;
+  }
+  
+  @Override
+  public void addMemoryUsageListener(final MemoryUsageListener listener) {
+    synchronized (this.memoryUsageListeners) {
+      final MemoryUsageListener[] newMemoryUsageListeners = Arrays.copyOf(this.memoryUsageListeners, this.memoryUsageListeners.length + 1);
+      newMemoryUsageListeners[this.memoryUsageListeners.length] = listener;
+      this.memoryUsageListeners = newMemoryUsageListeners;
+    }
+  }
+  
+  @Override
+  public void removeMemoryUsageListener(final MemoryUsageListener listener) {
+    synchronized (this.memoryUsageListeners) {
+      int listenerIndex = -1;
+      for (int i = 0; i < this.memoryUsageListeners.length; i++) {
+        if (this.memoryUsageListeners[i] == listener) {
+          listenerIndex = i;
+          break;
+        }
+      }
+
+      if (listenerIndex != -1) {
+        final MemoryUsageListener[] newMemoryUsageListeners = new MemoryUsageListener[this.memoryUsageListeners.length - 1];
+        System.arraycopy(this.memoryUsageListeners, 0, newMemoryUsageListeners, 0, listenerIndex);
+        System.arraycopy(this.memoryUsageListeners, listenerIndex + 1, newMemoryUsageListeners, listenerIndex,
+            this.memoryUsageListeners.length - listenerIndex - 1);
+        this.memoryUsageListeners = newMemoryUsageListeners;
+      }
+    }
+  }
+  
+  void notifyListeners() {
+    final MemoryUsageListener[] savedListeners = this.memoryUsageListeners;
+    
+    if (savedListeners.length == 0) {
+      return;
+    }
+
+    final long bytesUsed = getUsedMemory();
+    for (int i = 0; i < savedListeners.length; i++) {
+      savedListeners[i].updateMemoryUsed(bytesUsed);
+    }
+  }
+  
+  static void validateAddress(long addr) {
+    validateAddressAndSize(addr, -1);
+  }
+  
+  static void validateAddressAndSize(long addr, int size) {
+    // if the caller does not have a "size" to provide then use -1
+    if ((addr & 7) != 0) {
+      StringBuilder sb = new StringBuilder();
+      sb.append("address was not 8 byte aligned: 0x").append(Long.toString(addr, 16));
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.singleton;
+      if (ma != null) {
+        sb.append(". Valid addresses must be in one of the following ranges: ");
+        ma.freeList.getSlabDescriptions(sb);
+     }
+      throw new IllegalStateException(sb.toString());
+    }
+    if (addr >= 0 && addr < 1024) {
+      throw new IllegalStateException("addr was smaller than expected 0x" + addr);
+    }
+    validateAddressAndSizeWithinSlab(addr, size, DO_EXPENSIVE_VALIDATION);
+  }
+
+  static void validateAddressAndSizeWithinSlab(long addr, int size, boolean doExpensiveValidation) {
+    if (doExpensiveValidation) {
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.singleton;
+      if (ma != null) {
+        if (!ma.freeList.validateAddressAndSizeWithinSlab(addr, size)) {
+          throw new IllegalStateException(" address 0x" + Long.toString(addr, 16) + " does not address the original slab memory");
+        }
+      }
+    }
+  }
+
+  public synchronized List<MemoryBlock> getOrphans() {
+    List<OffHeapStoredObject> liveChunks = this.freeList.getLiveChunks();
+    List<OffHeapStoredObject> regionChunks = getRegionLiveChunks();
+    liveChunks.removeAll(regionChunks);
+    List<MemoryBlock> orphans = new ArrayList<MemoryBlock>();
+    for (OffHeapStoredObject chunk: liveChunks) {
+      orphans.add(new MemoryBlockNode(this, chunk));
+    }
+    Collections.sort(orphans,
+        new Comparator<MemoryBlock>() {
+          @Override
+          public int compare(MemoryBlock o1, MemoryBlock o2) {
+            return Long.valueOf(o1.getAddress()).compareTo(o2.getAddress());
+          }
+        });
+    //this.memoryBlocks = new WeakReference<List<MemoryBlock>>(orphans);
+    return orphans;
+  }
+
+  @Override
+  public MemoryInspector getMemoryInspector() {
+    return this.memoryInspector;
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java
index 6e2414f..a72d618 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java
@@ -26,9 +26,9 @@ import com.gemstone.gemfire.cache.CacheClosedException;
  * Basic implementation of MemoryBlock for test validation only.
  */
 public class MemoryBlockNode implements MemoryBlock {
-  private final SimpleMemoryAllocatorImpl ma;
+  private final MemoryAllocatorImpl ma;
   private final MemoryBlock block;
-  MemoryBlockNode(SimpleMemoryAllocatorImpl ma, MemoryBlock block) {
+  MemoryBlockNode(MemoryAllocatorImpl ma, MemoryBlock block) {
     this.ma = ma;
     this.block = block;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
index 9c6c75a..2bdcfba 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
@@ -199,7 +199,7 @@ public class OffHeapStorage implements OffHeapMemoryStats {
 
     final int slabCount = calcSlabCount(maxSlabSize, offHeapMemorySize);
 
-    return SimpleMemoryAllocatorImpl.create(ooohml, stats, slabCount, offHeapMemorySize, maxSlabSize);
+    return MemoryAllocatorImpl.create(ooohml, stats, slabCount, offHeapMemorySize, maxSlabSize);
   }
   
   private static final long MAX_SLAB_SIZE = Integer.MAX_VALUE;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObject.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObject.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObject.java
index 68c9bdd..9861a54 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObject.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObject.java
@@ -96,7 +96,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
     final static byte FILL_BYTE = 0x3c;
     
     protected OffHeapStoredObject(long memoryAddress, int chunkSize) {
-      SimpleMemoryAllocatorImpl.validateAddressAndSize(memoryAddress, chunkSize);
+      MemoryAllocatorImpl.validateAddressAndSize(memoryAddress, chunkSize);
       this.memoryAddress = memoryAddress;
       setSize(chunkSize);
       AddressableMemoryManager.writeIntVolatile(getAddress()+REF_COUNT_OFFSET, MAGIC_NUMBER);
@@ -121,7 +121,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
      * memoryAddress. The off heap header has already been initialized.
      */
     protected OffHeapStoredObject(long memoryAddress) {
-      SimpleMemoryAllocatorImpl.validateAddress(memoryAddress);
+      MemoryAllocatorImpl.validateAddress(memoryAddress);
       this.memoryAddress = memoryAddress;
     }
     
@@ -168,8 +168,8 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
       // TODO OFFHEAP: no need to copy to heap. Just get the address of each and compare each byte. No need to call incReads when reading from address.
       int i;
       // inc it twice since we are reading two different objects
-      SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads();
-      SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads();
+      MemoryAllocatorImpl.getAllocator().getStats().incReads();
+      MemoryAllocatorImpl.getAllocator().getStats().incReads();
       for (i=0; i < mySize-(dataCache1.length-1); i+=dataCache1.length) {
         this.readDataBytes(i, dataCache1);
         other.readDataBytes(i, dataCache2);
@@ -206,7 +206,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
       final byte[] dataCache = new byte[1024];
       int idx=0;
       int i;
-      SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads();
+      MemoryAllocatorImpl.getAllocator().getStats().incReads();
       for (i=0; i < mySize-(dataCache.length-1); i+=dataCache.length) {
         this.readDataBytes(i, dataCache);
         for (int j=0; j < dataCache.length; j++) {
@@ -416,7 +416,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
       byte[] result = new byte[getDataSize()];
       readDataBytes(0, result);
       //debugLog("reading", true);
-      SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads();
+      MemoryAllocatorImpl.getAllocator().getStats().incReads();
       return result;
     }
     protected byte[] getRawBytes() {
@@ -487,19 +487,19 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
     }
 
     public static int getSize(long memAddr) {
-      SimpleMemoryAllocatorImpl.validateAddress(memAddr);
+      MemoryAllocatorImpl.validateAddress(memAddr);
       return AddressableMemoryManager.readInt(memAddr+CHUNK_SIZE_OFFSET);
     }
     public static void setSize(long memAddr, int size) {
-      SimpleMemoryAllocatorImpl.validateAddressAndSize(memAddr, size);
+      MemoryAllocatorImpl.validateAddressAndSize(memAddr, size);
       AddressableMemoryManager.writeInt(memAddr+CHUNK_SIZE_OFFSET, size);
     }
     public static long getNext(long memAddr) {
-      SimpleMemoryAllocatorImpl.validateAddress(memAddr);
+      MemoryAllocatorImpl.validateAddress(memAddr);
       return AddressableMemoryManager.readLong(memAddr+HEADER_SIZE);
     }
     public static void setNext(long memAddr, long next) {
-      SimpleMemoryAllocatorImpl.validateAddress(memAddr);
+      MemoryAllocatorImpl.validateAddress(memAddr);
       AddressableMemoryManager.writeLong(memAddr+HEADER_SIZE, next);
     }
     
@@ -595,7 +595,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
     }
 
     public static boolean retain(long memAddr) {
-      SimpleMemoryAllocatorImpl.validateAddress(memAddr);
+      MemoryAllocatorImpl.validateAddress(memAddr);
       int uc;
       int rawBits;
       int retryCount = 0;
@@ -628,7 +628,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
       release(memAddr, null);
     }
     static void release(final long memAddr, FreeListManager freeListManager) {
-      SimpleMemoryAllocatorImpl.validateAddress(memAddr);
+      MemoryAllocatorImpl.validateAddress(memAddr);
       int newCount;
       int rawBits;
       boolean returnToAllocator;
@@ -661,7 +661,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
           ReferenceCountHelper.freeRefCountInfo(memAddr);
         }
         if (freeListManager == null) {
-          freeListManager = SimpleMemoryAllocatorImpl.getAllocator().getFreeListManager();
+          freeListManager = MemoryAllocatorImpl.getAllocator().getFreeListManager();
         }
         freeListManager.free(memAddr);
       } else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStack.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStack.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStack.java
index 40d0143..b69d3a6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStack.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStack.java
@@ -29,7 +29,7 @@ public class OffHeapStoredObjectAddressStack {
   private volatile long topAddr;
   
   public OffHeapStoredObjectAddressStack(long addr) {
-    if (addr != 0L) SimpleMemoryAllocatorImpl.validateAddress(addr);
+    if (addr != 0L) MemoryAllocatorImpl.validateAddress(addr);
     this.topAddr = addr;
   }
   public OffHeapStoredObjectAddressStack() {
@@ -40,7 +40,7 @@ public class OffHeapStoredObjectAddressStack {
   }
   public void offer(long e) {
     assert e != 0;
-    SimpleMemoryAllocatorImpl.validateAddress(e);
+    MemoryAllocatorImpl.validateAddress(e);
     synchronized (this) {
       OffHeapStoredObject.setNext(e, this.topAddr);
       this.topAddr = e;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfo.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfo.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfo.java
index e3b4b1f..cc67a58 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfo.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfo.java
@@ -23,7 +23,7 @@ import com.gemstone.gemfire.internal.shared.StringPrintWriter;
 
 @SuppressWarnings("serial")
 /**
- * Used by SimpleMemoryAllocatorImpl to debug off-heap memory leaks.
+ * Used by MemoryAllocatorImpl to debug off-heap memory leaks.
  */
 public class RefCountChangeInfo extends Throwable {
   private final String threadName;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
index 778b329..f6696b0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
@@ -214,7 +214,7 @@ public class ReferenceCountHelper {
       }
     }
     if (list == LOCKED) {
-      SimpleMemoryAllocatorImpl.debugLog("refCount " + (decRefCount ? "deced" : "inced") + " after orphan detected for @" + Long.toHexString(address), true);
+      MemoryAllocatorImpl.debugLog("refCount " + (decRefCount ? "deced" : "inced") + " after orphan detected for @" + Long.toHexString(address), true);
       return;
     }
     RefCountChangeInfo info = new RefCountChangeInfo(decRefCount, rc, owner);
@@ -242,7 +242,7 @@ public class ReferenceCountHelper {
     if (!trackReferenceCounts()) return;
     List<RefCountChangeInfo> freedInfo = stacktraces.remove(address);
     if (freedInfo == LOCKED) {
-      SimpleMemoryAllocatorImpl.debugLog("freed after orphan detected for @" + Long.toHexString(address), true);
+      MemoryAllocatorImpl.debugLog("freed after orphan detected for @" + Long.toHexString(address), true);
     } else if (trackFreedReferenceCounts()) {
       if (freedInfo != null) {
         freedStacktraces.put(address, freedInfo);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
deleted file mode 100644
index f7fa888..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
+++ /dev/null
@@ -1,507 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.offheap;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionService;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
-import com.gemstone.gemfire.internal.cache.RegionEntry;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier;
-import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
-
-/**
- * This allocator is somewhat like an Arena allocator.
- * We start out with an array of multiple large chunks of memory.
- * We also keep lists of any chunk that have been allocated and freed.
- * An allocation will always try to find a chunk in a free list that is a close fit to the requested size.
- * If no close fits exist then it allocates the next slice from the front of one the original large chunks.
- * If we can not find enough free memory then all the existing free memory is compacted.
- * If we still do not have enough to make the allocation an exception is thrown.
- * 
- * @author darrel
- * @author Kirk Lund
- * @since 9.0
- */
-public class SimpleMemoryAllocatorImpl implements MemoryAllocator {
-
-  static final Logger logger = LogService.getLogger();
-  
-  public static final String FREE_OFF_HEAP_MEMORY_PROPERTY = "gemfire.free-off-heap-memory";
-  
-  private volatile OffHeapMemoryStats stats;
-  
-  private volatile OutOfOffHeapMemoryListener ooohml;
-  
-  OutOfOffHeapMemoryListener getOutOfOffHeapMemoryListener() {
-    return this.ooohml;
-  }
-
-  public final FreeListManager freeList;
-
-  private MemoryInspector memoryInspector;
-
-  private volatile MemoryUsageListener[] memoryUsageListeners = new MemoryUsageListener[0];
-  
-  private static SimpleMemoryAllocatorImpl singleton = null;
-  
-  public static SimpleMemoryAllocatorImpl getAllocator() {
-    SimpleMemoryAllocatorImpl result = singleton;
-    if (result == null) {
-      throw new CacheClosedException("Off Heap memory allocator does not exist.");
-    }
-    return result;
-  }
-
-  private static final boolean DO_EXPENSIVE_VALIDATION = Boolean.getBoolean("gemfire.OFF_HEAP_DO_EXPENSIVE_VALIDATION");
-  
-  public static MemoryAllocator create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, int slabCount, 
-      long offHeapMemorySize, long maxSlabSize) {
-    return create(ooohml, stats, slabCount, offHeapMemorySize, maxSlabSize, null,
-        new SlabFactory() {
-      @Override
-      public Slab create(int size) {
-        return new SlabImpl(size);
-      }
-    });
-  }
-
-  private static SimpleMemoryAllocatorImpl create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, int slabCount, 
-      long offHeapMemorySize, long maxSlabSize, Slab[] slabs, 
-      SlabFactory slabFactory) {
-    SimpleMemoryAllocatorImpl result = singleton;
-    boolean created = false;
-    try {
-    if (result != null) {
-      result.reuse(ooohml, stats, offHeapMemorySize, slabs);
-      logger.info("Reusing {}  bytes of off-heap memory. The maximum size of a single off-heap object is {}  bytes.", result.getTotalMemory(), result.freeList.getLargestSlabSize());
-      created = true;
-      LifecycleListener.invokeAfterReuse(result);
-    } else {
-      if (slabs == null) {
-        // allocate memory chunks
-        logger.info("Allocating {} bytes of off-heap memory. The maximum size of a single off-heap object is {} bytes.", offHeapMemorySize, maxSlabSize);
-        slabs = new SlabImpl[slabCount];
-        long uncreatedMemory = offHeapMemorySize;
-        for (int i=0; i < slabCount; i++) {
-          try {
-            if (uncreatedMemory >= maxSlabSize) {
-              slabs[i] = slabFactory.create((int) maxSlabSize);
-              uncreatedMemory -= maxSlabSize;
-            } else {
-              // the last slab can be smaller then maxSlabSize
-              slabs[i] = slabFactory.create((int) uncreatedMemory);
-            }
-          } catch (OutOfMemoryError err) {
-            if (i > 0) {
-              logger.error("Off-heap memory creation failed after successfully allocating {} bytes of off-heap memory.", (i*maxSlabSize));
-            }
-            for (int j=0; j < i; j++) {
-              if (slabs[j] != null) {
-                slabs[j].free();
-              }
-            }
-            throw err;
-          }
-        }
-      }
-
-      result = new SimpleMemoryAllocatorImpl(ooohml, stats, slabs);
-      singleton = result;
-      LifecycleListener.invokeAfterCreate(result);
-      created = true;
-    }
-    } finally {
-      if (!created) {
-        if (stats != null) {
-          stats.close();
-        }
-        if (ooohml != null) {
-          ooohml.close();
-        }
-      }
-    }
-    return result;
-  }
-  static SimpleMemoryAllocatorImpl createForUnitTest(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, int slabCount, 
-      long offHeapMemorySize, long maxSlabSize, SlabFactory memChunkFactory) {
-    return create(ooohml, stats, slabCount, offHeapMemorySize, maxSlabSize, null, 
-        memChunkFactory);
-  }
-  public static SimpleMemoryAllocatorImpl createForUnitTest(OutOfOffHeapMemoryListener oooml, OffHeapMemoryStats stats, Slab[] slabs) {
-    int slabCount = 0;
-    long offHeapMemorySize = 0;
-    long maxSlabSize = 0;
-    if (slabs != null) {
-      slabCount = slabs.length;
-      for (int i=0; i < slabCount; i++) {
-        int slabSize = slabs[i].getSize();
-        offHeapMemorySize += slabSize;
-        if (slabSize > maxSlabSize) {
-          maxSlabSize = slabSize;
-        }
-      }
-    }
-    return create(oooml, stats, slabCount, offHeapMemorySize, maxSlabSize, slabs, null);
-  }
-  
-  
-  private void reuse(OutOfOffHeapMemoryListener oooml, OffHeapMemoryStats newStats, long offHeapMemorySize, Slab[] slabs) {
-    if (isClosed()) {
-      throw new IllegalStateException("Can not reuse a closed off-heap memory manager.");
-    }
-    if (oooml == null) {
-      throw new IllegalArgumentException("OutOfOffHeapMemoryListener is null");
-    }
-    if (getTotalMemory() != offHeapMemorySize) {
-      logger.warn("Using {} bytes of existing off-heap memory instead of the requested {}.", getTotalMemory(), offHeapMemorySize);
-    }
-    if (!this.freeList.okToReuse(slabs)) {
-      throw new IllegalStateException("attempted to reuse existing off-heap memory even though new off-heap memory was allocated");
-    }
-    this.ooohml = oooml;
-    newStats.initialize(this.stats);
-    this.stats = newStats;
-  }
-
-  private SimpleMemoryAllocatorImpl(final OutOfOffHeapMemoryListener oooml, final OffHeapMemoryStats stats, final Slab[] slabs) {
-    if (oooml == null) {
-      throw new IllegalArgumentException("OutOfOffHeapMemoryListener is null");
-    }
-    
-    this.ooohml = oooml;
-    this.stats = stats;
-
-    this.stats.setFragments(slabs.length);
-    this.stats.setLargestFragment(slabs[0].getSize());
-    
-    this.freeList = new FreeListManager(this, slabs);
-    this.memoryInspector = new MemoryInspectorImpl(this.freeList);
-
-    this.stats.incMaxMemory(this.freeList.getTotalMemory());
-    this.stats.incFreeMemory(this.freeList.getTotalMemory());
-  }
-  
-  public List<OffHeapStoredObject> getLostChunks() {
-    List<OffHeapStoredObject> liveChunks = this.freeList.getLiveChunks();
-    List<OffHeapStoredObject> regionChunks = getRegionLiveChunks();
-    Set<OffHeapStoredObject> liveChunksSet = new HashSet<>(liveChunks);
-    Set<OffHeapStoredObject> regionChunksSet = new HashSet<>(regionChunks);
-    liveChunksSet.removeAll(regionChunksSet);
-    return new ArrayList<OffHeapStoredObject>(liveChunksSet);
-  }
-  
-  /**
-   * Returns a possibly empty list that contains all the Chunks used by regions.
-   */
-  private List<OffHeapStoredObject> getRegionLiveChunks() {
-    ArrayList<OffHeapStoredObject> result = new ArrayList<OffHeapStoredObject>();
-    RegionService gfc = GemFireCacheImpl.getInstance();
-    if (gfc != null) {
-      Iterator<Region<?,?>> rootIt = gfc.rootRegions().iterator();
-      while (rootIt.hasNext()) {
-        Region<?,?> rr = rootIt.next();
-        getRegionLiveChunks(rr, result);
-        Iterator<Region<?,?>> srIt = rr.subregions(true).iterator();
-        while (srIt.hasNext()) {
-          getRegionLiveChunks(srIt.next(), result);
-        }
-      }
-    }
-    return result;
-  }
-
-  private void getRegionLiveChunks(Region<?,?> r, List<OffHeapStoredObject> result) {
-    if (r.getAttributes().getOffHeap()) {
-
-      if (r instanceof PartitionedRegion) {
-        PartitionedRegionDataStore prs = ((PartitionedRegion) r).getDataStore();
-        if (prs != null) {
-          Set<BucketRegion> brs = prs.getAllLocalBucketRegions();
-          if (brs != null) {
-            for (BucketRegion br : brs) {
-              if (br != null && !br.isDestroyed()) {
-                this.basicGetRegionLiveChunks(br, result);
-              }
-
-            }
-          }
-        }
-      } else {
-        this.basicGetRegionLiveChunks((LocalRegion) r, result);
-      }
-
-    }
-
-  }
-  
-  private void basicGetRegionLiveChunks(LocalRegion r, List<OffHeapStoredObject> result) {
-    for (Object key : r.keySet()) {
-      RegionEntry re = ((LocalRegion) r).getRegionEntry(key);
-      if (re != null) {
-        /**
-         * value could be GATEWAY_SENDER_EVENT_IMPL_VALUE or region entry value.
-         */
-        @Unretained(OffHeapIdentifier.GATEWAY_SENDER_EVENT_IMPL_VALUE)
-        Object value = re._getValue();
-        if (value instanceof OffHeapStoredObject) {
-          result.add((OffHeapStoredObject) value);
-        }
-      }
-    }
-  }
-
-  private OffHeapStoredObject allocateOffHeapStoredObject(int size) {
-    OffHeapStoredObject result = this.freeList.allocate(size);
-    int resultSize = result.getSize();
-    stats.incObjects(1);
-    stats.incUsedMemory(resultSize);
-    stats.incFreeMemory(-resultSize);
-    notifyListeners();
-    if (ReferenceCountHelper.trackReferenceCounts()) {
-      ReferenceCountHelper.refCountChanged(result.getAddress(), false, 1);
-    }
-    return result;
-  }
-  
-  @Override
-  public StoredObject allocate(int size) {
-    //System.out.println("allocating " + size);
-    OffHeapStoredObject result = allocateOffHeapStoredObject(size);
-    //("allocated off heap object of size " + size + " @" + Long.toHexString(result.getMemoryAddress()), true);
-    return result;
-  }
-  
-  public static void debugLog(String msg, boolean logStack) {
-    if (logStack) {
-      logger.info(msg, new RuntimeException(msg));
-    } else {
-      logger.info(msg);
-    }
-  }
-  
-  @Override
-  public StoredObject allocateAndInitialize(byte[] v, boolean isSerialized, boolean isCompressed) {
-    return allocateAndInitialize(v, isSerialized, isCompressed, null);
-  }
-  @Override
-  public StoredObject allocateAndInitialize(byte[] v, boolean isSerialized, boolean isCompressed, byte[] originalHeapData) {
-    long addr = OffHeapRegionEntryHelper.encodeDataAsAddress(v, isSerialized, isCompressed);
-    if (addr != 0L) {
-      return new TinyStoredObject(addr);
-    }
-    OffHeapStoredObject result = allocateOffHeapStoredObject(v.length);
-    //debugLog("allocated off heap object of size " + v.length + " @" + Long.toHexString(result.getMemoryAddress()), true);
-    //debugLog("allocated off heap object of size " + v.length + " @" + Long.toHexString(result.getMemoryAddress()) +  "chunkSize=" + result.getSize() + " isSerialized=" + isSerialized + " v=" + Arrays.toString(v), true);
-    result.setSerializedValue(v);
-    result.setSerialized(isSerialized);
-    result.setCompressed(isCompressed);
-    if (originalHeapData != null) {
-      result = new OffHeapStoredObjectWithHeapForm(result, originalHeapData);
-    }
-    return result;
-  }
-  
-  @Override
-  public long getFreeMemory() {
-    return this.freeList.getFreeMemory();
-  }
-
-  @Override
-  public long getUsedMemory() {
-    return this.freeList.getUsedMemory();
-  }
-
-  @Override
-  public long getTotalMemory() {
-    return this.freeList.getTotalMemory();
-  }
-  
-  @Override
-  public void close() {
-    try {
-      LifecycleListener.invokeBeforeClose(this);
-    } finally {
-      this.ooohml.close();
-      if (Boolean.getBoolean(FREE_OFF_HEAP_MEMORY_PROPERTY)) {
-        realClose();
-      }
-    }
-  }
-  
-  public static void freeOffHeapMemory() {
-    SimpleMemoryAllocatorImpl ma = singleton;
-    if (ma != null) {
-      ma.realClose();
-    }
-  }
-  
-  private void realClose() {
-    // Removing this memory immediately can lead to a SEGV. See 47885.
-    if (setClosed()) {
-      this.freeList.freeSlabs();
-      this.stats.close();
-      singleton = null;
-    }
-  }
-  
-  private final AtomicBoolean closed = new AtomicBoolean();
-  private boolean isClosed() {
-    return this.closed.get();
-  }
-  /**
-   * Returns true if caller is the one who should close; false if some other thread
-   * is already closing.
-   */
-  private boolean setClosed() {
-    return this.closed.compareAndSet(false, true);
-  }
-  
-
-  FreeListManager getFreeListManager() {
-    return this.freeList;
-  }
-  
-  /**
-   * Return the slabId of the slab that contains the given addr.
-   */
-  int findSlab(long addr) {
-    return this.freeList.findSlab(addr);
-  }
-  
-  public OffHeapMemoryStats getStats() {
-    return this.stats;
-  }
-  
-  @Override
-  public void addMemoryUsageListener(final MemoryUsageListener listener) {
-    synchronized (this.memoryUsageListeners) {
-      final MemoryUsageListener[] newMemoryUsageListeners = Arrays.copyOf(this.memoryUsageListeners, this.memoryUsageListeners.length + 1);
-      newMemoryUsageListeners[this.memoryUsageListeners.length] = listener;
-      this.memoryUsageListeners = newMemoryUsageListeners;
-    }
-  }
-  
-  @Override
-  public void removeMemoryUsageListener(final MemoryUsageListener listener) {
-    synchronized (this.memoryUsageListeners) {
-      int listenerIndex = -1;
-      for (int i = 0; i < this.memoryUsageListeners.length; i++) {
-        if (this.memoryUsageListeners[i] == listener) {
-          listenerIndex = i;
-          break;
-        }
-      }
-
-      if (listenerIndex != -1) {
-        final MemoryUsageListener[] newMemoryUsageListeners = new MemoryUsageListener[this.memoryUsageListeners.length - 1];
-        System.arraycopy(this.memoryUsageListeners, 0, newMemoryUsageListeners, 0, listenerIndex);
-        System.arraycopy(this.memoryUsageListeners, listenerIndex + 1, newMemoryUsageListeners, listenerIndex,
-            this.memoryUsageListeners.length - listenerIndex - 1);
-        this.memoryUsageListeners = newMemoryUsageListeners;
-      }
-    }
-  }
-  
-  void notifyListeners() {
-    final MemoryUsageListener[] savedListeners = this.memoryUsageListeners;
-    
-    if (savedListeners.length == 0) {
-      return;
-    }
-
-    final long bytesUsed = getUsedMemory();
-    for (int i = 0; i < savedListeners.length; i++) {
-      savedListeners[i].updateMemoryUsed(bytesUsed);
-    }
-  }
-  
-  static void validateAddress(long addr) {
-    validateAddressAndSize(addr, -1);
-  }
-  
-  static void validateAddressAndSize(long addr, int size) {
-    // if the caller does not have a "size" to provide then use -1
-    if ((addr & 7) != 0) {
-      StringBuilder sb = new StringBuilder();
-      sb.append("address was not 8 byte aligned: 0x").append(Long.toString(addr, 16));
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.singleton;
-      if (ma != null) {
-        sb.append(". Valid addresses must be in one of the following ranges: ");
-        ma.freeList.getSlabDescriptions(sb);
-     }
-      throw new IllegalStateException(sb.toString());
-    }
-    if (addr >= 0 && addr < 1024) {
-      throw new IllegalStateException("addr was smaller than expected 0x" + addr);
-    }
-    validateAddressAndSizeWithinSlab(addr, size, DO_EXPENSIVE_VALIDATION);
-  }
-
-  static void validateAddressAndSizeWithinSlab(long addr, int size, boolean doExpensiveValidation) {
-    if (doExpensiveValidation) {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.singleton;
-      if (ma != null) {
-        if (!ma.freeList.validateAddressAndSizeWithinSlab(addr, size)) {
-          throw new IllegalStateException(" address 0x" + Long.toString(addr, 16) + " does not address the original slab memory");
-        }
-      }
-    }
-  }
-
-  public synchronized List<MemoryBlock> getOrphans() {
-    List<OffHeapStoredObject> liveChunks = this.freeList.getLiveChunks();
-    List<OffHeapStoredObject> regionChunks = getRegionLiveChunks();
-    liveChunks.removeAll(regionChunks);
-    List<MemoryBlock> orphans = new ArrayList<MemoryBlock>();
-    for (OffHeapStoredObject chunk: liveChunks) {
-      orphans.add(new MemoryBlockNode(this, chunk));
-    }
-    Collections.sort(orphans,
-        new Comparator<MemoryBlock>() {
-          @Override
-          public int compare(MemoryBlock o1, MemoryBlock o2) {
-            return Long.valueOf(o1.getAddress()).compareTo(o2.getAddress());
-          }
-        });
-    //this.memoryBlocks = new WeakReference<List<MemoryBlock>>(orphans);
-    return orphans;
-  }
-
-  @Override
-  public MemoryInspector getMemoryInspector() {
-    return this.memoryInspector;
-  }
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
index dce68cf..8127eea 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
@@ -110,7 +110,7 @@ import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
 import com.gemstone.gemfire.internal.cache.versions.VMRegionVersionVector;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
@@ -2000,7 +2000,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
             assertEquals(1, region.size());
             if (region.getAttributes().getOffHeap() && !(region instanceof PartitionedRegion)) {
               GemFireCacheImpl gfc = (GemFireCacheImpl) getCache();
-              SimpleMemoryAllocatorImpl ma = (SimpleMemoryAllocatorImpl) gfc.getOffHeapStore();
+              MemoryAllocatorImpl ma = (MemoryAllocatorImpl) gfc.getOffHeapStore();
               LocalRegion reRegion;
               reRegion = (LocalRegion) region;
               RegionEntry re = reRegion.getRegionEntry(key2);
@@ -2066,7 +2066,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
             assertEquals(1, region.size());
             if (region.getAttributes().getOffHeap() && !(region instanceof PartitionedRegion)) {
               GemFireCacheImpl gfc = (GemFireCacheImpl) getCache();
-              SimpleMemoryAllocatorImpl ma = (SimpleMemoryAllocatorImpl) gfc.getOffHeapStore();
+              MemoryAllocatorImpl ma = (MemoryAllocatorImpl) gfc.getOffHeapStore();
               assertEquals(1, ma.getStats().getObjects());
             }
           }
@@ -2087,7 +2087,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           assertEquals(2, region.size());
           if (region.getAttributes().getOffHeap() && !(region instanceof PartitionedRegion)) {
             GemFireCacheImpl gfc = (GemFireCacheImpl) getCache();
-            SimpleMemoryAllocatorImpl ma = (SimpleMemoryAllocatorImpl) gfc.getOffHeapStore();
+            MemoryAllocatorImpl ma = (MemoryAllocatorImpl) gfc.getOffHeapStore();
             assertEquals(2, ma.getStats().getObjects());
             LocalRegion reRegion;
             reRegion = (LocalRegion) region;
@@ -2153,7 +2153,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
             assertEquals(2, region.size());
             if (region.getAttributes().getOffHeap() && !(region instanceof PartitionedRegion)) {
               GemFireCacheImpl gfc = (GemFireCacheImpl) getCache();
-              SimpleMemoryAllocatorImpl ma = (SimpleMemoryAllocatorImpl) gfc.getOffHeapStore();
+              MemoryAllocatorImpl ma = (MemoryAllocatorImpl) gfc.getOffHeapStore();
               assertEquals(2, ma.getStats().getObjects());
               LocalRegion reRegion;
               reRegion = (LocalRegion) region;
@@ -2177,7 +2177,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           assertEquals(2, region.size());
           if (region.getAttributes().getOffHeap() && !(region instanceof PartitionedRegion)) {
             GemFireCacheImpl gfc = (GemFireCacheImpl) getCache();
-            SimpleMemoryAllocatorImpl ma = (SimpleMemoryAllocatorImpl) gfc.getOffHeapStore();
+            MemoryAllocatorImpl ma = (MemoryAllocatorImpl) gfc.getOffHeapStore();
             assertEquals(2, ma.getStats().getObjects());
           }
         }
@@ -2237,7 +2237,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
             assertEquals(2, region.size());
             if (region.getAttributes().getOffHeap() && !(region instanceof PartitionedRegion)) {
               GemFireCacheImpl gfc = (GemFireCacheImpl) getCache();
-              SimpleMemoryAllocatorImpl ma = (SimpleMemoryAllocatorImpl) gfc.getOffHeapStore();
+              MemoryAllocatorImpl ma = (MemoryAllocatorImpl) gfc.getOffHeapStore();
               assertEquals(2, ma.getStats().getObjects());
             }
           }
@@ -2257,7 +2257,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           assertEquals(1, region.size());
           if (region.getAttributes().getOffHeap() && !(region instanceof PartitionedRegion)) {
             GemFireCacheImpl gfc = (GemFireCacheImpl) getCache();
-            SimpleMemoryAllocatorImpl ma = (SimpleMemoryAllocatorImpl) gfc.getOffHeapStore();
+            MemoryAllocatorImpl ma = (MemoryAllocatorImpl) gfc.getOffHeapStore();
             assertEquals(1, ma.getStats().getObjects());
           }
        }
@@ -2312,7 +2312,7 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
             assertEquals(1, region.size());
             if (region.getAttributes().getOffHeap() && !(region instanceof PartitionedRegion)) {
               GemFireCacheImpl gfc = (GemFireCacheImpl) getCache();
-              SimpleMemoryAllocatorImpl ma = (SimpleMemoryAllocatorImpl) gfc.getOffHeapStore();
+              MemoryAllocatorImpl ma = (MemoryAllocatorImpl) gfc.getOffHeapStore();
               assertEquals(1, ma.getStats().getObjects());
             }
           }
@@ -2331,13 +2331,13 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
           assertEquals(1, region.size());
           if (region.getAttributes().getOffHeap() && !(region instanceof PartitionedRegion)) {
             GemFireCacheImpl gfc = (GemFireCacheImpl) getCache();
-            SimpleMemoryAllocatorImpl ma = (SimpleMemoryAllocatorImpl) gfc.getOffHeapStore();
+            MemoryAllocatorImpl ma = (MemoryAllocatorImpl) gfc.getOffHeapStore();
             assertEquals(1, ma.getStats().getObjects());
           }
           region.destroyRegion(arg);
           if (region.getAttributes().getOffHeap() && !(region instanceof PartitionedRegion)) {
             GemFireCacheImpl gfc = (GemFireCacheImpl) getCache();
-            final SimpleMemoryAllocatorImpl ma = (SimpleMemoryAllocatorImpl) gfc.getOffHeapStore();
+            final MemoryAllocatorImpl ma = (MemoryAllocatorImpl) gfc.getOffHeapStore();
             WaitCriterion waitForStatChange = new WaitCriterion() {
               public boolean done() {
                 return ma.getStats().getObjects() == 0;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
index f7f633c..803593e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
@@ -39,7 +39,7 @@ import com.gemstone.gemfire.cache30.ClientServerTestCase;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.AsyncInvocation;
 import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
@@ -270,7 +270,7 @@ import com.gemstone.gemfire.test.dunit.VM;
     server.invoke(new CacheSerializableRunnable("Dump OffHeap Stats") {
       @Override
       public void run2() throws CacheException {
-        SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.getAllocator();
+        MemoryAllocatorImpl ma = MemoryAllocatorImpl.getAllocator();
         System.out.println("STATS: objects=" + ma.getStats().getObjects() + " usedMemory=" + ma.getStats().getUsedMemory() + " reads=" + ma.getStats().getReads());
       }
     });

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapTestUtil.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapTestUtil.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapTestUtil.java
index 8fd6895..f9d2c2a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapTestUtil.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapTestUtil.java
@@ -25,15 +25,15 @@ import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.internal.offheap.MemoryBlock;
 import com.gemstone.gemfire.internal.offheap.RefCountChangeInfo;
 import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 
 @SuppressWarnings("deprecation")
 public class OffHeapTestUtil {
 
   public static void checkOrphans() { // TODO:KIRK: need to do something special to guarantee proper tearDown
-    SimpleMemoryAllocatorImpl allocator = null;
+    MemoryAllocatorImpl allocator = null;
     try {
-      allocator = SimpleMemoryAllocatorImpl.getAllocator();
+      allocator = MemoryAllocatorImpl.getAllocator();
     } catch (CacheClosedException ignore) {
       // no off-heap memory so no orphans
       return;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapValueWrapperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapValueWrapperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapValueWrapperJUnitTest.java
index 0829009..550d133 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapValueWrapperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapValueWrapperJUnitTest.java
@@ -31,7 +31,7 @@ import com.gemstone.gemfire.internal.cache.DiskEntry.Helper.OffHeapValueWrapper;
 import com.gemstone.gemfire.internal.cache.DiskEntry.Helper.Flushable;
 import com.gemstone.gemfire.internal.offheap.NullOffHeapMemoryStats;
 import com.gemstone.gemfire.internal.offheap.NullOutOfOffHeapMemoryListener;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.SlabImpl;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
@@ -40,18 +40,18 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 public class OffHeapValueWrapperJUnitTest {
 
   private static OffHeapValueWrapper createChunkValueWrapper(byte[] bytes, boolean isSerialized) {
-    StoredObject c = SimpleMemoryAllocatorImpl.getAllocator().allocateAndInitialize(bytes, isSerialized, false);
+    StoredObject c = MemoryAllocatorImpl.getAllocator().allocateAndInitialize(bytes, isSerialized, false);
     return new OffHeapValueWrapper(c);
   }
 
   @Before
   public void setUp() throws Exception {
-    SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
+    MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
   }
 
   @After
   public void tearDown() throws Exception {
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    MemoryAllocatorImpl.freeOffHeapMemory();
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java
index 84d7fc7..6dbe100 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java
@@ -30,7 +30,7 @@ import com.gemstone.gemfire.internal.offheap.OffHeapStoredObject;
 import com.gemstone.gemfire.internal.offheap.TinyStoredObject;
 import com.gemstone.gemfire.internal.offheap.NullOffHeapMemoryStats;
 import com.gemstone.gemfire.internal.offheap.NullOutOfOffHeapMemoryListener;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.SlabImpl;
 import com.gemstone.gemfire.internal.util.BlobHelper;
 
@@ -109,8 +109,8 @@ public abstract class OldValueImporterTestBase {
     
     // off-heap DataAsAddress byte array
     {
-      SimpleMemoryAllocatorImpl sma =
-          SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
+      MemoryAllocatorImpl sma =
+          MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
       try {
         byte[] baValue = new byte[] {1,2};
         TinyStoredObject baValueSO = (TinyStoredObject) sma.allocateAndInitialize(baValue, false, false);
@@ -121,13 +121,13 @@ public abstract class OldValueImporterTestBase {
         fromData(imsg, bytes);
         assertArrayEquals(baValue, (byte[])getOldValueFromImporter(imsg));
       } finally {
-        SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+        MemoryAllocatorImpl.freeOffHeapMemory();
       }
     }
     // off-heap Chunk byte array
     {
-      SimpleMemoryAllocatorImpl sma =
-          SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
+      MemoryAllocatorImpl sma =
+          MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
       try {
         byte[] baValue = new byte[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
         OffHeapStoredObject baValueSO = (OffHeapStoredObject) sma.allocateAndInitialize(baValue, false, false);
@@ -138,13 +138,13 @@ public abstract class OldValueImporterTestBase {
         fromData(imsg, bytes);
         assertArrayEquals(baValue, (byte[])getOldValueFromImporter(imsg));
       } finally {
-        SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+        MemoryAllocatorImpl.freeOffHeapMemory();
       }
     }
     // off-heap DataAsAddress String
     {
-      SimpleMemoryAllocatorImpl sma =
-          SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
+      MemoryAllocatorImpl sma =
+          MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
       try {
         String baValue = "12";
         byte[] baValueBlob = BlobHelper.serializeToBlob(baValue);
@@ -156,13 +156,13 @@ public abstract class OldValueImporterTestBase {
         fromData(imsg, bytes);
         assertArrayEquals(baValueBlob, ((VMCachedDeserializable)getOldValueFromImporter(imsg)).getSerializedValue());
       } finally {
-        SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+        MemoryAllocatorImpl.freeOffHeapMemory();
       }
     }
     // off-heap Chunk String
     {
-      SimpleMemoryAllocatorImpl sma =
-          SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
+      MemoryAllocatorImpl sma =
+          MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
       try {
         String baValue = "12345678";
         byte[] baValueBlob = BlobHelper.serializeToBlob(baValue);
@@ -174,7 +174,7 @@ public abstract class OldValueImporterTestBase {
         fromData(imsg, bytes);
         assertArrayEquals(baValueBlob, ((VMCachedDeserializable)getOldValueFromImporter(imsg)).getSerializedValue());
       } finally {
-        SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+        MemoryAllocatorImpl.freeOffHeapMemory();
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
index 382bd98..950d90b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
@@ -43,7 +43,7 @@ public class FreeListManagerTest {
   }
 
   private final int DEFAULT_SLAB_SIZE = 1024*1024*5;
-  private final SimpleMemoryAllocatorImpl ma = mock(SimpleMemoryAllocatorImpl.class);
+  private final MemoryAllocatorImpl ma = mock(MemoryAllocatorImpl.class);
   private final OffHeapMemoryStats stats = mock(OffHeapMemoryStats.class);
   private TestableFreeListManager freeListManager;
   
@@ -68,7 +68,7 @@ public class FreeListManagerTest {
     }
   }
   
-  private static TestableFreeListManager createFreeListManager(SimpleMemoryAllocatorImpl ma, Slab[] slabs) {
+  private static TestableFreeListManager createFreeListManager(MemoryAllocatorImpl ma, Slab[] slabs) {
     return new TestableFreeListManager(ma, slabs);
   }
   
@@ -871,7 +871,7 @@ public class FreeListManagerTest {
       }
     }
     
-    public TestableFreeListManager(SimpleMemoryAllocatorImpl ma, Slab[] slabs) {
+    public TestableFreeListManager(MemoryAllocatorImpl ma, Slab[] slabs) {
       super(ma, slabs);
     }
     


[43/54] [abbrv] incubator-geode git commit: GEODE-949: refactor and repackage security test code

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/PKCSAuthInit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/PKCSAuthInit.java b/geode-core/src/test/java/templates/security/PKCSAuthInit.java
deleted file mode 100755
index f4004f3..0000000
--- a/geode-core/src/test/java/templates/security/PKCSAuthInit.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package templates.security;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.security.AuthInitialize;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-import com.gemstone.gemfire.security.GemFireSecurityException;
-import org.apache.logging.log4j.Logger;
-
-import java.io.FileInputStream;
-import java.security.Key;
-import java.security.KeyStore;
-import java.security.PrivateKey;
-import java.security.Signature;
-import java.security.cert.X509Certificate;
-import java.util.Properties;
-
-/**
- * An {@link AuthInitialize} implementation that obtains the digital signature
- * for use with PKCS scheme on server from the given set of properties.
- * 
- * To use this class the <c>security-client-auth-init</c> property should be
- * set to the fully qualified name the static <code>create</code> function
- * viz. <code>templates.security.PKCSAuthInit.create</code>
- * 
- * @author Kumar Neeraj
- * @since 5.5
- */
-public class PKCSAuthInit implements AuthInitialize {
-  private static final Logger logger = LogService.getLogger();
-
-  public static final String KEYSTORE_FILE_PATH = "security-keystorepath";
-
-  public static final String KEYSTORE_ALIAS = "security-alias";
-
-  public static final String KEYSTORE_PASSWORD = "security-keystorepass";
-
-  public static final String SIGNATURE_DATA = "security-signature";
-
-  protected LogWriter securitylog;
-
-  protected LogWriter systemlog;
-
-  public void close() {
-  }
-
-  public static AuthInitialize create() {
-    return new PKCSAuthInit();
-  }
-
-  public PKCSAuthInit() {
-  }
-
-  public void init(LogWriter systemLogger, LogWriter securityLogger)
-      throws AuthenticationFailedException {
-    this.systemlog = systemLogger;
-    this.securitylog = securityLogger;
-  }
-
-  public Properties getCredentials(Properties props, DistributedMember server,
-      boolean isPeer) throws AuthenticationFailedException {
-    String keyStorePath = props.getProperty(KEYSTORE_FILE_PATH);
-    if (keyStorePath == null) {
-      throw new AuthenticationFailedException(
-          "PKCSAuthInit: key-store file path property [" + KEYSTORE_FILE_PATH
-              + "] not set.");
-    }
-    String alias = props.getProperty(KEYSTORE_ALIAS);
-    if (alias == null) {
-      throw new AuthenticationFailedException(
-          "PKCSAuthInit: key alias name property [" + KEYSTORE_ALIAS
-              + "] not set.");
-    }
-    String keyStorePass = props.getProperty(KEYSTORE_PASSWORD);
-
-    try {
-      KeyStore ks = KeyStore.getInstance("PKCS12");
-      char[] passPhrase = (keyStorePass != null ? keyStorePass.toCharArray()
-          : null);
-      FileInputStream certificatefile = new FileInputStream(keyStorePath);
-      try {
-        ks.load(certificatefile, passPhrase);
-      }
-      finally {
-        certificatefile.close();
-      }
-
-      Key key = ks.getKey(alias, passPhrase);
-
-      if (key instanceof PrivateKey) {
-
-        PrivateKey privKey = (PrivateKey)key;
-        X509Certificate cert = (X509Certificate)ks.getCertificate(alias);
-        Signature sig = Signature.getInstance(cert.getSigAlgName());
-
-        sig.initSign(privKey);
-        sig.update(alias.getBytes("UTF-8"));
-        byte[] signatureBytes = sig.sign();
-
-        Properties newprops = new Properties();
-        newprops.put(KEYSTORE_ALIAS, alias);
-        newprops.put(SIGNATURE_DATA, signatureBytes);
-        return newprops;
-      }
-      else {
-        throw new AuthenticationFailedException("PKCSAuthInit: "
-            + "Failed to load private key from the given file: " + keyStorePath);
-      }
-    }
-    catch (Exception ex) {
-      throw new AuthenticationFailedException(
-          "PKCSAuthInit: Exception while getting credentials: " + ex, ex);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/PKCSAuthenticator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/PKCSAuthenticator.java b/geode-core/src/test/java/templates/security/PKCSAuthenticator.java
deleted file mode 100755
index 7af7312..0000000
--- a/geode-core/src/test/java/templates/security/PKCSAuthenticator.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package templates.security;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-import com.gemstone.gemfire.security.Authenticator;
-import com.gemstone.gemfire.security.GemFireSecurityException;
-import org.apache.logging.log4j.Logger;
-
-import java.io.FileInputStream;
-import java.security.KeyStore;
-import java.security.NoSuchAlgorithmException;
-import java.security.Principal;
-import java.security.Signature;
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-import java.security.spec.InvalidKeySpecException;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * @author kneeraj
- * 
- */
-public class PKCSAuthenticator implements Authenticator {
-  private static final Logger logger = LogService.getLogger();
-
-  public static final String PUBLIC_KEY_FILE = "security-publickey-filepath";
-
-  public static final String PUBLIC_KEYSTORE_PASSWORD = "security-publickey-pass";
-
-  private String pubKeyFilePath;
-
-  private String pubKeyPass;
-
-  private Map aliasCertificateMap;
-
-  protected LogWriter systemlog;
-
-  protected LogWriter securitylog;
-
-  public static Authenticator create() {
-    return new PKCSAuthenticator();
-  }
-
-  public PKCSAuthenticator() {
-  }
-
-  private void populateMap() {
-    try {
-      KeyStore ks = KeyStore.getInstance("JKS");
-      char[] passPhrase = (pubKeyPass != null ? pubKeyPass.toCharArray() : null);
-      FileInputStream keystorefile = new FileInputStream(this.pubKeyFilePath);
-      try {
-        ks.load(keystorefile, passPhrase);
-      }
-      finally {
-        keystorefile.close();
-      }
-      Enumeration e = ks.aliases();
-      while (e.hasMoreElements()) {
-        Object alias = e.nextElement();
-        Certificate cert = ks.getCertificate((String)alias);
-        if (cert instanceof X509Certificate) {
-          this.aliasCertificateMap.put(alias, cert);
-        }
-      }
-    }
-    catch (Exception e) {
-      throw new AuthenticationFailedException(
-          "Exception while getting public keys: " + e.getMessage(), e);
-    }
-  }
-
-  public void init(Properties systemProps, LogWriter systemLogger,
-      LogWriter securityLogger) throws AuthenticationFailedException {
-    this.systemlog = systemLogger;
-    this.securitylog = securityLogger;
-    this.pubKeyFilePath = systemProps.getProperty(PUBLIC_KEY_FILE);
-    if (this.pubKeyFilePath == null) {
-      throw new AuthenticationFailedException("PKCSAuthenticator: property "
-          + PUBLIC_KEY_FILE + " not specified as the public key file.");
-    }
-    this.pubKeyPass = systemProps.getProperty(PUBLIC_KEYSTORE_PASSWORD);
-    this.aliasCertificateMap = new HashMap();
-    populateMap();
-  }
-
-  private AuthenticationFailedException getException(String exStr,
-      Exception cause) {
-
-    String exMsg = "PKCSAuthenticator: Authentication of client failed due to: "
-        + exStr;
-    if (cause != null) {
-      return new AuthenticationFailedException(exMsg, cause);
-    }
-    else {
-      return new AuthenticationFailedException(exMsg);
-    }
-  }
-
-  private AuthenticationFailedException getException(String exStr) {
-    return getException(exStr, null);
-  }
-
-  private X509Certificate getCertificate(String alias)
-      throws NoSuchAlgorithmException, InvalidKeySpecException {
-    if (this.aliasCertificateMap.containsKey(alias)) {
-      return (X509Certificate)this.aliasCertificateMap.get(alias);
-    }
-    return null;
-  }
-
-  public Principal authenticate(Properties props, DistributedMember member)
-      throws AuthenticationFailedException {
-    String alias = (String)props.get(PKCSAuthInit.KEYSTORE_ALIAS);
-    if (alias == null || alias.length() <= 0) {
-      throw new AuthenticationFailedException("No alias received");
-    }
-    try {
-      X509Certificate cert = getCertificate(alias);
-      if (cert == null) {
-        throw getException("No certificate found for alias:" + alias);
-      }
-      byte[] signatureBytes = (byte[])props.get(PKCSAuthInit.SIGNATURE_DATA);
-      if (signatureBytes == null) {
-        throw getException("signature data property ["
-            + PKCSAuthInit.SIGNATURE_DATA + "] not provided");
-      }
-      Signature sig = Signature.getInstance(cert.getSigAlgName());
-      sig.initVerify(cert);
-      sig.update(alias.getBytes("UTF-8"));
-
-      if (!sig.verify(signatureBytes)) {
-        throw getException("verification of client signature failed");
-      }
-      return new PKCSPrincipal(alias);
-    }
-    catch (Exception ex) {
-      throw getException(ex.toString(), ex);
-    }
-  }
-
-  public void close() {
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/PKCSPrincipal.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/PKCSPrincipal.java b/geode-core/src/test/java/templates/security/PKCSPrincipal.java
deleted file mode 100755
index bc3049f..0000000
--- a/geode-core/src/test/java/templates/security/PKCSPrincipal.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package templates.security;
-
-import java.io.Serializable;
-import java.security.Principal;
-
-/**
- * @author kneeraj
- * 
- */
-public class PKCSPrincipal implements Principal, Serializable {
-
-  private String alias;
-
-  public PKCSPrincipal(String alias) {
-    this.alias = alias;
-  }
-
-  public String getName() {
-    return this.alias;
-  }
-
-  @Override
-  public String toString() {
-    return this.alias;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/PKCSPrincipalTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/PKCSPrincipalTest.java b/geode-core/src/test/java/templates/security/PKCSPrincipalTest.java
deleted file mode 100644
index fc8454c..0000000
--- a/geode-core/src/test/java/templates/security/PKCSPrincipalTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package templates.security;
-
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import org.apache.commons.lang.SerializationUtils;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.io.Serializable;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-/**
- * Unit tests for {@link PKCSPrincipal}
- */
-@Category(UnitTest.class)
-public class PKCSPrincipalTest {
-
-  @Test
-  public void isSerializable() throws Exception {
-    assertThat(PKCSPrincipal.class).isInstanceOf(Serializable.class);
-  }
-
-  @Test
-  public void canBeSerialized() throws Exception {
-    String name = "jsmith";
-    PKCSPrincipal instance = new PKCSPrincipal(name);
-
-    PKCSPrincipal cloned = (PKCSPrincipal) SerializationUtils.clone(instance);
-
-    assertThat(cloned.getName()).isEqualTo(name);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/UserPasswordAuthInit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/UserPasswordAuthInit.java b/geode-core/src/test/java/templates/security/UserPasswordAuthInit.java
deleted file mode 100755
index 1c48773..0000000
--- a/geode-core/src/test/java/templates/security/UserPasswordAuthInit.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package templates.security;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.security.AuthInitialize;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-
-import java.util.Properties;
-
-/**
- * An {@link AuthInitialize} implementation that obtains the user name and
- * password as the credentials from the given set of properties.
- * 
- * To use this class the <c>security-client-auth-init</c> property should be
- * set to the fully qualified name the static <code>create</code> function
- * viz. <code>templates.security.UserPasswordAuthInit.create</code>
- * 
- * @author Sumedh Wale
- * @since 5.5
- */
-public class UserPasswordAuthInit implements AuthInitialize {
-
-  public static final String USER_NAME = "security-username";
-
-  public static final String PASSWORD = "security-password";
-
-  protected LogWriter securitylog;
-
-  protected LogWriter systemlog;
-
-  public static AuthInitialize create() {
-    return new UserPasswordAuthInit();
-  }
-
-  public void init(LogWriter systemLogger, LogWriter securityLogger)
-      throws AuthenticationFailedException {
-    this.systemlog = systemLogger;
-    this.securitylog = securityLogger;
-  }
-
-  public UserPasswordAuthInit() {
-  }
-
-  public Properties getCredentials(Properties props, DistributedMember server,
-      boolean isPeer) throws AuthenticationFailedException {
-
-    Properties newProps = new Properties();
-    String userName = props.getProperty(USER_NAME);
-    if (userName == null) {
-      throw new AuthenticationFailedException(
-          "UserPasswordAuthInit: user name property [" + USER_NAME
-              + "] not set.");
-    }
-    newProps.setProperty(USER_NAME, userName);
-    String passwd = props.getProperty(PASSWORD);
-    // If password is not provided then use empty string as the password.
-    if (passwd == null) {
-      passwd = "";
-    }
-    newProps.setProperty(PASSWORD, passwd);
-    return newProps;
-  }
-
-  public void close() {
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/UsernamePrincipal.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/UsernamePrincipal.java b/geode-core/src/test/java/templates/security/UsernamePrincipal.java
deleted file mode 100755
index 781dd5a..0000000
--- a/geode-core/src/test/java/templates/security/UsernamePrincipal.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package templates.security;
-
-import java.io.Serializable;
-import java.security.Principal;
-
-/**
- * An implementation of {@link Principal} class for a simple user name.
- * 
- * @author Kumar Neeraj
- * @since 5.5
- */
-public class UsernamePrincipal implements Principal, Serializable {
-
-  private final String userName;
-
-  public UsernamePrincipal(String userName) {
-    this.userName = userName;
-  }
-
-  public String getName() {
-    return this.userName;
-  }
-
-  @Override
-  public String toString() {
-    return this.userName;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/UsernamePrincipalTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/UsernamePrincipalTest.java b/geode-core/src/test/java/templates/security/UsernamePrincipalTest.java
deleted file mode 100644
index 023c214..0000000
--- a/geode-core/src/test/java/templates/security/UsernamePrincipalTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package templates.security;
-
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-import org.apache.commons.lang.SerializationUtils;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.io.Serializable;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-/**
- * Unit tests for {@link UsernamePrincipal}
- */
-@Category(UnitTest.class)
-public class UsernamePrincipalTest {
-
-  @Test
-  public void isSerializable() throws Exception {
-    assertThat(UsernamePrincipal.class).isInstanceOf(Serializable.class);
-  }
-
-  @Test
-  public void canBeSerialized() throws Exception {
-    String name = "jsmith";
-    UsernamePrincipal instance = new UsernamePrincipal(name);
-
-    UsernamePrincipal cloned = (UsernamePrincipal) SerializationUtils.clone(instance);
-
-    assertThat(cloned.getName()).isEqualTo(name);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/XmlAuthorization.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/XmlAuthorization.java b/geode-core/src/test/java/templates/security/XmlAuthorization.java
deleted file mode 100755
index 29d94de..0000000
--- a/geode-core/src/test/java/templates/security/XmlAuthorization.java
+++ /dev/null
@@ -1,672 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package templates.security;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.operations.ExecuteFunctionOperationContext;
-import com.gemstone.gemfire.cache.operations.OperationContext;
-import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
-import com.gemstone.gemfire.cache.operations.QueryOperationContext;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.security.AccessControl;
-import com.gemstone.gemfire.security.NotAuthorizedException;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-/**
- * An implementation of the <code>{@link AccessControl}</code> interface that
- * allows authorization using the permissions as specified in the given XML
- * file.
- * 
- * The format of the XML file is specified in <a href="authz5_5.dtd"/>. It
- * implements a role-based authorization at the operation level for each region.
- * Each principal name may be associated with a set of roles. The name of the
- * principal is obtained using the {@link Principal#getName} method and no other
- * information of the principal is utilized. Each role can be provided
- * permissions to execute operations for each region.
- * 
- * The top-level element in the XML is "acl" tag that contains the "role" and
- * "permission" tags. The "role" tag contains the list of users that have been
- * given that role. The name of the role is specified in the "role" attribute
- * and the users are contained in the "user" tags insided the "role" tag.
- * 
- * The "permissions" tag contains the list of operations allowed for a
- * particular region. The role name is specified as the "role" attribute, the
- * list of comma separated region names as the optional "regions" attribute and
- * the operation names are contained in the "operation" tags inside the
- * "permissions" tag. The allowed operation names are: GET, PUT, PUTALL,
- * DESTROY, REGISTER_INTEREST, UNREGISTER_INTEREST, CONTAINS_KEY, KEY_SET,
- * QUERY, EXECUTE_CQ, STOP_CQ, CLOSE_CQ, REGION_CLEAR, REGION_CREATE,
- * REGION_DESTROY. These correspond to the operations in the
- * {@link OperationCode} enumeration with the same name.
- * 
- * When no region name is specified then the operation is allowed for all
- * regions in the cache. Any permissions specified for regions using the
- * "regions" attribute override these permissions. This allows users to provide
- * generic permissions without any region name, and override for specific
- * regions specified using the "regions" attribute. A cache-level operation
- * (e.g. {@link OperationCode#REGION_DESTROY}) specified for a particular region
- * is ignored i.e. the cache-level operations are only applicable when no region
- * name is specified. A {@link OperationCode#QUERY} operation is permitted when
- * either the <code>QUERY</code> permission is provided at the cache-level for
- * the user or when <code>QUERY</code> permission is provided for all the
- * regions that are part of the query string.
- * 
- * Any roles specified in the "user" tag that do not have a specified permission
- * set using the "permission" tags are ignored. When no {@link Principal} is
- * associated with the current connection, then empty user name is used to
- * search for the roles so an empty user name can be used to specify roles of
- * unauthenticated clients (i.e. <code>Everyone</code>).
- * 
- * This sample implementation is useful only for pre-operation checks and should
- * not be used for post-operation authorization since it does nothing useful for
- * post-operation case.
- * 
- * @author Sumedh Wale
- * @since 5.5
- */
-public class XmlAuthorization implements AccessControl {
-
-  public static final String DOC_URI_PROP_NAME = "security-authz-xml-uri";
-
-  private static final String TAG_ROLE = "role";
-
-  private static final String TAG_USER = "user";
-
-  private static final String TAG_PERMS = "permission";
-
-  private static final String TAG_OP = "operation";
-
-  private static final String ATTR_ROLENAME = "name";
-
-  private static final String ATTR_ROLE = "role";
-
-  private static final String ATTR_REGIONS = "regions";
-
-  private static final String ATTR_FUNCTION_IDS = "functionIds";
-
-  private static final String ATTR_FUNCTION_OPTIMIZE_FOR_WRITE =
-    "optimizeForWrite";
-
-  private static final String ATTR_FUNCTION_KEY_SET = "keySet";
-
-  private static String currentDocUri = null;
-
-  private static Map<String, HashSet<String>> userRoles = null;
-
-  private static Map<String, Map<String,
-    Map<OperationCode, FunctionSecurityPrmsHolder>>> rolePermissions = null;
-
-  private static NotAuthorizedException xmlLoadFailure = null;
-
-  private static final Object sync = new Object();
-
-  private static final String EMPTY_VALUE = "";
-
-  private final Map<String, Map<OperationCode,
-    FunctionSecurityPrmsHolder>> allowedOps;
-
-  protected LogWriter logger;
-
-  protected LogWriter securityLogger;
-
-  private XmlAuthorization() {
-
-    this.allowedOps = new HashMap<String, Map<OperationCode,
-        FunctionSecurityPrmsHolder>>();
-    this.logger = null;
-    this.securityLogger = null;
-  }
-
-  /**
-   * Change the region name to a standard format having single '/' as separator
-   * and starting with a '/' as in standard POSIX paths
-   */
-  public static String normalizeRegionName(String regionName) {
-
-    if (regionName == null || regionName.length() == 0) {
-      return EMPTY_VALUE;
-    }
-    char[] resultName = new char[regionName.length() + 1];
-    boolean changed = false;
-    boolean isPrevCharSlash = false;
-    int startIndex;
-    if (regionName.charAt(0) != '/') {
-      changed = true;
-      startIndex = 0;
-    }
-    else {
-      isPrevCharSlash = true;
-      startIndex = 1;
-    }
-    resultName[0] = '/';
-    int resultLength = 1;
-    // Replace all more than one '/'s with a single '/'
-    for (int index = startIndex; index < regionName.length(); ++index) {
-      char currChar = regionName.charAt(index);
-      if (currChar == '/') {
-        if (isPrevCharSlash) {
-          changed = true;
-          continue;
-        }
-        isPrevCharSlash = true;
-      }
-      else {
-        isPrevCharSlash = false;
-      }
-      resultName[resultLength++] = currChar;
-    }
-    // Remove any trailing slash
-    if (resultName[resultLength - 1] == '/') {
-      --resultLength;
-      changed = true;
-    }
-    if (changed) {
-      return new String(resultName, 0, resultLength);
-    }
-    else {
-      return regionName;
-    }
-  }
-
-  /** Get the attribute value for a given attribute name of a node. */
-  private static String getAttributeValue(Node node, String attrName) {
-
-    NamedNodeMap attrMap = node.getAttributes();
-    Node attrNode;
-    if (attrMap != null && (attrNode = attrMap.getNamedItem(attrName)) != null) {
-      return ((Attr)attrNode).getValue();
-    }
-    return EMPTY_VALUE;
-  }
-
-  /** Get the string contained in the first text child of the node. */
-  private static String getNodeValue(Node node) {
-
-    NodeList childNodes = node.getChildNodes();
-    for (int index = 0; index < childNodes.getLength(); index++) {
-      Node childNode = childNodes.item(index);
-      if (childNode.getNodeType() == Node.TEXT_NODE) {
-        return childNode.getNodeValue();
-      }
-    }
-    return EMPTY_VALUE;
-  }
-
-  /**
-   * Public static factory method to create an instance of
-   * <code>XmlAuthorization</code>. The fully qualified name of the class
-   * (<code>templates.security.XmlAuthorization.create</code>)
-   * should be mentioned as the <code>security-client-accessor</code> system
-   * property to enable pre-operation authorization checks as implemented in
-   * this class.
-   * 
-   * @return an object of <code>XmlAuthorization</code> class
-   */
-  public static AccessControl create() {
-
-    return new XmlAuthorization();
-  }
-
-  /**
-   * Cache authorization information for all users statically. This method is
-   * not thread-safe and is should either be invoked only once, or the caller
-   * should take the appropriate locks.
-   * 
-   * @param cache
-   *                reference to the cache object for the distributed system
-   */
-  private static void init(Cache cache) throws NotAuthorizedException {
-
-    LogWriter logger = cache.getLogger();
-    String xmlDocumentUri = (String)cache.getDistributedSystem()
-        .getSecurityProperties().get(DOC_URI_PROP_NAME);
-    try {
-      if (xmlDocumentUri == null) {
-        throw new NotAuthorizedException("No ACL file defined using tag ["
-            + DOC_URI_PROP_NAME + "] in system properties");
-      }
-      if (xmlDocumentUri.equals(XmlAuthorization.currentDocUri)) {
-        if (XmlAuthorization.xmlLoadFailure != null) {
-          throw XmlAuthorization.xmlLoadFailure;
-        }
-        return;
-      }
-      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-      factory.setIgnoringComments(true);
-      factory.setIgnoringElementContentWhitespace(true);
-      factory.setValidating(true);
-      DocumentBuilder builder = factory.newDocumentBuilder();
-      XmlErrorHandler errorHandler = new XmlErrorHandler(logger, xmlDocumentUri);
-      builder.setErrorHandler(errorHandler);
-      builder.setEntityResolver(new AuthzDtdResolver());
-      Document xmlDocument = builder.parse(xmlDocumentUri);
-
-      XmlAuthorization.userRoles = new HashMap<String, HashSet<String>>();
-      XmlAuthorization.rolePermissions = new HashMap<String, Map<String,
-          Map<OperationCode, FunctionSecurityPrmsHolder>>>();
-      NodeList roleUserNodes = xmlDocument.getElementsByTagName(TAG_ROLE);
-      for (int roleIndex = 0; roleIndex < roleUserNodes.getLength();
-          roleIndex++) {
-        Node roleUserNode = roleUserNodes.item(roleIndex);
-        String roleName = getAttributeValue(roleUserNode, ATTR_ROLENAME);
-        NodeList userNodes = roleUserNode.getChildNodes();
-        for (int userIndex = 0; userIndex < userNodes.getLength();
-            userIndex++) {
-          Node userNode = userNodes.item(userIndex);
-          if (userNode.getNodeName() == TAG_USER) {
-            String userName = getNodeValue(userNode);
-            HashSet<String> userRoleSet = XmlAuthorization.userRoles
-                .get(userName);
-            if (userRoleSet == null) {
-              userRoleSet = new HashSet<String>();
-              XmlAuthorization.userRoles.put(userName, userRoleSet);
-            }
-            userRoleSet.add(roleName);
-          }
-          else {
-            throw new SAXParseException("Unknown tag ["
-                + userNode.getNodeName() + "] as child of tag [" + TAG_ROLE
-                + ']', null);
-          }
-        }
-      }
-      NodeList rolePermissionNodes = xmlDocument
-          .getElementsByTagName(TAG_PERMS);
-      for (int permIndex = 0; permIndex < rolePermissionNodes.getLength();
-          permIndex++) {
-        Node rolePermissionNode = rolePermissionNodes.item(permIndex);
-        String roleName = getAttributeValue(rolePermissionNode, ATTR_ROLE);
-        Map<String, Map<OperationCode, FunctionSecurityPrmsHolder>>
-          regionOperationMap = XmlAuthorization.rolePermissions.get(roleName);
-        if (regionOperationMap == null) {
-          regionOperationMap = new HashMap<String,
-            Map<OperationCode, FunctionSecurityPrmsHolder>>();
-          XmlAuthorization.rolePermissions.put(roleName, regionOperationMap);
-        }
-        NodeList operationNodes = rolePermissionNode.getChildNodes();
-        HashMap<OperationCode, FunctionSecurityPrmsHolder> operationMap =
-          new HashMap<OperationCode, FunctionSecurityPrmsHolder>();
-        for (int opIndex = 0; opIndex < operationNodes.getLength(); opIndex++) {
-          Node operationNode = operationNodes.item(opIndex);
-          if (operationNode.getNodeName() == TAG_OP) {
-            String operationName = getNodeValue(operationNode);
-            OperationCode code = OperationCode.parse(operationName);
-            if (code == null) {
-              throw new SAXParseException("Unknown operation [" + operationName
-                  + ']', null);
-            }
-            if (code != OperationCode.EXECUTE_FUNCTION) {
-              operationMap.put(code, null);
-            }
-            else {
-              String optimizeForWrite = getAttributeValue(operationNode,
-                  ATTR_FUNCTION_OPTIMIZE_FOR_WRITE);
-              String functionAttr = getAttributeValue(operationNode,
-                  ATTR_FUNCTION_IDS);
-              String keysAttr = getAttributeValue(operationNode,
-                  ATTR_FUNCTION_KEY_SET);
-
-              Boolean isOptimizeForWrite;
-              HashSet<String> functionIds;
-              HashSet<String> keySet;
-
-              if (optimizeForWrite == null || optimizeForWrite.length() == 0) {
-                isOptimizeForWrite = null;
-              }
-              else {
-                isOptimizeForWrite = Boolean.parseBoolean(optimizeForWrite);
-              }
-
-              if (functionAttr == null || functionAttr.length() == 0) {
-                functionIds = null;
-              }
-              else {
-                String[] functionArray = functionAttr.split(",");
-                functionIds = new HashSet<String>();
-                for (int strIndex = 0; strIndex < functionArray.length;
-                    ++strIndex) {
-                  functionIds.add((functionArray[strIndex]));
-                }
-              }
-
-              if (keysAttr == null || keysAttr.length() == 0) {
-                keySet = null;
-              }
-              else {
-                String[] keySetArray = keysAttr.split(",");
-                keySet = new HashSet<String>();
-                for (int strIndex = 0; strIndex < keySetArray.length;
-                    ++strIndex) {
-                  keySet.add((keySetArray[strIndex]));
-                }
-              }
-              FunctionSecurityPrmsHolder functionContext =
-                new FunctionSecurityPrmsHolder(isOptimizeForWrite,
-                    functionIds, keySet);
-              operationMap.put(code, functionContext);
-            }
-          }
-          else {
-            throw new SAXParseException("Unknown tag ["
-                + operationNode.getNodeName() + "] as child of tag ["
-                + TAG_PERMS + ']', null);
-          }
-        }
-        String regionNames = getAttributeValue(rolePermissionNode, ATTR_REGIONS);
-        if (regionNames == null || regionNames.length() == 0) {
-          regionOperationMap.put(EMPTY_VALUE, operationMap);
-        }
-        else {
-          String[] regionNamesSplit = regionNames.split(",");
-          for (int strIndex = 0; strIndex < regionNamesSplit.length;
-              ++strIndex) {
-            regionOperationMap.put(
-                normalizeRegionName(regionNamesSplit[strIndex]), operationMap);
-          }
-        }
-      }
-      XmlAuthorization.currentDocUri = xmlDocumentUri;
-    }
-    catch (Exception ex) {
-      String exStr;
-      if (ex instanceof NotAuthorizedException) {
-        exStr = ex.getMessage();
-      }
-      else {
-        exStr = ex.getClass().getName() + ": " + ex.getMessage();
-      }
-      logger.warning("XmlAuthorization.init: " + exStr);
-      XmlAuthorization.xmlLoadFailure = new NotAuthorizedException(exStr, ex);
-      throw XmlAuthorization.xmlLoadFailure;
-    }
-  }
-
-  /**
-   * Initialize the <code>XmlAuthorization</code> callback for a client having
-   * the given principal.
-   * 
-   * This method caches the full XML authorization file the first time it is
-   * invoked and caches all the permissions for the provided
-   * <code>principal</code> to speed up lookup the
-   * <code>authorizeOperation</code> calls. The permissions for the principal
-   * are maintained as a {@link Map} of region name to the {@link HashSet} of
-   * operations allowed for that region. A global entry with region name as
-   * empty string is also made for permissions provided for all the regions.
-   * 
-   * @param principal
-   *                the principal associated with the authenticated client
-   * @param cache
-   *                reference to the cache object
-   * @param remoteMember
-   *                the {@link DistributedMember} object for the remote
-   *                authenticated client
-   * 
-   * @throws NotAuthorizedException
-   *                 if some exception condition happens during the
-   *                 initialization while reading the XML; in such a case all
-   *                 subsequent client operations will throw
-   *                 <code>NotAuthorizedException</code>
-   */
-  public void init(Principal principal, DistributedMember remoteMember,
-      Cache cache) throws NotAuthorizedException {
-
-    synchronized (sync) {
-      XmlAuthorization.init(cache);
-    }
-    this.logger = cache.getLogger();
-    this.securityLogger = cache.getSecurityLogger();
-
-    String name;
-    if (principal != null) {
-      name = principal.getName();
-    }
-    else {
-      name = EMPTY_VALUE;
-    }
-    HashSet<String> roles = XmlAuthorization.userRoles.get(name);
-    if (roles != null) {
-      for (String roleName : roles) {
-        Map<String, Map<OperationCode, FunctionSecurityPrmsHolder>>
-          regionOperationMap = XmlAuthorization.rolePermissions.get(roleName);
-        if (regionOperationMap != null) {
-          for (Map.Entry<String, Map<OperationCode, FunctionSecurityPrmsHolder>>
-              regionEntry : regionOperationMap.entrySet()) {
-            String regionName = regionEntry.getKey();
-            Map<OperationCode, FunctionSecurityPrmsHolder> regionOperations =
-              this.allowedOps.get(regionName);
-            if (regionOperations == null) {
-              regionOperations =
-                new HashMap<OperationCode, FunctionSecurityPrmsHolder>();
-              this.allowedOps.put(regionName, regionOperations);
-            }
-            regionOperations.putAll(regionEntry.getValue());
-          }
-        }
-      }
-    }
-  }
-
-  /**
-   * Return true if the given operation is allowed for the cache/region.
-   * 
-   * This looks up the cached permissions of the principal in the map for the
-   * provided region name. If none are found then the global permissions with
-   * empty region name are looked up. The operation is allowed if it is found
-   * this permission list.
-   * 
-   * @param regionName
-   *                When null then it indicates a cache-level operation, else
-   *                the name of the region for the operation.
-   * @param context
-   *                the data required by the operation
-   * 
-   * @return true if the operation is authorized and false otherwise
-   * 
-   */
-  public boolean authorizeOperation(String regionName,
-      final OperationContext context) {
-
-    Map<OperationCode, FunctionSecurityPrmsHolder> operationMap;
-    // Check GET permissions for updates from server to client
-    if (context.isClientUpdate()) {
-      operationMap = this.allowedOps.get(regionName);
-      if (operationMap == null && regionName.length() > 0) {
-        operationMap = this.allowedOps.get(EMPTY_VALUE);
-      }
-      if (operationMap != null) {
-        return operationMap.containsKey(OperationCode.GET);
-      }
-      return false;
-    }
-
-    OperationCode opCode = context.getOperationCode();
-    if (opCode.isQuery() || opCode.isExecuteCQ() || opCode.isCloseCQ()
-        || opCode.isStopCQ()) {
-      // First check if cache-level permission has been provided
-      operationMap = this.allowedOps.get(EMPTY_VALUE);
-      boolean globalPermission = (operationMap != null && operationMap
-          .containsKey(opCode));
-      Set<String> regionNames = ((QueryOperationContext)context)
-          .getRegionNames();
-      if (regionNames == null || regionNames.size() == 0) {
-        return globalPermission;
-      }
-      for (String r : regionNames) {
-        regionName = normalizeRegionName(r);
-        operationMap = this.allowedOps.get(regionName);
-        if (operationMap == null) {
-          if (!globalPermission) {
-            return false;
-          }
-        }
-        else if (!operationMap.containsKey(opCode)) {
-          return false;
-        }
-      }
-      return true;
-    }
-
-    final String normalizedRegionName = normalizeRegionName(regionName);
-    operationMap = this.allowedOps.get(normalizedRegionName);
-    if (operationMap == null && normalizedRegionName.length() > 0) {
-      operationMap = this.allowedOps.get(EMPTY_VALUE);
-    }
-    if (operationMap != null) {
-      if (context.getOperationCode() != OperationCode.EXECUTE_FUNCTION) {
-        return operationMap.containsKey(context.getOperationCode());
-      }else {
-        if (!operationMap.containsKey(context.getOperationCode())) {
-          return false;
-        }
-        else {
-          if (!context.isPostOperation()) {
-            FunctionSecurityPrmsHolder functionParameter =
-              operationMap.get(
-                context.getOperationCode());
-            ExecuteFunctionOperationContext functionContext =
-              (ExecuteFunctionOperationContext)context;
-            // OnRegion execution
-            if (functionContext.getRegionName() != null) {
-              if (functionParameter.isOptimizeForWrite() != null
-                  && functionParameter.isOptimizeForWrite().booleanValue()
-                    != functionContext.isOptimizeForWrite()) {
-                return false;
-              }
-              if (functionParameter.getFunctionIds() != null
-                  && !functionParameter.getFunctionIds().contains(
-                      functionContext.getFunctionId())) {
-                return false;
-              }
-              if (functionParameter.getKeySet() != null
-                  && functionContext.getKeySet() != null) {
-                if (functionContext.getKeySet().containsAll(
-                    functionParameter.getKeySet())) {
-                  return false;
-                }
-              }
-              return true;
-            }
-            else {// On Server execution
-              if (functionParameter.getFunctionIds() != null
-                  && !functionParameter.getFunctionIds().contains(
-                      functionContext.getFunctionId())) {
-                return false;
-              }
-              return true;
-            }
-          }
-          else {
-            ExecuteFunctionOperationContext functionContext =
-              (ExecuteFunctionOperationContext)context;
-            FunctionSecurityPrmsHolder functionParameter = operationMap.get(
-                context.getOperationCode());
-            if (functionContext.getRegionName() != null) {
-              if (functionContext.getResult() instanceof ArrayList
-                  && functionParameter.getKeySet() != null) {
-                ArrayList<String> resultList = (ArrayList)functionContext
-                    .getResult();
-                HashSet<String> nonAllowedKeys = functionParameter.getKeySet();
-                if (resultList.containsAll(nonAllowedKeys)) {
-                  return false;
-                }
-              }
-              return true;
-            }
-            else {
-              ArrayList<String> resultList = (ArrayList)functionContext
-                  .getResult();
-              final String inSecureItem = "Insecure item";
-              if (resultList.contains(inSecureItem)) {
-                return false;
-              }
-              return true;
-            }
-          }
-        }
-      }
-    }
-    return false;
-  }
-
-  /**
-   * Clears the cached information for this principal.
-   */
-  public void close() {
-
-    this.allowedOps.clear();
-  }
-
-  /**
-   * Clear all the statically cached information.
-   */
-  public static void clear() {
-
-    XmlAuthorization.currentDocUri = null;
-    if (XmlAuthorization.userRoles != null) {
-      XmlAuthorization.userRoles.clear();
-      XmlAuthorization.userRoles = null;
-    }
-    if (XmlAuthorization.rolePermissions != null) {
-      XmlAuthorization.rolePermissions.clear();
-      XmlAuthorization.rolePermissions = null;
-    }
-    XmlAuthorization.xmlLoadFailure = null;
-  }
-  
-  private static class AuthzDtdResolver implements EntityResolver {
-    Pattern authzPattern = Pattern.compile("authz.*\\.dtd");
-
-    @Override
-    public InputSource resolveEntity(String publicId, String systemId)
-        throws SAXException, IOException {
-      try {
-        Matcher matcher = authzPattern.matcher(systemId);
-        if(matcher.find()) {
-          String dtdName = matcher.group(0);
-          InputStream stream = XmlAuthorization.class.getResourceAsStream(dtdName);
-          return new InputSource(stream);
-        }
-      } catch(Exception e) {
-        //do nothing, use the default resolver
-      }
-      
-      return null;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/XmlErrorHandler.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/XmlErrorHandler.java b/geode-core/src/test/java/templates/security/XmlErrorHandler.java
deleted file mode 100755
index 1326548..0000000
--- a/geode-core/src/test/java/templates/security/XmlErrorHandler.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package templates.security;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.internal.logging.LogService;
-import org.apache.logging.log4j.Logger;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * Implementation of {@link ErrorHandler} interface to handle validation errors
- * while XML parsing.
- * 
- * This throws back exceptions raised for <code>error</code> and
- * <code>fatalError</code> cases while a {@link LogWriter#warning(String)} level
- * logging is done for the <code>warning</code> case.
- * 
- * @author Sumedh Wale
- * @since 5.5
- */
-public class XmlErrorHandler implements ErrorHandler {
-  private static final Logger logger = LogService.getLogger();
-
-  private LogWriter logWriter;
-
-  private String xmlFileName;
-
-  public XmlErrorHandler(LogWriter logWriter, String xmlFileName) {
-
-    this.logWriter = logWriter;
-    this.xmlFileName = xmlFileName;
-  }
-
-  /**
-   * Throws back the exception with the name of the XML file and the position
-   * where the exception occurred.
-   */
-  public void error(SAXParseException exception) throws SAXException {
-    throw new SAXParseException("Error while parsing XML at line "
-        + exception.getLineNumber() + " column " + exception.getColumnNumber()
-        + ": " + exception.getMessage(), null, exception);
-  }
-
-  /**
-   * Throws back the exception with the name of the XML file and the position
-   * where the exception occurred.
-   */
-  public void fatalError(SAXParseException exception) throws SAXException {
-    throw new SAXParseException("Fatal error while parsing XML at line "
-        + exception.getLineNumber() + " column " + exception.getColumnNumber()
-        + ": " + exception.getMessage(), null, exception);
-  }
-
-  /**
-   * Log the exception at {@link LogWriter#warning(String)} level with XML
-   * filename and the position of exception in the file.
-   */
-  public void warning(SAXParseException exception) throws SAXException {
-    this.logWriter.warning("Warning while parsing XML [" + this.xmlFileName
-        + "] at line " + exception.getLineNumber() + " column "
-        + exception.getColumnNumber() + ": " + exception.getMessage(), exception);
-  }
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-dummy.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-dummy.xml b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-dummy.xml
new file mode 100644
index 0000000..de0cd17
--- /dev/null
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-dummy.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<!DOCTYPE acl PUBLIC "-//GemStone Systems, Inc.//GemFire XML Authorization 1.0//EN"
+        "com/gemstone/gemfire/security/templates/authz6_0.dtd" >
+<acl>
+
+  <role name="reader">
+    <user>reader0</user>
+    <user>reader1</user>
+    <user>reader2</user>
+    <user>root</user>
+    <user>admin</user>
+    <user>administrator</user>
+  </role>
+
+  <role name="writer">
+    <user>writer0</user>
+    <user>writer1</user>
+    <user>writer2</user>
+    <user>root</user>
+    <user>admin</user>
+    <user>administrator</user>
+  </role>
+
+  <role name="cacheOps">
+    <user>root</user>
+    <user>admin</user>
+    <user>administrator</user>
+  </role>
+
+  <role name="queryRegions">
+    <user>reader3</user>
+    <user>reader4</user>
+  </role>
+
+  <role name="registerInterest">
+    <user>reader5</user>
+    <user>reader6</user>
+  </role>
+
+  <role name="unregisterInterest">
+    <user>reader5</user>
+    <user>reader7</user>
+  </role>
+  
+  <role name="onRegionFunctionExecutor">
+    <user>reader8</user>
+  </role>
+  
+  <role name="onServerFunctionExecutor">
+    <user>reader9</user>
+  </role>
+
+  <permission role="cacheOps">
+    <operation>QUERY</operation>
+    <operation>EXECUTE_CQ</operation>
+    <operation>STOP_CQ</operation>
+    <operation>CLOSE_CQ</operation>
+    <operation>REGION_CREATE</operation>
+    <operation>REGION_DESTROY</operation>
+  </permission>
+
+  <permission role="reader">
+    <operation>GET</operation>
+    <operation>REGISTER_INTEREST</operation>
+    <operation>UNREGISTER_INTEREST</operation>
+    <operation>KEY_SET</operation>
+    <operation>CONTAINS_KEY</operation>
+    <operation>EXECUTE_FUNCTION</operation>
+  </permission>
+
+  <permission role="writer">
+    <operation>PUT</operation>
+    <operation>PUTALL</operation>
+    <operation>DESTROY</operation>
+    <operation>INVALIDATE</operation>
+    <operation>REGION_CLEAR</operation>
+  </permission>
+
+  <permission role="queryRegions" regions="//Portfolios,/Positions/,AuthRegion">
+    <operation>QUERY</operation>
+    <operation>EXECUTE_CQ</operation>
+    <operation>STOP_CQ</operation>
+    <operation>CLOSE_CQ</operation>
+  </permission>
+  
+  <permission role="onRegionFunctionExecutor" regions="secureRegion,Positions">
+    <operation>PUT</operation>
+    <operation functionIds="SecureFunction,OptimizationFunction" optimizeForWrite="false" keySet="KEY-0,KEY-1">EXECUTE_FUNCTION</operation>
+  </permission>
+  
+  <permission role="onServerFunctionExecutor" >
+    <operation>PUT</operation>
+    <operation functionIds="SecureFunction,OptimizationFunction">EXECUTE_FUNCTION</operation>
+  </permission>
+
+  <permission role="registerInterest">
+    <operation>REGISTER_INTEREST</operation>
+    <operation>GET</operation>
+  </permission>
+
+  <permission role="unregisterInterest">
+    <operation>UNREGISTER_INTEREST</operation>
+    <operation>GET</operation>
+  </permission>
+
+</acl>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-ldap.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-ldap.xml b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-ldap.xml
new file mode 100644
index 0000000..cdfd478
--- /dev/null
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-ldap.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<!DOCTYPE acl PUBLIC "-//GemStone Systems, Inc.//GemFire XML Authorization 1.0//EN"
+        "com/gemstone/gemfire/security/templates/authz5_5.dtd" >
+<acl>
+
+  <role name="reader">
+    <user>gemfire1</user>
+    <user>gemfire2</user>
+    <user>gemfire3</user>
+    <user>gemfire4</user>
+    <user>gemfire5</user>
+  </role>
+
+  <role name="writer">
+    <user>gemfire1</user>
+    <user>gemfire2</user>
+    <user>gemfire6</user>
+    <user>gemfire7</user>
+    <user>gemfire8</user>
+  </role>
+
+  <role name="cacheOps">
+    <user>gemfire1</user>
+    <user>gemfire2</user>
+  </role>
+
+  <role name="queryRegions">
+    <user>gemfire9</user>
+    <user>gemfire10</user>
+  </role>
+
+  <permission role="cacheOps">
+    <operation>QUERY</operation>
+    <operation>EXECUTE_CQ</operation>
+    <operation>STOP_CQ</operation>
+    <operation>CLOSE_CQ</operation>
+    <operation>REGION_CREATE</operation>
+    <operation>REGION_DESTROY</operation>
+  </permission>
+
+  <permission role="reader">
+    <operation>GET</operation>
+    <operation>REGISTER_INTEREST</operation>
+    <operation>UNREGISTER_INTEREST</operation>
+    <operation>KEY_SET</operation>
+    <operation>CONTAINS_KEY</operation>
+    <operation>EXECUTE_FUNCTION</operation>
+  </permission>
+
+  <permission role="writer">
+    <operation>PUT</operation>
+    <operation>PUTALL</operation>
+    <operation>DESTROY</operation>
+    <operation>INVALIDATE</operation>
+    <operation>REGION_CLEAR</operation>
+  </permission>
+
+  <permission role="queryRegions" regions="Portfolios,/Positions//,/AuthRegion">
+    <operation>QUERY</operation>
+    <operation>EXECUTE_CQ</operation>
+    <operation>STOP_CQ</operation>
+    <operation>CLOSE_CQ</operation>
+  </permission>
+
+</acl>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-multiUser-dummy.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-multiUser-dummy.xml b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-multiUser-dummy.xml
new file mode 100644
index 0000000..f64eb2e
--- /dev/null
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-multiUser-dummy.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<!DOCTYPE acl PUBLIC "-//GemStone Systems, Inc.//GemFire XML Authorization 1.0//EN"
+        "com/gemstone/gemfire/security/templates/authz6_0.dtd" >
+<acl>
+
+  <role name="reader">
+    <user>user1</user>
+    <user>user2</user>
+    <user>root</user>
+    <user>admin</user>
+    <user>administrator</user>
+  </role>
+
+  <role name="writer">
+    <user>user3</user>
+    <user>user4</user>
+    <user>root</user>
+    <user>admin</user>
+    <user>administrator</user>
+  </role>
+  
+  <role name="cacheOps">
+    <user>user1</user>
+    <user>user2</user>
+    <user>root</user>
+    <user>admin</user>
+    <user>administrator</user>
+  </role>
+
+  <role name="queryRegions">
+    <user>user5</user>
+    <user>user6</user>
+  </role>
+
+  <role name="registerInterest">
+    <user>user7</user>
+    <user>user8</user>
+  </role>
+
+  <role name="unregisterInterest">
+    <user>user5</user>
+    <user>user7</user>
+  </role>
+  
+  <permission role="cacheOps">
+    <operation>QUERY</operation>
+    <operation>EXECUTE_CQ</operation>
+    <operation>STOP_CQ</operation>
+    <operation>CLOSE_CQ</operation>
+  </permission>
+
+  <permission role="reader">
+    <operation>GET</operation>
+    <operation>REGISTER_INTEREST</operation>
+    <operation>UNREGISTER_INTEREST</operation>
+    <operation>KEY_SET</operation>
+    <operation>CONTAINS_KEY</operation>
+    <operation>EXECUTE_FUNCTION</operation>
+  </permission>
+
+  <permission role="writer">
+    <operation>PUT</operation>
+    <operation>PUTALL</operation>
+    <operation>DESTROY</operation>
+    <operation>INVALIDATE</operation>
+    <operation>REGION_CLEAR</operation>
+  </permission>
+
+  <permission role="queryRegions" regions="//Portfolios,/Positions/,AuthRegion">
+    <operation>QUERY</operation>
+    <operation>EXECUTE_CQ</operation>
+    <operation>STOP_CQ</operation>
+    <operation>CLOSE_CQ</operation>
+  </permission>
+  
+  <permission role="registerInterest">
+    <operation>REGISTER_INTEREST</operation>
+    <operation>GET</operation>
+  </permission>
+
+  <permission role="unregisterInterest">
+    <operation>UNREGISTER_INTEREST</operation>
+    <operation>GET</operation>
+  </permission>
+
+</acl>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-multiUser-ldap.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-multiUser-ldap.xml b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-multiUser-ldap.xml
new file mode 100644
index 0000000..5469972
--- /dev/null
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/authz-multiUser-ldap.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<!DOCTYPE acl PUBLIC "-//GemStone Systems, Inc.//GemFire XML Authorization 1.0//EN"
+        "com/gemstone/gemfire/security/templates/authz5_5.dtd" >
+<acl>
+
+  <role name="reader">
+    <user>gemfire1</user>
+    <user>gemfire2</user>
+    <user>gemfire3</user>
+    <user>gemfire4</user>
+    <user>gemfire5</user>
+  </role>
+
+  <role name="writer">
+    <user>gemfire1</user>
+    <user>gemfire2</user>
+    <user>gemfire6</user>
+    <user>gemfire7</user>
+    <user>gemfire8</user>
+  </role>
+
+  <role name="cacheOps">
+    <user>gemfire1</user>
+    <user>gemfire2</user>
+  </role>
+
+  <role name="queryRegions">
+    <user>gemfire9</user>
+    <user>gemfire10</user>
+  </role>
+
+  <permission role="cacheOps">
+    <operation>QUERY</operation>
+    <operation>EXECUTE_CQ</operation>
+    <operation>STOP_CQ</operation>
+    <operation>CLOSE_CQ</operation>
+  </permission>
+
+  <permission role="reader">
+    <operation>GET</operation>
+    <operation>REGISTER_INTEREST</operation>
+    <operation>UNREGISTER_INTEREST</operation>
+    <operation>KEY_SET</operation>
+    <operation>CONTAINS_KEY</operation>
+    <operation>EXECUTE_FUNCTION</operation>
+  </permission>
+
+  <permission role="writer">
+    <operation>PUT</operation>
+    <operation>PUTALL</operation>
+    <operation>DESTROY</operation>
+    <operation>INVALIDATE</operation>
+    <operation>REGION_CLEAR</operation>
+  </permission>
+
+  <permission role="queryRegions" regions="Portfolios,/Positions//,/AuthRegion">
+    <operation>QUERY</operation>
+    <operation>EXECUTE_CQ</operation>
+    <operation>STOP_CQ</operation>
+    <operation>CLOSE_CQ</operation>
+  </permission>
+
+</acl>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire1.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire1.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire1.keystore
new file mode 100644
index 0000000..15270bb
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire1.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire10.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire10.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire10.keystore
new file mode 100644
index 0000000..bb6f827
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire10.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire11.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire11.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire11.keystore
new file mode 100644
index 0000000..6839c74
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire11.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire2.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire2.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire2.keystore
new file mode 100644
index 0000000..fcb7ab8
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire2.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire3.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire3.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire3.keystore
new file mode 100644
index 0000000..19afc4b
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire3.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire4.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire4.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire4.keystore
new file mode 100644
index 0000000..c65916a
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire4.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire5.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire5.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire5.keystore
new file mode 100644
index 0000000..d738cca
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire5.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire6.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire6.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire6.keystore
new file mode 100644
index 0000000..1fea2d3
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire6.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire7.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire7.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire7.keystore
new file mode 100644
index 0000000..7a3187c
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire7.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire8.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire8.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire8.keystore
new file mode 100644
index 0000000..a3bb886
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire8.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire9.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire9.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire9.keystore
new file mode 100644
index 0000000..674b4e6
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/gemfire9.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire1.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire1.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire1.keystore
new file mode 100644
index 0000000..4f9120c
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire1.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire10.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire10.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire10.keystore
new file mode 100644
index 0000000..0bd97d7
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire10.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire11.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire11.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire11.keystore
new file mode 100644
index 0000000..62ae3c7
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire11.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire2.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire2.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire2.keystore
new file mode 100644
index 0000000..c65bc81
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire2.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire3.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire3.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire3.keystore
new file mode 100644
index 0000000..b0796e0
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire3.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire4.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire4.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire4.keystore
new file mode 100644
index 0000000..9c94018
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire4.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire5.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire5.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire5.keystore
new file mode 100644
index 0000000..33f6937
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire5.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire6.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire6.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire6.keystore
new file mode 100644
index 0000000..568f674
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire6.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire7.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire7.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire7.keystore
new file mode 100644
index 0000000..80e2d80
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire7.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire8.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire8.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire8.keystore
new file mode 100644
index 0000000..a15def5
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire8.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire9.keystore
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire9.keystore b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire9.keystore
new file mode 100644
index 0000000..72087f3
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/gemfire9.keystore differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/publickeyfile
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/publickeyfile b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/publickeyfile
new file mode 100644
index 0000000..1b13872
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/ibm/publickeyfile differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/publickeyfile
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/publickeyfile b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/publickeyfile
new file mode 100644
index 0000000..9c2daa3
Binary files /dev/null and b/geode-core/src/test/resources/com/gemstone/gemfire/security/generator/keys/publickeyfile differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/resources/com/gemstone/gemfire/security/templates/authz5_5.dtd
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/security/templates/authz5_5.dtd b/geode-core/src/test/resources/com/gemstone/gemfire/security/templates/authz5_5.dtd
new file mode 100644
index 0000000..7080c0e
--- /dev/null
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/security/templates/authz5_5.dtd
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
+
+This is the XML DTD for the GemFire sample XML based authorization callback
+in com.gemstone.gemfire.security.templates.XmlAuthorization.
+
+All XMLs must include a DOCTYPE of the following form:
+
+  <!DOCTYPE acl PUBLIC
+    "-//GemStone Systems, Inc.//GemFire XML Authorization 1.0//EN"
+    "http://www.gemstone.com/dtd/authz5_5.dtd">
+
+The contents of a declarative XML file correspond to APIs found in the
+
+                      com.gemstone.gemfire.security.AccessControl
+
+package. The sample implementation may be used to specify access control
+policies.
+
+-->
+
+<!--
+
+The following conventions apply to all GemFire sample authorization
+XML file elements unless indicated otherwise.
+
+- In elements that contain PCDATA, leading and trailing whitespace in
+  the data may be ignored.
+
+- In elements whose value is an "enumerated type", the value is case
+  sensitive.
+
+-->
+
+
+<!--
+The "acl" element is the root element of the authorization file.
+This element contains the role to user mappings and role to permissions
+mapping on a per region per operation basis.
+-->
+
+<!ELEMENT acl (role+,permission+)>
+
+<!--
+The "role" element contains the set of users that have the permissions of
+given role. A user can be present in more than one "role" elements in
+which case the union of the permissions to all those roles determines
+the full set of permissions to be given to the user.
+-->
+
+<!ELEMENT role (user*)>
+<!ATTLIST role
+  name CDATA #REQUIRED
+>
+
+<!--
+The "user" element is contained within the "role" element and contains
+the name of a user having the permissions of that role.
+-->
+
+<!ELEMENT user (#PCDATA)>
+
+<!--
+The "permission" element specifies the list of operations that are allowed
+for a particular role in the given regions as provided in the optional
+"regions" attribute. The value of "regions" attribute should be a comma
+separated list of region names for which permissions are to be provided.
+If no "regions" attribute is provided then those permissions are provided
+for all the other regions (i.e. other than those that have been explicitly
+specified). Permissions for cache level operations REGION_DESTROY,
+REGION_CREATE, QUERY and CQ operations should be specified with no "regions"
+attribute. If cache-level permission is not provided for QUERY or CQ operations
+then the permission for all the region names in the query string is checked.
+-->
+
+<!ELEMENT permission (operation*)>
+<!ATTLIST permission
+  role CDATA #REQUIRED
+  regions CDATA #IMPLIED
+>
+
+
+<!--
+The operation should be one of the following strings:
+ GET, PUT, PUTALL, DESTROY, REGISTER_INTEREST, UNREGISTER_INTEREST,
+ CONTAINS_KEY, KEY_SET, QUERY, EXECUTE_CQ, STOP_CQ, CLOSE_CQ, REGION_CLEAR,
+ REGION_CREATE, REGION_DESTROY
+-->
+<!ELEMENT operation (#PCDATA)>


[17/54] [abbrv] incubator-geode git commit: GEODE-1053: Adding "filter" on Function Rest Invoction Refactoring of RestAPIOnRegionFunctionExecutionDUnitTest.java RestAPIsOnGroupsFunctionExecutionDUnitTest.java RestAPIsOnMembersFunctionExecutionDUnitTest.j

Posted by je...@apache.org.
GEODE-1053: Adding "filter" on Function Rest Invoction
Refactoring of RestAPIOnRegionFunctionExecutionDUnitTest.java RestAPIsOnGroupsFunctionExecutionDUnitTest.java RestAPIsOnMembersFunctionExecutionDUnitTest.java.
Updating dependency-versions.properties http-core and http-client


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f2175524
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f2175524
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f2175524

Branch: refs/heads/feature/GEODE-17-2
Commit: f2175524491fcab3206b718d6de0164d4fed8906
Parents: 22ab270
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Mar 9 19:58:06 2016 +1100
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Wed Mar 16 05:53:57 2016 +1100

----------------------------------------------------------------------
 .../rest/internal/web/RestFunctionTemplate.java |  23 +
 ...stAPIOnRegionFunctionExecutionDUnitTest.java | 488 +++++--------------
 .../web/controllers/RestAPITestBase.java        | 182 +++++--
 ...tAPIsOnGroupsFunctionExecutionDUnitTest.java | 334 ++++---------
 ...APIsOnMembersFunctionExecutionDUnitTest.java | 314 +++---------
 .../controllers/FunctionAccessController.java   | 195 ++++----
 .../rest/internal/web/util/ArrayUtils.java      |  12 +-
 gradle/dependency-versions.properties           |   4 +-
 8 files changed, 554 insertions(+), 998 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f2175524/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestFunctionTemplate.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestFunctionTemplate.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestFunctionTemplate.java
new file mode 100644
index 0000000..8cd0638
--- /dev/null
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestFunctionTemplate.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.rest.internal.web;
+
+import com.gemstone.gemfire.cache.execute.FunctionAdapter;
+
+public abstract class RestFunctionTemplate extends FunctionAdapter {
+  public int invocationCount = 0;
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f2175524/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
index 4a958ce..63bd9fa 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java
@@ -16,28 +16,8 @@
  */
 package com.gemstone.gemfire.rest.internal.web.controllers;
 
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
-
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-
 import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.execute.Function;
+import com.gemstone.gemfire.cache.*;
 import com.gemstone.gemfire.cache.execute.FunctionContext;
 import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
@@ -47,44 +27,24 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.cache.PartitionAttributesImpl;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionTestHelper;
-import com.gemstone.gemfire.internal.cache.functions.DistributedRegionFunction;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.rest.internal.web.RestFunctionTemplate;
+import org.apache.http.client.methods.CloseableHttpResponse;
+
+import java.io.Serializable;
+import java.util.*;
 
 /**
  * Dunit Test to validate OnRegion function execution with REST APIs
- * 
+ *
  * @author Nilkanth Patel
  * @since 8.0
  */
 
 public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
 
-  private static final long serialVersionUID = 1L;
-
-  public static final String REGION_NAME = "DistributedRegionFunctionExecutionDUnitTest";
-
-  public static final String PR_REGION_NAME = "samplePRRegion";
-
-  public static Region region = null;
-
-  public static List<String> restURLs = new ArrayList<String>();
-
-  public static String restEndPoint = null;
-
-  public static String getRestEndPoint() {
-    return restEndPoint;
-  }
-
-  public static void setRestEndPoint(String restEndPoint) {
-    RestAPIOnRegionFunctionExecutionDUnitTest.restEndPoint = restEndPoint;
-  }
-
-  public static final Function function = new DistributedRegionFunction();
+  private final String REPLICATE_REGION_NAME = "sampleRRegion";
 
-  public static final Function functionWithNoResultThrowsException = new MyFunctionException();
+  private final String PR_REGION_NAME = "samplePRRegion";
 
   public RestAPIOnRegionFunctionExecutionDUnitTest(String name) {
     super(name);
@@ -92,52 +52,10 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
 
   public void setUp() throws Exception {
     super.setUp();
-    final Host host = Host.getHost(0);
-  }
-
-  static class FunctionWithNoLastResult implements Function {
-    private static final long serialVersionUID = -1032915440862585532L;
-    public static final String Id = "FunctionWithNoLastResult";
-    public static int invocationCount;
-
-    @Override
-    public void execute(FunctionContext context) {
-      invocationCount++;
-      InternalDistributedSystem
-          .getConnectedInstance()
-          .getLogWriter()
-          .info(
-              "<ExpectedException action=add>did not send last result"
-                  + "</ExpectedException>");
-      context.getResultSender().sendResult(
-          (Serializable) context.getArguments());
-    }
-
-    @Override
-    public String getId() {
-      return Id;
-    }
-
-    @Override
-    public boolean hasResult() {
-      return true;
-    }
-
-    @Override
-    public boolean optimizeForWrite() {
-      return false;
-    }
-
-    @Override
-    public boolean isHA() {
-      return false;
-    }
   }
 
-  static class SampleFunction implements Function {
-    private static final long serialVersionUID = -1032915440862585534L;
+  private class SampleFunction extends RestFunctionTemplate {
     public static final String Id = "SampleFunction";
-    public static int invocationCount;
 
     @Override
     public void execute(FunctionContext context) {
@@ -145,7 +63,7 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
       if (context instanceof RegionFunctionContext) {
         RegionFunctionContext rfContext = (RegionFunctionContext) context;
         rfContext.getDataSet().getCache().getLogger()
-            .info("Executing function :  TestFunction2.execute " + rfContext);
+            .info("Executing function :  SampleFunction.execute(hasResult=true) with filter: " + rfContext.getFilter() + "  " + rfContext);
         if (rfContext.getArguments() instanceof Boolean) {
           /* return rfContext.getArguments(); */
           if (hasResult()) {
@@ -157,7 +75,7 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
                 .getCache()
                 .getLogger()
                 .info(
-                    "Executing function :  TestFunction2.execute " + rfContext);
+                    "Executing function :  SampleFunction.execute(hasResult=false) " + rfContext);
             while (true && !rfContext.getDataSet().isDestroyed()) {
               rfContext.getDataSet().getCache().getLogger()
                   .info("For Bug43513 ");
@@ -172,7 +90,7 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
         } else if (rfContext.getArguments() instanceof String) {
           String key = (String) rfContext.getArguments();
           if (key.equals("TestingTimeOut")) { // for test
-                                              // PRFunctionExecutionDUnitTest#testRemoteMultiKeyExecution_timeout
+            // PRFunctionExecutionDUnitTest#testRemoteMultiKeyExecution_timeout
             try {
               Thread.sleep(2000);
             } catch (InterruptedException e) {
@@ -208,7 +126,7 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
           /* return vals; */
         } else if (rfContext.getArguments() instanceof HashMap) {
           HashMap putData = (HashMap) rfContext.getArguments();
-          for (Iterator i = putData.entrySet().iterator(); i.hasNext();) {
+          for (Iterator i = putData.entrySet().iterator(); i.hasNext(); ) {
             Map.Entry me = (Map.Entry) i.next();
             rfContext.getDataSet().put(me.getKey(), me.getValue());
           }
@@ -222,7 +140,7 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
         } else {
           DistributedSystem ds = InternalDistributedSystem.getAnyInstance();
           LogWriter logger = ds.getLogWriter();
-          logger.info("Executing in TestFunction on Server : "
+          logger.info("Executing in SampleFunction on Server : "
               + ds.getDistributedMember() + "with Context : " + context);
           while (ds.isConnected()) {
             logger
@@ -249,7 +167,7 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
 
     @Override
     public boolean optimizeForWrite() {
-      return false;
+      return true;
     }
 
     @Override
@@ -258,54 +176,22 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
     }
   }
 
-  private int getInvocationCount(VM vm) {
-    return (Integer) vm.invoke(new SerializableCallable() {
-      /**
-       * 
-       */
-      private static final long serialVersionUID = 1L;
-
-      @Override
-      public Object call() throws Exception {
-        SampleFunction f = (SampleFunction) FunctionService
-            .getFunction(SampleFunction.Id);
-        int count = f.invocationCount;
-        f.invocationCount = 0;
-        return count;
-      }
-    });
-  }
-
-  private void verifyAndResetInvocationCount(VM vm, final int count) {
-    vm.invoke(new SerializableCallable() {
-      /**
-       * 
-       */
-      private static final long serialVersionUID = 1L;
-
-      @Override
-      public Object call() throws Exception {
-        SampleFunction f = (SampleFunction) FunctionService
-            .getFunction(SampleFunction.Id);
-        assertEquals(count, f.invocationCount);
-        // assert succeeded, reset count
-        f.invocationCount = 0;
-        return null;
-      }
-    });
+  private void verifyAndResetInvocationCount(final int count) {
+    SampleFunction f = (SampleFunction) FunctionService
+        .getFunction(SampleFunction.Id);
+    assertEquals(count, f.invocationCount);
   }
 
-  public static void createPeer(DataPolicy policy) {
+  private void createPeer(DataPolicy policy) {
     AttributesFactory factory = new AttributesFactory();
     factory.setScope(Scope.DISTRIBUTED_ACK);
     factory.setDataPolicy(policy);
-    assertNotNull(cache);
-    region = cache.createRegion(REGION_NAME, factory.create());
+    Region region = CacheFactory.getAnyInstance().createRegion(REPLICATE_REGION_NAME, factory.create());
     com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Region Created :" + region);
     assertNotNull(region);
   }
 
-  public static boolean createPeerWithPR() {
+  private boolean createPeerWithPR() {
     RegionAttributes ra = PartitionedRegionTestHelper.createRegionAttrsForPR(0,
         10);
     AttributesFactory raf = new AttributesFactory(ra);
@@ -314,41 +200,19 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
     pa.setTotalNumBuckets(17);
     raf.setPartitionAttributes(pa);
 
-    if (cache == null || cache.isClosed()) {
-      // Cache not available
-    }
-    assertNotNull(cache);
-
-    region = cache.createRegion(PR_REGION_NAME, raf.create());
+    Region region = CacheFactory.getAnyInstance().createRegion(PR_REGION_NAME, raf.create());
     com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Region Created :" + region);
     assertNotNull(region);
     return Boolean.TRUE;
   }
 
-  public static void populateRegion() {
-    assertNotNull(cache);
-    region = cache.getRegion(REGION_NAME);
-    assertNotNull(region);
-    for (int i = 1; i <= 200; i++) {
-      region.put("execKey-" + i, new Integer(i));
-    }
-  }
-
-  public static void populatePRRegion() {
-    assertNotNull(cache);
-    region = cache.getRegion(REGION_NAME);
-
-    PartitionedRegion pr = (PartitionedRegion) cache.getRegion(PR_REGION_NAME);
+  private void populatePRRegion() {
+    PartitionedRegion pr = (PartitionedRegion) CacheFactory.getAnyInstance().getRegion(PR_REGION_NAME);
     DistributedSystem.setThreadsSocketPolicy(false);
-    final HashSet testKeys = new HashSet();
 
     for (int i = (pr.getTotalNumberOfBuckets() * 3); i > 0; i--) {
-      testKeys.add("execKey-" + i);
-    }
-    int j = 0;
-    for (Iterator i = testKeys.iterator(); i.hasNext();) {
-      Integer val = new Integer(j++);
-      pr.put(i.next(), val);
+      Integer val = new Integer(i + 1);
+      pr.put("execKey-" + i, val);
     }
     // Assert there is data in each bucket
     for (int bid = 0; bid < pr.getTotalNumberOfBuckets(); bid++) {
@@ -356,9 +220,8 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
     }
   }
 
-  public static void populateRRRegion() {
-    assertNotNull(cache);
-    region = cache.getRegion(REGION_NAME);
+  private void populateRRRegion() {
+    Region region = CacheFactory.getAnyInstance().getRegion(REPLICATE_REGION_NAME);
     assertNotNull(region);
 
     final HashSet testKeys = new HashSet();
@@ -366,163 +229,48 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
       testKeys.add("execKey-" + i);
     }
     int j = 0;
-    for (Iterator i = testKeys.iterator(); i.hasNext();) {
+    for (Iterator i = testKeys.iterator(); i.hasNext(); ) {
       Integer val = new Integer(j++);
       region.put(i.next(), val);
     }
 
   }
 
-  public static void executeFunction_NoLastResult(String regionName) {
-
-    try {
-      CloseableHttpClient httpclient = HttpClients.createDefault();
-      CloseableHttpResponse response = null;
-      Random randomGenerator = new Random();
-      int index = randomGenerator.nextInt(restURLs.size());
-      HttpPost post = new HttpPost(restURLs.get(index) + "/functions/"
-          + "FunctionWithNoLastResult" + "?onRegion=" + regionName);
-      post.addHeader("Content-Type", "application/json");
-      post.addHeader("Accept", "application/json");
-      response = httpclient.execute(post);
-    } catch (Exception e) {
-      throw new RuntimeException("unexpected exception", e);
-    }
-
-  }
-
-  public static void executeFunctionThroughRestCall(String regionName) {
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Entering executeFunctionThroughRestCall");
-    try {
-      CloseableHttpClient httpclient = HttpClients.createDefault();
-      CloseableHttpResponse response = null;
-      Random randomGenerator = new Random();
-      int index = randomGenerator.nextInt(restURLs.size());
-      
-      HttpPost post = new HttpPost(restURLs.get(index) + "/functions/"
-          + "SampleFunction" + "?onRegion=" + regionName);
-      post.addHeader("Content-Type", "application/json");
-      post.addHeader("Accept", "application/json");
-      
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Request: POST " + post.toString());
-      response = httpclient.execute(post);
-      com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Response: POST " + response.toString());
-      
-      assertEquals(response.getStatusLine().getStatusCode(), 200);
-      assertNotNull(response.getEntity());
-    } catch (Exception e) {
-      throw new RuntimeException("unexpected exception", e);
-    }
-    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("Exiting executeFunctionThroughRestCall");
-
-  }
-
-  private void registerFunction(VM vm) {
-    vm.invoke(new SerializableCallable() {
-      private static final long serialVersionUID = 1L;
-      @Override
-      public Object call() throws Exception {
-        FunctionService.registerFunction(new FunctionWithNoLastResult());
-        return null;
-      }
-    });
-  }
-
-  private void registerSampleFunction(VM vm) {
-    vm.invoke(new SerializableCallable() {
-      private static final long serialVersionUID = 1L;
-
-      @Override
-      public Object call() throws Exception {
-        FunctionService.registerFunction(new SampleFunction());
-        return null;
-      }
-    });
+  @Override
+  protected String getFunctionID() {
+    return SampleFunction.Id;
   }
 
-  public void __testOnRegionExecutionOnDataPolicyEmpty_NoLastResult() {
-    // Step-1 : create cache on each VM, this will start HTTP service in
-    // embedded mode and deploy REST APIs web app on it.
-
-    fail("This test is trying to invoke non existent methods");
-//    String url1 = (String) vm3.invoke(() -> createCacheInVm( vm3 ));
-//    restURLs.add(url1);
-//
-//    String url2 = (String) vm0.invoke(() -> createCacheInVm( vm0 ));
-//    restURLs.add(url2);
-//
-//    String url3 = (String) vm1.invoke(() -> createCacheInVm( vm1 ));
-//    restURLs.add(url3);
-//
-//    String url4 = (String) vm2.invoke(() -> createCacheInVm( vm2 ));
-//    restURLs.add(url4);
-
-    // Step-2: Register function in all VMs
-    registerFunction(vm3);
-    registerFunction(vm0);
-    registerFunction(vm1);
-    registerFunction(vm2);
-
-    // Step-3: Create and configure Region on all VMs
-    vm3.invoke(() -> createPeer( DataPolicy.EMPTY ));
-    vm0.invoke(() -> createPeer( DataPolicy.REPLICATE ));
-    vm1.invoke(() -> createPeer( DataPolicy.REPLICATE ));
-    vm2.invoke(() -> createPeer( DataPolicy.REPLICATE ));
-
-    // Step-4 : Do some puts on region created earlier
-    vm3.invoke(() -> populateRegion());
-
-    // add expected exception to avoid suspect strings
-    final IgnoredException ex = IgnoredException.addIgnoredException("did not send last result");
-
-    // Step-5 : Execute function randomly (in iteration) on all available (per
-    // VM) REST end-points and verify its result
-    for (int i = 0; i < 10; i++) {
-      executeFunction_NoLastResult(REGION_NAME);
-    }
-    ex.remove();
+  private void createCacheAndRegisterFunction() {
+    restURLs.add(vm0.invoke(() -> createCacheWithGroups(vm0, null)));
+    restURLs.add(vm1.invoke(() -> createCacheWithGroups(vm1, null)));
+    restURLs.add(vm2.invoke(() -> createCacheWithGroups(vm2, null)));
+    restURLs.add(vm3.invoke(() -> createCacheWithGroups(vm3, null)));
 
-    restURLs.clear();
+    vm0.invoke(() -> FunctionService.registerFunction(new SampleFunction()));
+    vm1.invoke(() -> FunctionService.registerFunction(new SampleFunction()));
+    vm2.invoke(() -> FunctionService.registerFunction(new SampleFunction()));
+    vm3.invoke(() -> FunctionService.registerFunction(new SampleFunction()));
   }
 
-  public void testOnRegionExecutionWithRR() {
-    // Step-1 : create cache on each VM, this will start HTTP service in
-    // embedded mode and deploy REST APIs web app on it.
-    //
-    String url1 = (String) vm3.invoke(() -> RestAPITestBase.createCache( vm3 ));
-    restURLs.add(url1);
+  public void testOnRegionExecutionWithReplicateRegion() {
+    createCacheAndRegisterFunction();
 
-    String url2 = (String) vm0.invoke(() -> RestAPITestBase.createCache( vm0 ));
-    restURLs.add(url2);
+    vm3.invoke(() -> createPeer(DataPolicy.EMPTY));
+    vm0.invoke(() -> createPeer(DataPolicy.REPLICATE));
+    vm1.invoke(() -> createPeer(DataPolicy.REPLICATE));
+    vm2.invoke(() -> createPeer(DataPolicy.REPLICATE));
 
-    String url3 = (String) vm1.invoke(() -> RestAPITestBase.createCache( vm1 ));
-    restURLs.add(url3);
-
-    String url4 = (String) vm2.invoke(() -> RestAPITestBase.createCache( vm2 ));
-    restURLs.add(url4);
-
-    // Step-2: Register function in all VMs
-    registerSampleFunction(vm3);
-    registerSampleFunction(vm0);
-    registerSampleFunction(vm1);
-    registerSampleFunction(vm2);
-
-    // Step-3: Create and configure PR on all VMs
-    vm3.invoke(() -> createPeer( DataPolicy.EMPTY ));
-    vm0.invoke(() -> createPeer( DataPolicy.REPLICATE ));
-    vm1.invoke(() -> createPeer( DataPolicy.REPLICATE ));
-    vm2.invoke(() -> createPeer( DataPolicy.REPLICATE ));
-
-    // Step-4 : Do some puts in Replicated region on vm3
     vm3.invoke(() -> populateRRRegion());
 
-    // Step-5 : Execute function randomly (in iteration) on all available (per
-    // VM) REST end-points and verify its result
-    executeFunctionThroughRestCall(REGION_NAME);
-    int c0 = getInvocationCount(vm0);
-    int c1 = getInvocationCount(vm1);
-    int c2 = getInvocationCount(vm2);
-    int c3 = getInvocationCount(vm3);
+    CloseableHttpResponse response = executeFunctionThroughRestCall("SampleFunction", REPLICATE_REGION_NAME, null, null, null, null);
+    assertEquals(200, response.getStatusLine().getStatusCode());
+    assertNotNull(response.getEntity());
+
+    int c0 = vm0.invoke(() -> getInvocationCount());
+    int c1 = vm1.invoke(() -> getInvocationCount());
+    int c2 = vm2.invoke(() -> getInvocationCount());
+    int c3 = vm3.invoke(() -> getInvocationCount());
 
     assertEquals(1, c0 + c1 + c2 + c3);
 
@@ -530,88 +278,84 @@ public class RestAPIOnRegionFunctionExecutionDUnitTest extends RestAPITestBase {
     restURLs.clear();
   }
 
-  public void testOnRegionExecutionWithPR() throws Exception {
-    final String rName = getUniqueName();
-
-    // Step-1 : create cache on each VM, this will start HTTP service in
-    // embedded mode and deploy REST APIs web app on it.
-    String url1 = (String) vm3.invoke(() -> RestAPITestBase.createCache( vm3 ));
-    restURLs.add(url1);
-
-    String url2 = (String) vm0.invoke(() -> RestAPITestBase.createCache( vm0 ));
-    restURLs.add(url2);
+  public void testOnRegionExecutionWithPartitionRegion() throws Exception {
+    createCacheAndRegisterFunction();
 
-    String url3 = (String) vm1.invoke(() -> RestAPITestBase.createCache( vm1 ));
-    restURLs.add(url3);
-
-    String url4 = (String) vm2.invoke(() -> RestAPITestBase.createCache( vm2 ));
-    restURLs.add(url4);
-
-    // Step-2: Register function in all VMs
-    registerSampleFunction(vm3);
-    registerSampleFunction(vm0);
-    registerSampleFunction(vm1);
-    registerSampleFunction(vm2);
-
-    // Step-3: Create and configure PR on all VMs
-    vm3.invoke(() -> createPeerWithPR());
     vm0.invoke(() -> createPeerWithPR());
     vm1.invoke(() -> createPeerWithPR());
     vm2.invoke(() -> createPeerWithPR());
+    vm3.invoke(() -> createPeerWithPR());
 
-    // Step-4: Do some puts such that data exist in each bucket
     vm3.invoke(() -> populatePRRegion());
 
-    // Step-5 : Execute function randomly (in iteration) on all available (per
-    // VM) REST end-points and verify its result
-    executeFunctionThroughRestCall(PR_REGION_NAME);
-
-    // Assert that each node has executed the function once.
-    verifyAndResetInvocationCount(vm0, 1);
-    verifyAndResetInvocationCount(vm1, 1);
-    verifyAndResetInvocationCount(vm2, 1);
-    verifyAndResetInvocationCount(vm3, 1);
+    CloseableHttpResponse response = executeFunctionThroughRestCall("SampleFunction", PR_REGION_NAME, null, null, null, null);
+    assertEquals(200, response.getStatusLine().getStatusCode());
+    assertNotNull(response.getEntity());
 
-    int c0 = getInvocationCount(vm0);
-    int c1 = getInvocationCount(vm1);
-    int c2 = getInvocationCount(vm2);
-    int c3 = getInvocationCount(vm3);
+    vm0.invoke(() -> verifyAndResetInvocationCount(1));
+    vm1.invoke(() -> verifyAndResetInvocationCount(1));
+    vm2.invoke(() -> verifyAndResetInvocationCount(1));
+    vm3.invoke(() -> verifyAndResetInvocationCount(1));
 
     restURLs.clear();
   }
 
-}
+  public void testOnRegionWithFilterExecutionWithPartitionRegion() throws Exception {
+    createCacheAndRegisterFunction();
 
-class MyFunctionException implements Function {
+    vm0.invoke(() -> createPeerWithPR());
+    vm1.invoke(() -> createPeerWithPR());
+    vm2.invoke(() -> createPeerWithPR());
+    vm3.invoke(() -> createPeerWithPR());
 
-  /**
-   * 
-   */
-  private static final long serialVersionUID = 1L;
+    vm3.invoke(() -> populatePRRegion());
 
-  @Override
-  public void execute(FunctionContext context) {
-    throw new RuntimeException("failure");
-  }
+    CloseableHttpResponse response = executeFunctionThroughRestCall("SampleFunction", PR_REGION_NAME, "key2", null, null, null);
+    assertEquals(200, response.getStatusLine().getStatusCode());
+    assertNotNull(response.getEntity());
 
-  @Override
-  public String getId() {
-    return this.getClass().getName();
-  }
+    int c0 = vm0.invoke(() -> getInvocationCount());
+    int c1 = vm1.invoke(() -> getInvocationCount());
+    int c2 = vm2.invoke(() -> getInvocationCount());
+    int c3 = vm3.invoke(() -> getInvocationCount());
 
-  @Override
-  public boolean hasResult() {
-    return true;
-  }
+    assertEquals(1, (c0 + c1 + c2 + c3));
 
-  @Override
-  public boolean isHA() {
-    return false;
+    restURLs.clear();
   }
 
-  @Override
-  public boolean optimizeForWrite() {
-    return false;
-  }
+//  public void testOnRegionWithFilterExecutionWithPartitionRegionJsonArgs() throws Exception {
+//    createCacheAndRegisterFunction();
+//
+//    vm0.invoke(() -> createPeerWithPR());
+//    vm1.invoke(() -> createPeerWithPR());
+//    vm2.invoke(() -> createPeerWithPR());
+//    vm3.invoke(() -> createPeerWithPR());
+//
+//    vm3.invoke(() -> populatePRRegion());
+//
+//    String jsonBody = "["
+//        + "{\"@type\": \"double\",\"@value\": 210}"
+//        + ",{\"@type\":\"com.gemstone.gemfire.web.rest.domain.Item\","
+//        + "\"itemNo\":\"599\",\"description\":\"Part X Free on Bumper Offer\","
+//        + "\"quantity\":\"2\","
+//        + "\"unitprice\":\"5\","
+//        + "\"totalprice\":\"10.00\"}"
+//        + "]";
+//
+//    CloseableHttpResponse response = executeFunctionThroughRestCall("SampleFunction", PR_REGION_NAME, null, jsonBody, null, null);
+//    assertEquals(200, response.getStatusLine().getStatusCode());
+//    assertNotNull(response.getEntity());
+//
+//    // Assert that only 1 node has executed the function.
+//    int c0 = vm0.invoke(() -> getInvocationCount());
+//    int c1 = vm1.invoke(() -> getInvocationCount());
+//    int c2 = vm2.invoke(() -> getInvocationCount());
+//    int c3 = vm3.invoke(() -> getInvocationCount());
+//
+//    assertEquals(1, (c0 + c1 + c2 + c3));
+//
+//    restURLs.clear();
+//  }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f2175524/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
index 3709475..0d1fee8 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
@@ -16,36 +16,48 @@
  */
 package com.gemstone.gemfire.rest.internal.web.controllers;
 
-import java.util.Properties;
-
 import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.GemFireVersion;
+import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.management.internal.AgentUtil;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.rest.internal.web.RestFunctionTemplate;
+import com.gemstone.gemfire.test.dunit.*;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.json.JSONArray;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.Random;
 
 public class RestAPITestBase extends DistributedTestCase {
-  private static final long serialVersionUID = 1L;
-  public static Cache cache = null;
+  protected Cache cache = null;
+  protected List<String> restURLs = new ArrayList();
   VM vm0 = null;
   VM vm1 = null;
   VM vm2 = null;
   VM vm3 = null;
-  
+
   public RestAPITestBase(String name) {
     super(name);
   }
-  
-  
+
   @Override
   public void setUp() throws Exception {
     super.setUp();
@@ -54,7 +66,7 @@ public class RestAPITestBase extends DistributedTestCase {
     if (agentUtil.findWarLocation("geode-web-api") == null) {
       fail("unable to locate geode-web-api WAR file");
     }
-    Wait.pause(5000);
+    Wait.pause(1000);
     final Host host = Host.getHost(0);
     vm0 = host.getVM(0);
     vm1 = host.getVM(1);
@@ -62,9 +74,9 @@ public class RestAPITestBase extends DistributedTestCase {
     vm3 = host.getVM(3);
     // gradle sets a property telling us where the build is located
     final String buildDir = System.getProperty("geode.build.dir", System.getProperty("user.dir"));
-    Invoke.invokeInEveryVM(()-> System.setProperty("geode.build.dir", buildDir));
-  }  
-  
+    Invoke.invokeInEveryVM(() -> System.setProperty("geode.build.dir", buildDir));
+  }
+
   /**
    * close the clients and teh servers
    */
@@ -78,56 +90,122 @@ public class RestAPITestBase extends DistributedTestCase {
 
   /**
    * close the cache
-   * 
    */
-  public static void closeCache() {
+  private void closeCache() {
     if (cache != null && !cache.isClosed()) {
       cache.close();
       cache.getDistributedSystem().disconnect();
     }
   }
-  
-  protected static String createCache(VM currentVM) {
-    
-    RestAPITestBase test = new RestAPITestBase(getTestMethodName());
-    
-    final String hostName = currentVM.getHost().getHostName();
-    final int serverPort = AvailablePortHelper.getRandomAvailableTCPPort();
-    
-    Properties props = new Properties();
-    
-    props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
-    props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, hostName);
-    props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME,String.valueOf(serverPort));
-    
 
-    InternalDistributedSystem ds = test.getSystem(props);
-    cache = CacheFactory.create(ds);
-    return "http://" + hostName + ":" + serverPort + "/gemfire-api/v1";
-    
-  }
-  
-  public static String createCacheWithGroups (VM vm, final String groups, final String regionName ) {
+  public String createCacheWithGroups(VM vm, final String groups) {
     RestAPITestBase test = new RestAPITestBase(getTestMethodName());
-    
-    final String hostName = vm.getHost().getHostName(); 
+
+    final String hostName = vm.getHost().getHostName();
     final int serverPort = AvailablePortHelper.getRandomAvailableTCPPort();
-    
+
     Properties props = new Properties();
-    
-    if(groups != null) {
+
+    if (groups != null) {
       props.put("groups", groups);
     }
-    
+
     props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
     props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, hostName);
     props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(serverPort));
-    
+
     InternalDistributedSystem ds = test.getSystem(props);
     cache = CacheFactory.create(ds);
-    
-    String restEndPoint =  "http://" + hostName + ":" + serverPort + "/gemfire-api/v1";
-    return restEndPoint; 
+
+    String restEndPoint = "http://" + hostName + ":" + serverPort + "/gemfire-api/v1";
+    return restEndPoint;
+  }
+
+  protected int getInvocationCount() {
+    RestFunctionTemplate function = (RestFunctionTemplate) FunctionService.getFunction(getFunctionID());
+    return function.invocationCount;
+  }
+
+  protected CloseableHttpResponse executeFunctionThroughRestCall(String function, String regionName, String filter, String jsonBody, String groups,
+      String members) {
+    LogWriterUtils.getLogWriter().info("Entering executeFunctionThroughRestCall");
+    try {
+      CloseableHttpClient httpclient = HttpClients.createDefault();
+      Random randomGenerator = new Random();
+      int restURLIndex = randomGenerator.nextInt(restURLs.size());
+
+      HttpPost post = createHTTPPost(function, regionName, filter, restURLIndex, groups, members, jsonBody);
+
+      LogWriterUtils.getLogWriter().info("Request: POST " + post.toString());
+      return httpclient.execute(post);
+    } catch (Exception e) {
+      throw new RuntimeException("unexpected exception", e);
+    }
   }
-  
+
+  private HttpPost createHTTPPost(String function, String regionName, String filter, int restUrlIndex, String groups, String members, String jsonBody) {
+    StringBuilder restURLBuilder = new StringBuilder();
+    restURLBuilder.append(restURLs.get(restUrlIndex) + "/functions/" + function+"?");
+    if (regionName != null && !regionName.isEmpty()) {
+      restURLBuilder.append("onRegion=" + regionName);
+    }
+    else if (groups != null && !groups.isEmpty()) {
+      restURLBuilder.append("onGroups=" + groups);
+    }
+    else if (members != null && !members.isEmpty()) {
+      restURLBuilder.append("onMembers=" + members);
+    }
+    if (filter != null && !filter.isEmpty()) {
+      restURLBuilder.append("&filter=" + filter);
+    }
+    String restString = restURLBuilder.toString();
+    HttpPost post = new HttpPost(restString);
+    post.addHeader("Content-Type", "application/json");
+    post.addHeader("Accept", "application/json");
+    if (jsonBody != null && !StringUtils.isEmpty(jsonBody)) {
+      StringEntity jsonStringEntity = new StringEntity(jsonBody, ContentType.DEFAULT_TEXT);
+      post.setEntity(jsonStringEntity);
+    }
+    return post;
+  }
+
+  protected String getFunctionID() {
+    throw new RuntimeException("This method should be overridden");
+  }
+
+  protected void assertHttpResponse(CloseableHttpResponse response, int httpCode, int expectedServerResponses) {
+    assertEquals(httpCode, response.getStatusLine().getStatusCode());
+
+    //verify response has body flag, expected is true.
+    assertNotNull(response.getEntity());
+    try {
+      String httpResponseString = processHttpResponse(response);
+      response.close();
+      LogWriterUtils.getLogWriter().info("Response : " + httpResponseString);
+      //verify function execution result
+      JSONArray resultArray = new JSONArray(httpResponseString);
+      assertEquals(resultArray.length(), expectedServerResponses);
+    } catch (Exception e) {
+      e.printStackTrace();
+    }
+  }
+
+  private String processHttpResponse(HttpResponse response) {
+    try {
+      HttpEntity entity = response.getEntity();
+      InputStream content = entity.getContent();
+      BufferedReader reader = new BufferedReader(new InputStreamReader(
+          content));
+      String line;
+      StringBuffer sb = new StringBuffer();
+      while ((line = reader.readLine()) != null) {
+        sb.append(line);
+      }
+      return sb.toString();
+    } catch (IOException e) {
+      LogWriterUtils.getLogWriter().error("Error in processing Http Response", e);
+    }
+    return "";
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f2175524/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java
index 1ae3810..5acaccb 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnGroupsFunctionExecutionDUnitTest.java
@@ -16,62 +16,119 @@
  */
 package com.gemstone.gemfire.rest.internal.web.controllers;
 
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Random;
-
-import org.apache.http.HttpEntity;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.json.JSONArray;
-
-import com.gemstone.gemfire.cache.execute.Function;
 import com.gemstone.gemfire.cache.execute.FunctionContext;
 import com.gemstone.gemfire.cache.execute.FunctionService;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
+import com.gemstone.gemfire.rest.internal.web.RestFunctionTemplate;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.VM;
+import org.apache.http.client.methods.CloseableHttpResponse;
+
+import java.util.ArrayList;
+import java.util.Collections;
 
 public class RestAPIsOnGroupsFunctionExecutionDUnitTest extends RestAPITestBase {
 
   public RestAPIsOnGroupsFunctionExecutionDUnitTest(String name) {
     super(name);
   }
-  
+
   public void setUp() throws Exception {
     super.setUp();
-    final Host host = Host.getHost(0);
   }
-  
-  private void registerFunction(VM vm) {
-    vm.invoke(new SerializableCallable() {
-      private static final long serialVersionUID = 1L;
-      
-      @Override
-      public Object call() throws Exception {
-        FunctionService.registerFunction(new OnGroupsFunction());
-        return null;
-      }
-    });
+
+  @Override
+  protected String getFunctionID() {
+    return OnGroupsFunction.Id;
+  }
+
+  private void resetInvocationCount() {
+    OnGroupsFunction f = (OnGroupsFunction) FunctionService.getFunction(OnGroupsFunction.Id);
+    f.invocationCount = 0;
+  }
+
+  public void testonGroupsExecutionOnAllMembers() {
+    setupCacheWithGroupsAndFunction();
+
+    for (int i = 0; i < 10; i++) {
+      CloseableHttpResponse response = executeFunctionThroughRestCall("OnGroupsFunction", null, null, null, "g0,g1", null);
+      assertHttpResponse(response, 200, 3);
+    }
+
+    int c0 = vm0.invoke(() -> getInvocationCount());
+    int c1 = vm1.invoke(() -> getInvocationCount());
+    int c2 = vm2.invoke(() -> getInvocationCount());
+
+    assertEquals(30, (c0 + c1 + c2));
+
+    restURLs.clear();
+  }
+
+  private void setupCacheWithGroupsAndFunction() {
+    restURLs.add(vm0.invoke(() -> createCacheWithGroups(vm0, "g0,gm")));
+    restURLs.add(vm1.invoke(() -> createCacheWithGroups(vm1, "g1")));
+    restURLs.add(vm2.invoke(() -> createCacheWithGroups(vm2, "g0,g1")));
+
+    vm0.invoke(() -> FunctionService.registerFunction(new OnGroupsFunction()));
+    vm1.invoke(() -> FunctionService.registerFunction(new OnGroupsFunction()));
+    vm2.invoke(() -> FunctionService.registerFunction(new OnGroupsFunction()));
   }
-  
-  static class OnGroupsFunction implements Function {
-    private static final long serialVersionUID = -1032915440862585532L;
+
+  public void testonGroupsExecutionOnAllMembersWithFilter() {
+    setupCacheWithGroupsAndFunction();
+
+    //Execute function randomly (in iteration) on all available (per VM) REST end-points and verify its result
+    for (int i = 0; i < 10; i++) {
+      CloseableHttpResponse response = executeFunctionThroughRestCall("OnGroupsFunction", null, "someKey", null, "g1", null);
+      assertHttpResponse(response, 500, 0);
+    }
+
+    int c0 = vm0.invoke(() -> getInvocationCount());
+    int c1 = vm1.invoke(() -> getInvocationCount());
+    int c2 = vm2.invoke(() -> getInvocationCount());
+
+    assertEquals(0, (c0 + c1 + c2));
+    restURLs.clear();
+  }
+
+  public void testBasicP2PFunctionSelectedGroup() {
+    setupCacheWithGroupsAndFunction();
+
+    //Step-3 : Execute function randomly (in iteration) on all available (per VM) REST end-points and verify its result
+    for (int i = 0; i < 5; i++) {
+      CloseableHttpResponse response = executeFunctionThroughRestCall("OnGroupsFunction", null, null, null, "no%20such%20group", null);
+      assertHttpResponse(response, 500, 0);
+    }
+    int c0 = vm0.invoke(() -> getInvocationCount());
+    int c1 = vm1.invoke(() -> getInvocationCount());
+    int c2 = vm2.invoke(() -> getInvocationCount());
+
+    assertEquals(0, (c0 + c1 + c2));
+
+    for (int i = 0; i < 5; i++) {
+
+      CloseableHttpResponse response = executeFunctionThroughRestCall("OnGroupsFunction", null, null, null, "gm", null);
+      assertHttpResponse(response, 200, 1);
+    }
+
+    c0 = vm0.invoke(() -> getInvocationCount());
+    c1 = vm1.invoke(() -> getInvocationCount());
+    c2 = vm2.invoke(() -> getInvocationCount());
+
+    assertEquals(5, (c0 + c1 + c2));
+
+    vm0.invoke(() -> resetInvocationCount());
+    vm1.invoke(() -> resetInvocationCount());
+    vm2.invoke(() -> resetInvocationCount());
+
+    restURLs.clear();
+  }
+
+  private class OnGroupsFunction extends RestFunctionTemplate {
     public static final String Id = "OnGroupsFunction";
-    public static int invocationCount;
 
     @Override
     public void execute(FunctionContext context) {
-      LogWriterUtils.getLogWriter().fine("SWAP:1:executing OnGroupsFunction:"+invocationCount);
+      LogWriterUtils.getLogWriter().fine("SWAP:1:executing OnGroupsFunction:" + invocationCount);
       InternalDistributedSystem ds = InternalDistributedSystem.getConnectedInstance();
       invocationCount++;
       ArrayList<String> l = (ArrayList<String>) context.getArguments();
@@ -101,206 +158,5 @@ public class RestAPIsOnGroupsFunctionExecutionDUnitTest extends RestAPITestBase
       return false;
     }
   }
-  
-  
-  public static void executeFunctionThroughRestCall(List<String> restURLs) {
-    Random randomGenerator = new Random();
-    int index = randomGenerator.nextInt(restURLs.size());
-    
-    try {
-      
-      CloseableHttpClient httpclient = HttpClients.createDefault();
-      CloseableHttpResponse response = null;
-      HttpPost post = new HttpPost(restURLs.get(index) + "/functions/OnGroupsFunction?onGroups=g0,g1");
-      post.addHeader("Content-Type", "application/json");
-      post.addHeader("Accept", "application/json");
-      LogWriterUtils.getLogWriter().info("Request POST : " + post.toString());
-      response = httpclient.execute(post);
-      
-      HttpEntity entity = response.getEntity();
-      InputStream content = entity.getContent();
-      BufferedReader reader = new BufferedReader(new InputStreamReader(
-          content));
-      String line;
-      StringBuffer sb = new StringBuffer();
-      while ((line = reader.readLine()) != null) {
-        sb.append(line);
-      }      
-      LogWriterUtils.getLogWriter().info("Response : " + sb.toString());
-    
-      //verify response status code. expected status code is 200 OK.
-      assertEquals(response.getStatusLine().getStatusCode(), 200);
-      
-      
-      //verify response hasbody flag, expected is true.
-      assertNotNull(response.getEntity());
-      
-      
-      response.close();
-      
-      //verify function execution result
-      JSONArray resultArray = new JSONArray(sb.toString());
-      assertEquals(resultArray.length(), 3);
-      
-    } catch (Exception e) {
-      throw new RuntimeException("unexpected exception", e);
-    }
-    
-  }
-  
-  public static void executeFunctionOnMemberThroughRestCall(List<String> restURLs) {
-    Random randomGenerator = new Random();
-    int index = randomGenerator.nextInt(restURLs.size());
-    
-    //Testcase-1: Executing function on non-existing group. 
-    final IgnoredException ex = IgnoredException.addIgnoredException("com.gemstone.gemfire.cache.execute.FunctionException");
-    try {
-      
-      CloseableHttpClient httpclient = HttpClients.createDefault();
-      CloseableHttpResponse response = null;
-      HttpPost post = new HttpPost(restURLs.get(index) + "/functions/OnGroupsFunction?onGroups=no%20such%20group");
-      post.addHeader("Content-Type", "application/json");
-      post.addHeader("Accept", "application/json");
-      response = httpclient.execute(post);
-      
-      if ( response.getStatusLine().getStatusCode() == 200 ) {
-        fail("FunctionException expected : no member(s) are found belonging to the provided group(s)");
-      }
-    } catch (Exception e) {
-      throw new RuntimeException("unexpected exception", e);
-      
-    } finally {
-      ex.remove();
-    }
-    
-    //Testcase-2: Executing function on group with args.
-    
-    final String FUNCTION_ARGS1 =  "{"
-        +        "\"@type\": \"string\","
-        +        "\"@value\": \"gm\""
-        +    "}";
-    
-    try {
-     
-      CloseableHttpClient httpclient = HttpClients.createDefault();
-      CloseableHttpResponse response = null;
-      HttpPost post = new HttpPost(restURLs.get(index) + "/functions/OnGroupsFunction?onGroups=gm");
-      post.addHeader("Content-Type", "application/json");
-      post.addHeader("Accept", "application/json");
-      response = httpclient.execute(post);
-      
-      //verify response status code
-      assertEquals(response.getStatusLine().getStatusCode(), 200);
-      
-      //verify response hasbody flag
-      assertNotNull(response.getEntity());
-      
-      HttpEntity entity = response.getEntity();
-      InputStream content = entity.getContent();
-      BufferedReader reader = new BufferedReader(new InputStreamReader(
-          content));
-      String line;
-      StringBuffer sb = new StringBuffer();
-      while ((line = reader.readLine()) != null) {
-        sb.append(line);
-      }
-      response.close();
-      
-      //verify function execution result
-      JSONArray resultArray = new JSONArray(sb.toString());
-      assertEquals(resultArray.length(), 1);
-      
-    } catch (Exception e) {
-      throw new RuntimeException("unexpected exception", e);
-    }   
-  }
-  
-  private void verifyAndResetInvocationCount(VM vm, final int count) {
-    vm.invoke(new SerializableCallable() {
-      @Override
-      public Object call() throws Exception {
-        OnGroupsFunction f = (OnGroupsFunction) FunctionService.getFunction(OnGroupsFunction.Id);
-        assertEquals(count, f.invocationCount);
-        // assert succeeded, reset count
-        f.invocationCount = 0;
-        return null;
-      }
-    });
-  }
-  
-  private void resetInvocationCount(VM vm) {
-    vm.invoke(new SerializableCallable() {
-      @Override
-      public Object call() throws Exception {
-        OnGroupsFunction f = (OnGroupsFunction) FunctionService.getFunction(OnGroupsFunction.Id);
-        f.invocationCount = 0;
-        return null;
-      }
-    });
-  }
-  
-  public void testonGroupsExecutionOnAllMembers() {
-  
-    List<String> restURLs = new ArrayList<String>(); 
-    //Step-1 : create cache on each VM, this will start HTTP service in embedded mode and deploy REST APIs web app on it.
-    //         Create and configure Region on all VMs. Add Rest end-point into the restURLs list.
-    
-    String url1 = (String)vm0.invoke(() -> RestAPITestBase.createCacheWithGroups(vm0, "g0,gm", "TEST_REGION"));
-    restURLs.add(url1);
-    
-    String url2 = (String)vm1.invoke(() -> RestAPITestBase.createCacheWithGroups(vm1, "g1", "TEST_REGION" ));
-    restURLs.add(url2);
-    
-    String url3 = (String)vm2.invoke(() -> RestAPITestBase.createCacheWithGroups(vm2, "g0,g1", "TEST_REGION"));
-    restURLs.add(url3);
-    
-    //Step-2: Register function in all VMs
-    registerFunction(vm0);
-    registerFunction(vm1);
-    registerFunction(vm2);
-    
-    //Step-3 : Execute function randomly (in iteration) on all available (per VM) REST end-points and verify its result
-    for (int i=0; i< 10; i++)
-      executeFunctionThroughRestCall(restURLs);
-    
-    //Verify that each node belonging to specified group has run the function
-    verifyAndResetInvocationCount(vm0, 10);
-    verifyAndResetInvocationCount(vm1, 10);
-    verifyAndResetInvocationCount(vm2, 10);
-   
-    restURLs.clear();
-  }
-  
-  
-  public void testBasicP2PFunctionSelectedGroup() {
-  
-    List<String> restURLs = new ArrayList<String>(); 
-    
-    //Step-1 : create cache on each VM, this will start HTTP service in embedded mode and deploy REST APIs web app on it.
-    //         Create and configure Region on all VMs. Add Rest end-point into the restURLs list.
-    String url1 = (String)vm0.invoke(() -> RestAPITestBase.createCacheWithGroups(vm0, "g0,gm", "null" ));
-    restURLs.add(url1);
-    
-    String url2 = (String)vm1.invoke(() -> RestAPITestBase.createCacheWithGroups(vm1, "g1", "null"  ));
-    restURLs.add(url2);
-    
-    String url3 = (String)vm2.invoke(() -> RestAPITestBase.createCacheWithGroups(vm2, "g0,g1", "null" ));
-    restURLs.add(url3);
-    
-    //Step-2: Register function in all VMs
-    registerFunction(vm0);
-    registerFunction(vm1);
-    registerFunction(vm2);
-    
-    //Step-3 : Execute function randomly (in iteration) on all available (per VM) REST end-points and verify its result
-    for (int i=0; i< 5; i++)
-      executeFunctionOnMemberThroughRestCall(restURLs);
-    
-    resetInvocationCount(vm0);
-    resetInvocationCount(vm1);
-    resetInvocationCount(vm2);
-    
-    restURLs.clear();
-  }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f2175524/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
index adb2b55..ac922ad 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
@@ -16,82 +16,49 @@
  */
 package com.gemstone.gemfire.rest.internal.web.controllers;
 
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-
-import org.apache.http.HttpEntity;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.json.JSONArray;
-
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.execute.Function;
 import com.gemstone.gemfire.cache.execute.FunctionContext;
 import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.rest.internal.web.RestFunctionTemplate;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
 import com.gemstone.gemfire.test.dunit.VM;
+import org.apache.http.client.methods.CloseableHttpResponse;
+
+import java.util.Properties;
 
 /**
- * 
  * @author Nilkanth Patel
  */
 
-public class RestAPIsOnMembersFunctionExecutionDUnitTest extends CacheTestCase { 
-  
+public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase {
+
   private static final long serialVersionUID = 1L;
-  
-  VM member1 = null;
-  VM member2 = null;
-  VM member3 = null;
-  VM member4 = null;
-  
-  static InternalDistributedSystem ds = null;
 
   public RestAPIsOnMembersFunctionExecutionDUnitTest(String name) {
     super(name);
   }
-  
+
   @Override
   public void setUp() throws Exception {
     super.setUp();
-    Host host = Host.getHost(0);
-    member1 = host.getVM(0);
-    member2 = host.getVM(1);
-    member3 = host.getVM(2);
-    member4 = host.getVM(3);
   }
-  
-  static class OnMembersFunction implements Function {
-    private static final long serialVersionUID = -1032915440862585532L;
+
+  private class OnMembersFunction extends RestFunctionTemplate {
     public static final String Id = "OnMembersFunction";
-    public static int invocationCount;
 
     @Override
     public void execute(FunctionContext context) {
-      
-      LogWriterUtils.getLogWriter().fine("SWAP:1:executing OnMembersFunction:"+invocationCount);
-      InternalDistributedSystem ds = InternalDistributedSystem.getConnectedInstance();
+
+      LogWriterUtils.getLogWriter().fine("SWAP:1:executing OnMembersFunction:" + invocationCount);
       invocationCount++;
-      
+
       context.getResultSender().lastResult(Boolean.TRUE);
     }
-    
+
     @Override
     public String getId() {
       return Id;
@@ -112,217 +79,98 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends CacheTestCase {
       return false;
     }
   }
-  
-  private void verifyAndResetInvocationCount(VM vm, final int count) {
-    vm.invoke(new SerializableCallable() {
-      @Override
-      public Object call() throws Exception {
-        OnMembersFunction f = (OnMembersFunction) FunctionService.getFunction(OnMembersFunction.Id);
-        assertEquals(count, f.invocationCount);
-        // assert succeeded, reset count
-        f.invocationCount = 0;
-        return null;
-      }
-    });
-  }
-  
-  private InternalDistributedSystem createSystem(Properties props){
-    try {
-      ds = getSystem(props);
-      assertNotNull(ds);
-      FunctionService.registerFunction(new OnMembersFunction());
-      
-    }
-    catch (Exception e) {
-      Assert.fail("Failed while creating the Distribued System", e);
-    }
-    return ds;
-  }
-  
-  public static String createCacheAndRegisterFunction(VM vm, String memberName) {
-    final String hostName = vm.getHost().getHostName(); 
+
+  private String createCacheAndRegisterFunction(VM vm, String memberName) {
+    final String hostName = vm.getHost().getHostName();
     final int serverPort = AvailablePortHelper.getRandomAvailableTCPPort();
-    
+
     Properties props = new Properties();
     props.setProperty(DistributionConfig.NAME_NAME, memberName);
     props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
     props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, hostName);
     props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(serverPort));
-    
+
     Cache c = null;
     try {
-      c = CacheFactory.getInstance( new RestAPIsOnMembersFunctionExecutionDUnitTest("temp").getSystem(props));
+      c = CacheFactory.getInstance(new RestAPIsOnMembersFunctionExecutionDUnitTest("temp").getSystem(props));
       c.close();
     } catch (CacheClosedException cce) {
     }
-    
+
     c = CacheFactory.create(new RestAPIsOnMembersFunctionExecutionDUnitTest("temp").getSystem(props));
     FunctionService.registerFunction(new OnMembersFunction());
-    
-    String restEndPoint =  "http://" + hostName + ":" + serverPort + "/gemfire-api/v1";
+
+    String restEndPoint = "http://" + hostName + ":" + serverPort + "/gemfire-api/v1";
     return restEndPoint;
-   
+
   }
-  
-  public static void executeFunctionOnAllMembersThroughRestCall(List<String> restURLs) {
-    Random randomGenerator = new Random();
-    int index = randomGenerator.nextInt(restURLs.size());
-    
-    //Testcase: onMembers Function execution with No groups specified
-    try {
-      
-      CloseableHttpClient httpclient = HttpClients.createDefault();
-      CloseableHttpResponse response = null;
-      HttpPost post = new HttpPost(restURLs.get(index) + "/functions/OnMembersFunction");
-      post.addHeader("Content-Type", "application/json");
-      post.addHeader("Accept", "application/json");
-      
-      LogWriterUtils.getLogWriter().info("Request POST : " + post.toString());
-      
-      response = httpclient.execute(post);
-      
-      HttpEntity entity = response.getEntity();
-      InputStream content = entity.getContent();
-      BufferedReader reader = new BufferedReader(new InputStreamReader(
-          content));
-      String line;
-      StringBuffer sb = new StringBuffer();
-      while ((line = reader.readLine()) != null) {
-        sb.append(line);
-      }
-      LogWriterUtils.getLogWriter().info("Response : " + sb.toString());
-            
-      
-      //verify response status code
-      assertEquals(200, response.getStatusLine().getStatusCode());
-      
-      //verify response hasbody flag
-      assertNotNull(response.getEntity());
-      
-      
-      response.close();      
-     
-      JSONArray resultArray = new JSONArray(sb.toString());
-      assertEquals(resultArray.length(), 4);
-      
-      //fail("Expected exception while executing function onMembers without any members ");
-      
-    } catch (Exception e) {
-      throw new RuntimeException("unexpected exception", e);
-    }
+
+  @Override
+  protected String getFunctionID() {
+    return OnMembersFunction.Id;
   }
- 
-  public static void executeFunctionOnGivenMembersThroughRestCall(List<String> restURLs) {
-    Random randomGenerator = new Random();
-    int index = randomGenerator.nextInt(restURLs.size());
-    
-    //Testcase: onMembers Function execution with valid groups
-    try {
-      
-      CloseableHttpClient httpclient = HttpClients.createDefault();
-      CloseableHttpResponse response = null;
-      HttpPost post = new HttpPost(restURLs.get(index) + "/functions/OnMembersFunction?onMembers=m1,m2,m3");
-      post.addHeader("Content-Type", "application/json");
-      post.addHeader("Accept", "application/json");
-      response = httpclient.execute(post);
-    
-      //verify response status code. expected status code is 200 OK.
-      assertEquals(response.getStatusLine().getStatusCode(), 200);
-      
-      //verify response hasbody flag, expected is true.
-      assertNotNull(response.getEntity());
-      
-      
-      HttpEntity entity = response.getEntity();
-      InputStream content = entity.getContent();
-      BufferedReader reader = new BufferedReader(new InputStreamReader(
-          content));
-      String line;
-      StringBuffer sb = new StringBuffer();
-      while ((line = reader.readLine()) != null) {
-        sb.append(line);
-      }
-      response.close();
-      
-      //verify function execution result
-      JSONArray resultArray = new JSONArray(sb.toString());
-      assertEquals(resultArray.length(), 3);
-      
-    } catch (Exception e) {
-      throw new RuntimeException("unexpected exception", e);
+
+  public void testFunctionExecutionOnAllMembers() {
+    restURLs.add(vm0.invoke(() -> createCacheAndRegisterFunction(vm0, "m1")));
+    restURLs.add(vm1.invoke(() -> createCacheAndRegisterFunction(vm1, "m2")));
+    restURLs.add(vm2.invoke(() -> createCacheAndRegisterFunction(vm2, "m3")));
+    restURLs.add(vm3.invoke(() -> createCacheAndRegisterFunction(vm3, "m4")));
+
+    for (int i = 0; i < 10; i++) {
+      CloseableHttpResponse response = executeFunctionThroughRestCall("OnMembersFunction",null,null,null,null,null);
+      assertHttpResponse(response, 200, 4);
     }
+
+    int c0 = vm0.invoke(() -> getInvocationCount());
+    int c1 = vm1.invoke(() -> getInvocationCount());
+    int c2 = vm2.invoke(() -> getInvocationCount());
+    int c3 = vm3.invoke(() -> getInvocationCount());
+
+    assertEquals(40, (c0 + c1 + c2 + c3));
+
+    restURLs.clear();
   }
-  
-  public void testFunctionExecutionOnAllMembers()  {
-    
-    List<String> restURLs = new ArrayList<String>(); 
-    
-    //Step-1 : create cache on each VM, this will start HTTP service in embedded mode and deploy REST APIs web app on it.
-    //         Connect to DS and Register function. Add Rest end-point into the restURLs list.
-    
-    String url1 = (String)member1.invoke(() -> RestAPIsOnMembersFunctionExecutionDUnitTest.createCacheAndRegisterFunction(member1, "m1"));
-    restURLs.add(url1);
-    
-    String url2 = (String)member2.invoke(() -> RestAPIsOnMembersFunctionExecutionDUnitTest.createCacheAndRegisterFunction(member2, "m2"));
-    restURLs.add(url2);
-    
-    String url3 = (String)member3.invoke(() -> RestAPIsOnMembersFunctionExecutionDUnitTest.createCacheAndRegisterFunction(member3, "m3"));
-    restURLs.add(url3);
-    
-    String url4 = (String)member4.invoke(() -> RestAPIsOnMembersFunctionExecutionDUnitTest.createCacheAndRegisterFunction(member4, "m4"));
-    restURLs.add(url4);
-    
-    //default case, execute function on all members, register the function in controller VM
-    //FunctionService.registerFunction(new OnMembersFunction());
-    
-    //Step-2 : Execute function randomly (in iteration) on all available (per VM) REST end-points and verify its result
-    for (int i=0; i< 10; i++) {
-      executeFunctionOnAllMembersThroughRestCall(restURLs);
+
+  public void testFunctionExecutionEOnSelectedMembers() {
+    restURLs.add((String) vm0.invoke(() -> createCacheAndRegisterFunction(vm0, "m1")));
+    restURLs.add((String) vm1.invoke(() -> createCacheAndRegisterFunction(vm1, "m2")));
+    restURLs.add((String) vm2.invoke(() -> createCacheAndRegisterFunction(vm2, "m3")));
+    restURLs.add((String) vm3.invoke(() -> createCacheAndRegisterFunction(vm3, "m4")));
+
+    for (int i = 0; i < 10; i++) {
+      CloseableHttpResponse response = executeFunctionThroughRestCall("OnMembersFunction",null,null,null,null,"m1,m2,m3");
+      assertHttpResponse(response, 200, 3);
     }
-    
-    //Verify that each node (m1, m2, m3) has run the function
-    verifyAndResetInvocationCount(member1, 10);
-    verifyAndResetInvocationCount(member2, 10);
-    verifyAndResetInvocationCount(member3, 10);
-    verifyAndResetInvocationCount(member4, 10);
+
+    int c0 = vm0.invoke(() -> getInvocationCount());
+    int c1 = vm1.invoke(() -> getInvocationCount());
+    int c2 = vm2.invoke(() -> getInvocationCount());
+    int c3 = vm3.invoke(() -> getInvocationCount());
+
+    assertEquals(30, (c0 + c1 + c2 + c3));
 
     restURLs.clear();
   }
-  
-  public void testFunctionExecutionEOnSelectedMembers()  {
-    
-    List<String> restURLs = new ArrayList<String>(); 
-    
-    //Step-1 : create cache on each VM, this will start HTTP service in embedded mode and deploy REST APIs web app on it.
-    //         Connect to DS and Register function. Add Rest end-point into the restURLs list.
-    
-    String url1 = (String)member1.invoke(() -> RestAPIsOnMembersFunctionExecutionDUnitTest.createCacheAndRegisterFunction(member1, "m1"));
-    restURLs.add(url1);
-    
-    String url2 = (String)member2.invoke(() -> RestAPIsOnMembersFunctionExecutionDUnitTest.createCacheAndRegisterFunction(member2, "m2"));
-    restURLs.add(url2);
-    
-    String url3 = (String)member3.invoke(() -> RestAPIsOnMembersFunctionExecutionDUnitTest.createCacheAndRegisterFunction(member3, "m3"));
-    restURLs.add(url3);
-    
-    String url4 = (String)member4.invoke(() -> RestAPIsOnMembersFunctionExecutionDUnitTest.createCacheAndRegisterFunction(member4, "m4"));
-    restURLs.add(url4);
-    
-    //default case, execute function on all members, register the function in controller VM
-    //FunctionService.registerFunction(new OnMembersFunction());
-    
-    //Step-2 : Execute function randomly (in iteration) on all available (per VM) REST end-points and verify its result
-    for (int i=0; i< 10; i++) {
-      executeFunctionOnGivenMembersThroughRestCall(restURLs);
+
+  public void testFunctionExecutionOnMembersWithFilter() {
+    restURLs.add((String) vm0.invoke(() -> createCacheAndRegisterFunction(vm0, "m1")));
+    restURLs.add((String) vm1.invoke(() -> createCacheAndRegisterFunction(vm1, "m2")));
+    restURLs.add((String) vm2.invoke(() -> createCacheAndRegisterFunction(vm2, "m3")));
+    restURLs.add((String) vm3.invoke(() -> createCacheAndRegisterFunction(vm3, "m4")));
+
+    for (int i = 0; i < 10; i++) {
+      CloseableHttpResponse response = executeFunctionThroughRestCall("OnMembersFunction",null,"key2",null,null,"m1,m2,m3");
+      assertHttpResponse(response, 500, 0);
     }
-    
-    //Verify that each node (m1, m2, m3) has run the function
-    verifyAndResetInvocationCount(member1, 10);
-    verifyAndResetInvocationCount(member2, 10);
-    verifyAndResetInvocationCount(member3, 10);
-    
+
+    int c0 = vm0.invoke(() -> getInvocationCount());
+    int c1 = vm1.invoke(() -> getInvocationCount());
+    int c2 = vm2.invoke(() -> getInvocationCount());
+    int c3 = vm3.invoke(() -> getInvocationCount());
+
+    assertEquals(0, (c0 + c1 + c2 + c3));
 
     restURLs.clear();
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f2175524/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/controllers/FunctionAccessController.java
----------------------------------------------------------------------
diff --git a/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/controllers/FunctionAccessController.java b/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/controllers/FunctionAccessController.java
index 2c37c7f..929b70a 100644
--- a/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/controllers/FunctionAccessController.java
+++ b/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/controllers/FunctionAccessController.java
@@ -17,44 +17,32 @@
 
 package com.gemstone.gemfire.rest.internal.web.controllers;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.logging.log4j.Logger;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Controller;
-import org.springframework.util.StringUtils;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.ResponseStatus;
-
 import com.gemstone.gemfire.cache.LowMemoryException;
-import com.gemstone.gemfire.cache.execute.Execution;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionException;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.ResultCollector;
+import com.gemstone.gemfire.cache.execute.*;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.rest.internal.web.exception.GemfireRestException;
 import com.gemstone.gemfire.rest.internal.web.util.ArrayUtils;
 import com.gemstone.gemfire.rest.internal.web.util.JSONUtils;
-import org.json.JSONException;
 import com.wordnik.swagger.annotations.Api;
 import com.wordnik.swagger.annotations.ApiOperation;
 import com.wordnik.swagger.annotations.ApiResponse;
 import com.wordnik.swagger.annotations.ApiResponses;
+import org.apache.logging.log4j.Logger;
+import org.json.JSONException;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
 
 /**
  * The FunctionsController class serving REST Requests related to the function execution
- * <p/>
+ * <p>
+ *
  * @author Nilkanth Patel, john blum
  * @see org.springframework.stereotype.Controller
  * @since 8.0
@@ -72,172 +60,181 @@ public class FunctionAccessController extends AbstractBaseController {
 
   /**
    * Gets the version of the REST API implemented by this @Controller.
-   * <p/>
+   * <p>
+   *
    * @return a String indicating the REST API version.
    */
   @Override
   protected String getRestApiVersion() {
     return REST_API_VERSION;
   }
-  
+
   /**
    * list all registered functions in Gemfire data node
+   *
    * @return result as a JSON document.
    */
-  @RequestMapping(method = RequestMethod.GET,  produces = { MediaType.APPLICATION_JSON_VALUE })
+  @RequestMapping(method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE })
   @ApiOperation(
-    value = "list all functions",
-    notes = "list all functions available in the GemFire cluster",
-    response  = void.class
+      value = "list all functions",
+      notes = "list all functions available in the GemFire cluster",
+      response = void.class
   )
-  @ApiResponses( {
-    @ApiResponse( code = 200, message = "OK." ),
-    @ApiResponse( code = 500, message = "GemFire throws an error or exception." )   
-  } )
+  @ApiResponses({
+      @ApiResponse(code = 200, message = "OK."),
+      @ApiResponse(code = 500, message = "GemFire throws an error or exception.")
+  })
   @ResponseBody
   @ResponseStatus(HttpStatus.OK)
   public ResponseEntity<?> list() {
-    
-    if(logger.isDebugEnabled()){
+
+    if (logger.isDebugEnabled()) {
       logger.debug("Listing all registered Functions in GemFire...");
     }
-    
+
     final Map<String, Function> registeredFunctions = FunctionService.getRegisteredFunctions();
-    String listFunctionsAsJson =  JSONUtils.formulateJsonForListFunctionsCall(registeredFunctions.keySet());
-    final HttpHeaders headers = new HttpHeaders();  
+    String listFunctionsAsJson = JSONUtils.formulateJsonForListFunctionsCall(registeredFunctions.keySet());
+    final HttpHeaders headers = new HttpHeaders();
     headers.setLocation(toUri("functions"));
     return new ResponseEntity<String>(listFunctionsAsJson, headers, HttpStatus.OK);
-  } 
-  
+  }
+
   /**
    * Execute a function on Gemfire data node using REST API call.
-   * Arguments to the function are passed as JSON string in the request body. 
+   * Arguments to the function are passed as JSON string in the request body.
+   *
    * @param functionId represents function to be executed
-   * @param region list of regions on which function to be executed.
-   * @param members list of nodes on which function to be executed.
-   * @param groups list of groups on which function to be executed. 
+   * @param region     list of regions on which function to be executed.
+   * @param members    list of nodes on which function to be executed.
+   * @param groups     list of groups on which function to be executed.
+   * @param filter     list of keys which the function will use to determine on which node to execute the function.
    * @param argsInBody function argument as a JSON document
    * @return result as a JSON document
    */
   @RequestMapping(method = RequestMethod.POST, value = "/{functionId}", produces = { MediaType.APPLICATION_JSON_VALUE })
   @ApiOperation(
-    value = "execute function",
-    notes = "Execute function with arguments on regions, members, or group(s). By default function will be executed on all nodes if none of (onRegion, onMembers, onGroups) specified",
-    response  = void.class
+      value = "execute function",
+      notes = "Execute function with arguments on regions, members, or group(s). By default function will be executed on all nodes if none of (onRegion, onMembers, onGroups) specified",
+      response = void.class
   )
-  @ApiResponses( {
-    @ApiResponse( code = 200, message = "OK." ),
-    @ApiResponse( code = 500, message = "if GemFire throws an error or exception" ),
-    @ApiResponse( code = 400, message = "if Function arguments specified as JSON document in the request body is invalid" )
-  } )
+  @ApiResponses({
+      @ApiResponse(code = 200, message = "OK."),
+      @ApiResponse(code = 500, message = "if GemFire throws an error or exception"),
+      @ApiResponse(code = 400, message = "if Function arguments specified as JSON document in the request body is invalid")
+  })
   @ResponseBody
   @ResponseStatus(HttpStatus.OK)
   public ResponseEntity<String> execute(@PathVariable("functionId") String functionId,
-                          @RequestParam(value = "onRegion", required = false ) String region,
-                          @RequestParam(value = "onMembers", required = false ) final String[] members,
-                          @RequestParam(value = "onGroups", required = false) final String[] groups,
-                          @RequestBody(required = false) final String argsInBody
-                          )
-  {
+      @RequestParam(value = "onRegion", required = false) String region,
+      @RequestParam(value = "onMembers", required = false) final String[] members,
+      @RequestParam(value = "onGroups", required = false) final String[] groups,
+      @RequestParam(value = "filter", required = false) final String[] filter,
+      @RequestBody(required = false) final String argsInBody
+  ) {
     Execution function = null;
     functionId = decode(functionId);
-    
+
     if (StringUtils.hasText(region)) {
-      if(logger.isDebugEnabled()){
+      if (logger.isDebugEnabled()) {
         logger.debug("Executing Function ({}) with arguments ({}) on Region ({})...", functionId,
             ArrayUtils.toString(argsInBody), region);
       }
-      
+
       region = decode(region);
       try {
         function = FunctionService.onRegion(getRegion(region));
-      } catch(FunctionException fe){
+      } catch (FunctionException fe) {
         throw new GemfireRestException(String.format("The Region identified by name (%1$s) could not found!", region), fe);
       }
-    }
-    else if (ArrayUtils.isNotEmpty(members)) {
-      if(logger.isDebugEnabled()){
+    } else if (ArrayUtils.isNotEmpty(members)) {
+      if (logger.isDebugEnabled()) {
         logger.debug("Executing Function ({}) with arguments ({}) on Member ({})...", functionId,
             ArrayUtils.toString(argsInBody), ArrayUtils.toString(members));
       }
-      try {            
+      try {
         function = FunctionService.onMembers(getMembers(members));
-      } catch(FunctionException fe){
-        throw new GemfireRestException("Could not found the specified members in disributed system!", fe);
+      } catch (FunctionException fe) {
+        throw new GemfireRestException("Could not found the specified members in distributed system!", fe);
       }
-    }
-    else if (ArrayUtils.isNotEmpty(groups)) {
-      if(logger.isDebugEnabled()){
+    } else if (ArrayUtils.isNotEmpty(groups)) {
+      if (logger.isDebugEnabled()) {
         logger.debug("Executing Function ({}) with arguments ({}) on Groups ({})...", functionId,
             ArrayUtils.toString(argsInBody), ArrayUtils.toString(groups));
       }
       try {
         function = FunctionService.onMembers(groups);
-      } catch(FunctionException fe){
+      } catch (FunctionException fe) {
         throw new GemfireRestException("no member(s) are found belonging to the provided group(s)!", fe);
       }
-    }
-    else {
+    } else {
       //Default case is to execute function on all existing data node in DS, document this.
-      if(logger.isDebugEnabled()){
+      if (logger.isDebugEnabled()) {
         logger.debug("Executing Function ({}) with arguments ({}) on all Members...", functionId,
             ArrayUtils.toString(argsInBody));
       }
-        
+
       try {
         function = FunctionService.onMembers(getAllMembersInDS());
-      } catch(FunctionException fe) {
-        throw new GemfireRestException("Disributed system does not contain any valid data node to run the specified  function!", fe);
+      } catch (FunctionException fe) {
+        throw new GemfireRestException("Distributed system does not contain any valid data node to run the specified  function!", fe);
+      }
+    }
+
+    if (!ArrayUtils.isEmpty(filter)) {
+      if (logger.isDebugEnabled()) {
+        logger.debug("Executing Function ({}) with filter ({})", functionId,
+            ArrayUtils.toString(filter));
       }
+      Set filter1 = ArrayUtils.asSet(filter);
+      function = function.withFilter(filter1);
     }
 
     final ResultCollector<?, ?> results;
-    
+
     try {
-      if(argsInBody != null) 
-      {
+      if (argsInBody != null) {
         Object[] args = jsonToObjectArray(argsInBody);
-        
+
         //execute function with specified arguments
-        if(args.length == 1){
+        if (args.length == 1) {
           results = function.withArgs(args[0]).execute(functionId);
         } else {
           results = function.withArgs(args).execute(functionId);
         }
-      }else { 
+      } else {
         //execute function with no args
         results = function.execute(functionId);
       }
-    } catch(ClassCastException cce){
+    } catch (ClassCastException cce) {
       throw new GemfireRestException("Key is of an inappropriate type for this region!", cce);
-    } catch(NullPointerException npe){
+    } catch (NullPointerException npe) {
       throw new GemfireRestException("Specified key is null and this region does not permit null keys!", npe);
-    } catch(LowMemoryException lme){
+    } catch (LowMemoryException lme) {
       throw new GemfireRestException("Server has encountered low memory condition!", lme);
     } catch (IllegalArgumentException ie) {
       throw new GemfireRestException("Input parameter is null! ", ie);
-    }catch (FunctionException fe){
+    } catch (FunctionException fe) {
       throw new GemfireRestException("Server has encountered error while executing the function!", fe);
     }
-    
+
     try {
       Object functionResult = results.getResult();
-    
-      if(functionResult instanceof List<?>) {
+
+      if (functionResult instanceof List<?>) {
         final HttpHeaders headers = new HttpHeaders();
         headers.setLocation(toUri("functions", functionId));
-      
+
         try {
           @SuppressWarnings("unchecked")
-          String functionResultAsJson = JSONUtils.convertCollectionToJson((ArrayList<Object>)functionResult);
-          return new ResponseEntity<String>(functionResultAsJson, headers, HttpStatus.OK);  
+          String functionResultAsJson = JSONUtils.convertCollectionToJson((ArrayList<Object>) functionResult);
+          return new ResponseEntity<String>(functionResultAsJson, headers, HttpStatus.OK);
         } catch (JSONException e) {
           throw new GemfireRestException("Could not convert function results into Restful (JSON) format!", e);
         }
-      }else {
+      } else {
         throw new GemfireRestException("Function has returned results that could not be converted into Restful (JSON) format!");
       }
-    }catch (FunctionException fe) {
+    } catch (FunctionException fe) {
       fe.printStackTrace();
       throw new GemfireRestException("Server has encountered an error while processing function execution!", fe);
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f2175524/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/util/ArrayUtils.java
----------------------------------------------------------------------
diff --git a/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/util/ArrayUtils.java b/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/util/ArrayUtils.java
index 261f9ad..d2d4f2f 100644
--- a/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/util/ArrayUtils.java
+++ b/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/util/ArrayUtils.java
@@ -17,6 +17,9 @@
 
 package com.gemstone.gemfire.rest.internal.web.util;
 
+import java.util.LinkedHashSet;
+import java.util.Set;
+
 /**
  * The ArrayUtils class is an abstract utility class for working with Object arrays.
  * <p/>
@@ -56,5 +59,12 @@ public abstract class ArrayUtils {
   public static String toString(final String... array) {
     return toString((Object[])array); 
   }
-  
+
+  public static Set asSet(String[] filter) {
+    LinkedHashSet linkedHashSet = new LinkedHashSet(filter.length);
+    for (int i = 0; i < filter.length; i++) {
+      linkedHashSet.add(filter[i]);
+    }
+    return linkedHashSet;
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f2175524/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index 8a533f6..f0738d7 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -45,8 +45,8 @@ hamcrest-all.version = 1.3
 hbase.version = 0.94.27
 hibernate.version = 3.5.5-Final
 hibernate-commons-annotations.version = 3.2.0.Final
-httpclient.version = 4.3.3
-httpcore.version = 4.3.3
+httpclient.version = 4.5.1
+httpcore.version = 4.4.4
 httpunit.version = 1.7.2
 hsqldb.version = 2.0.0
 jackson.version = 2.2.0


[25/54] [abbrv] incubator-geode git commit: GEODE-478: GatewaySender now handles MessageTooLargeExceptions

Posted by je...@apache.org.
GEODE-478: GatewaySender now handles MessageTooLargeExceptions


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a904f147
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a904f147
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a904f147

Branch: refs/heads/feature/GEODE-17-2
Commit: a904f1474ec3153bc39f650d49731214f25c6230
Parents: 4d0dfc5
Author: Barry Oglesby <bo...@pivotal.io>
Authored: Tue Mar 8 15:55:34 2016 -0800
Committer: Barry Oglesby <bo...@pivotal.io>
Committed: Wed Mar 16 09:56:41 2016 -0700

----------------------------------------------------------------------
 .../internal/cache/tier/sockets/Message.java    |  2 +-
 .../AbstractGatewaySenderEventProcessor.java    | 33 +++++++--
 .../parallel/ParallelGatewaySenderQueue.java    | 74 ++++++++++++++++----
 .../gemfire/internal/i18n/LocalizedStrings.java |  6 +-
 .../wan/GatewaySenderEventRemoteDispatcher.java | 31 +++++++-
 .../gemfire/internal/cache/wan/WANTestBase.java | 26 +++++--
 ...arallelGatewaySenderOperationsDUnitTest.java | 35 +++++++++
 7 files changed, 177 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a904f147/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
index a6495e2..44c88c1 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
@@ -564,7 +564,7 @@ public class Message  {
         msgLen = (int)(headerLen + totalPartLen);
         
         if (msgLen > MAX_MESSAGE_SIZE) {
-          throw new MessageTooLargeException("Message size(" + msgLen
+          throw new MessageTooLargeException("Message size (" + msgLen
               + ") exceeds gemfire.client.max-message-size setting (" + MAX_MESSAGE_SIZE + ")");
         }
         

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a904f147/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
index 86ecce1..51b125a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
@@ -38,12 +38,9 @@ import com.gemstone.gemfire.cache.EntryEvent;
 import com.gemstone.gemfire.cache.Operation;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.client.internal.Connection;
-import com.gemstone.gemfire.cache.client.internal.pooling.ConnectionDestroyedException;
 import com.gemstone.gemfire.cache.wan.GatewayEventFilter;
 import com.gemstone.gemfire.cache.wan.GatewayQueueEvent;
 import com.gemstone.gemfire.cache.wan.GatewaySender;
-import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.cache.BucketRegion;
 import com.gemstone.gemfire.internal.cache.Conflatable;
 import com.gemstone.gemfire.internal.cache.DistributedRegion;
@@ -143,6 +140,13 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread {
   private volatile boolean resetLastPeekedEvents;
   
   private long numEventsDispatched;
+
+  /**
+   * The batchSize is the batch size being used by this processor. By default, it is the
+   * configured batch size of the GatewaySender. It may be automatically reduced if a
+   * MessageTooLargeException occurs.
+   */
+  private int batchSize;
   
   /**
    * @param createThreadGroup
@@ -152,6 +156,7 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread {
       String string, GatewaySender sender) {
     super(createThreadGroup, string);
     this.sender = (AbstractGatewaySender)sender;
+    this.batchSize = sender.getBatchSize();
   }
 
   abstract protected void initializeMessageQueue(String id);
@@ -214,6 +219,23 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread {
     this.resetLastPeekedEvents = true;
   }
 
+  protected int getBatchSize() {
+    return this.batchSize;
+  }
+
+  protected void setBatchSize(int batchSize) {
+    int currentBatchSize = this.batchSize;
+    if (batchSize <= 0) {
+      this.batchSize = 1;
+      logger.warn(LocalizedMessage.create(
+          LocalizedStrings.AbstractGatewaySenderEventProcessor_ATTEMPT_TO_SET_BATCH_SIZE_FAILED, new Object[] { currentBatchSize, batchSize }));
+    } else {
+      this.batchSize = batchSize;
+      logger.info(LocalizedMessage.create(
+          LocalizedStrings.AbstractGatewaySenderEventProcessor_SET_BATCH_SIZE, new Object[] { currentBatchSize, this.batchSize }));
+    }
+  }
+
   /**
    * Returns the current batch id to be used to identify the next batch.
    * 
@@ -387,7 +409,6 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread {
     final boolean isDebugEnabled = logger.isDebugEnabled();
     final boolean isTraceEnabled = logger.isTraceEnabled();
     
-    final int batchSize = sender.getBatchSize();
     final int batchTimeInterval = sender.getBatchTimeInterval();
     final GatewaySenderStats statistics = this.sender.getStatistics();
     
@@ -417,7 +438,7 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread {
 
         // Peek a batch
         if (isDebugEnabled) {
-          logger.debug("Attempting to peek a batch of {} events", batchSize);
+          logger.debug("Attempting to peek a batch of {} events", this.batchSize);
         }
         for (;;) {
           // check before sleeping
@@ -481,7 +502,7 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread {
               }
             }*/
             }
-            events = this.queue.peek(batchSize, batchTimeInterval);
+            events = this.queue.peek(this.batchSize, batchTimeInterval);
           } catch (InterruptedException e) {
             interrupted = true;
             this.sender.getCancelCriterion().checkCancelInProgress(e);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a904f147/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
index c00903f..a9d0f3e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
@@ -54,7 +54,6 @@ import com.gemstone.gemfire.cache.EvictionAttributes;
 import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
 import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
 import com.gemstone.gemfire.distributed.internal.DM;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
@@ -143,7 +142,17 @@ public class ParallelGatewaySenderQueue implements RegionQueue {
   private static BatchRemovalThread removalThread = null;
 
   protected BlockingQueue<GatewaySenderEventImpl> peekedEvents = new LinkedBlockingQueue<GatewaySenderEventImpl>();
-  
+
+  /**
+   * The peekedEventsProcessing queue is used when the batch size is reduced due to a MessageTooLargeException
+   */
+  private BlockingQueue<GatewaySenderEventImpl> peekedEventsProcessing = new LinkedBlockingQueue<GatewaySenderEventImpl>();
+
+  /**
+   * The peekedEventsProcessingInProgress boolean denotes that processing existing peeked events is in progress
+   */
+  private boolean peekedEventsProcessingInProgress = false;
+
   public final AbstractGatewaySender sender ;
   
   public static final int WAIT_CYCLE_SHADOW_BUCKET_LOAD = 10;
@@ -1147,6 +1156,10 @@ public class ParallelGatewaySenderQueue implements RegionQueue {
 
   public void resetLastPeeked() {
     this.resetLastPeeked = true;
+
+    // Reset the in progress boolean and queue for peeked events in progress
+    this.peekedEventsProcessingInProgress = false;
+    this.peekedEventsProcessing.clear();
   }
   
   // Need to improve here.If first peek returns NULL then look in another bucket.
@@ -1283,19 +1296,9 @@ public class ParallelGatewaySenderQueue implements RegionQueue {
     long start = System.currentTimeMillis();
     long end = start + timeToWait;
 
-    if (this.resetLastPeeked) {
-      batch.addAll(peekedEvents);
-      this.resetLastPeeked = false;
-      if (isDebugEnabled) {
-        StringBuffer buffer = new StringBuffer();
-        for (GatewaySenderEventImpl ge : peekedEvents) {
-          buffer.append("event :");
-          buffer.append(ge);
-        }
-        logger.debug("Adding already peeked events to the batch {}", buffer);
-      }
-    }
-    
+    // Add peeked events
+    addPeekedEvents(batch, batchSize);
+
     int bId = -1;
     while (batch.size() < batchSize) {
       if (areLocalBucketQueueRegionsPresent()
@@ -1372,6 +1375,47 @@ public class ParallelGatewaySenderQueue implements RegionQueue {
     return batch;
   }
 
+  private void addPeekedEvents(List batch, int batchSize) {
+    if (this.resetLastPeeked) {
+      if (this.peekedEventsProcessingInProgress) {
+        // Peeked event processing is in progress. This means that the original peekedEvents
+        // contained > batch size events due to a reduction in the batch size. Create a batch
+        // from the peekedEventsProcessing queue.
+        addPreviouslyPeekedEvents(batch, batchSize);
+      } else if (peekedEvents.size() <= batchSize) {
+        // This is the normal case. The connection was lost while processing a batch.
+        // This recreates the batch from the current peekedEvents.
+        batch.addAll(peekedEvents);
+        this.resetLastPeeked = false;
+      } else {
+        // The peekedEvents queue is > batch size. This means that the previous batch size was
+        // reduced due to MessageTooLargeException. Create a batch from the peekedEventsProcessing queue.
+        this.peekedEventsProcessing.addAll(this.peekedEvents);
+        this.peekedEventsProcessingInProgress = true;
+        addPreviouslyPeekedEvents(batch, batchSize);
+      }
+      if (logger.isDebugEnabled()) {
+        StringBuffer buffer = new StringBuffer();
+        for (Object ge : batch) {
+          buffer.append("event :");
+          buffer.append(ge);
+        }
+        logger.debug("Adding already peeked events to the batch {}", buffer);
+      }
+    }
+  }
+
+  private void addPreviouslyPeekedEvents(List batch, int batchSize) {
+    for (int i=0; i<batchSize; i++) {
+      batch.add(this.peekedEventsProcessing.remove());
+      if (this.peekedEventsProcessing.isEmpty()) {
+        this.resetLastPeeked = false;
+        this.peekedEventsProcessingInProgress = false;
+        break;
+      }
+    }
+  }
+
   protected void blockProcesorThreadIfRequired() throws InterruptedException {
     queueEmptyLock.lock();
     try {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a904f147/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
index 8147718..3996692 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
@@ -2145,7 +2145,11 @@ public class LocalizedStrings extends ParentLocalizedStrings {
   public static final StringId AUTH_FAILED_TO_ACQUIRE_AUTHINITIALIZE_INSTANCE = new StringId(6611, "AuthInitialize instance could not be obtained");
   public static final StringId AUTH_FAILED_TO_OBTAIN_CREDENTIALS_IN_0_USING_AUTHINITIALIZE_1_2 = new StringId(6612, "Failed to obtain credentials using AuthInitialize [{1}]. {2}");
   public static final StringId DistributedSystem_BACKUP_ALREADY_IN_PROGRESS = new StringId(6613, "A backup is already in progress.");
-  
+
+  public static final StringId AbstractGatewaySenderEventProcessor_SET_BATCH_SIZE = new StringId(6614, "Set the batch size from {0} to {1} events");
+  public static final StringId AbstractGatewaySenderEventProcessor_ATTEMPT_TO_SET_BATCH_SIZE_FAILED = new StringId(6615, "Attempting to set the batch size from {0} to {1} events failed. Instead it was set to 1.");
+  public static final StringId GatewaySenderEventRemoteDispatcher_MESSAGE_TOO_LARGE_EXCEPTION = new StringId(6616, "The following exception occurred attempting to send a batch of {0} events. The batch will be tried again after reducing the batch size to {1} events.");
+
   /** Testing strings, messageId 90000-99999 **/
   
   /** These are simple messages for testing, translated with Babelfish. **/

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a904f147/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java b/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java
index 9da6748..22dff3d 100644
--- a/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java
+++ b/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java
@@ -23,6 +23,8 @@ import java.util.List;
 import java.util.Set;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
+import com.gemstone.gemfire.GemFireIOException;
+import com.gemstone.gemfire.internal.cache.tier.sockets.MessageTooLargeException;
 import org.apache.logging.log4j.Logger;
 
 import com.gemstone.gemfire.CancelException;
@@ -31,7 +33,6 @@ import com.gemstone.gemfire.cache.RegionDestroyedException;
 import com.gemstone.gemfire.cache.client.ServerConnectivityException;
 import com.gemstone.gemfire.cache.client.ServerOperationException;
 import com.gemstone.gemfire.cache.client.internal.Connection;
-import com.gemstone.gemfire.cache.client.internal.ServerProxy;
 import com.gemstone.gemfire.cache.client.internal.pooling.ConnectionDestroyedException;
 import com.gemstone.gemfire.cache.wan.GatewaySender;
 import com.gemstone.gemfire.distributed.internal.ServerLocation;
@@ -151,7 +152,9 @@ public class GatewaySenderEventRemoteDispatcher implements
     try {
       long start = statistics.startTime();
       success =_dispatchBatch(events, isRetry);
-      statistics.endBatch(start, events.size());
+      if (success) {
+        statistics.endBatch(start, events.size());
+      }
     } catch (GatewaySenderException ge) {
 
       Throwable t = ge.getCause();
@@ -159,7 +162,8 @@ public class GatewaySenderEventRemoteDispatcher implements
         // if our pool is shutdown then just be silent
       } else if (t instanceof IOException
           || t instanceof ServerConnectivityException
-          || t instanceof ConnectionDestroyedException) {
+          || t instanceof ConnectionDestroyedException
+          || t instanceof MessageTooLargeException) {
         this.processor.handleException();
         // If the cause is an IOException or a ServerException, sleep and retry.
         // Sleep for a bit and recheck.
@@ -243,6 +247,27 @@ public class GatewaySenderEventRemoteDispatcher implements
           LocalizedStrings.GatewayEventRemoteDispatcher_0_EXCEPTION_DURING_PROCESSING_BATCH_1_ON_CONNECTION_2.toLocalizedString(
               new Object[] {this, Integer.valueOf(currentBatchId), connection}), ex);
     }
+    catch (GemFireIOException e) {
+      Throwable t = e.getCause();
+      if (t instanceof MessageTooLargeException) {
+        // A MessageTooLargeException has occurred.
+        // Do not process the connection as dead since it is not dead.
+        ex = (MessageTooLargeException)t;
+        // Reduce the batch size by half of the configured batch size or number of events in the current batch (whichever is less)
+        int newBatchSize = Math.min(events.size(), this.processor.getBatchSize())/2;
+        logger.warn(LocalizedMessage.create(
+            LocalizedStrings.GatewaySenderEventRemoteDispatcher_MESSAGE_TOO_LARGE_EXCEPTION, new Object[] { events.size(), newBatchSize }), e);
+        this.processor.setBatchSize(newBatchSize);
+      }
+      else {
+        ex = e;
+        // keep using the connection if we had a MessageTooLargeException. Else, destroy it
+        destroyConnection();
+      }
+      throw new GatewaySenderException(
+          LocalizedStrings.GatewayEventRemoteDispatcher_0_EXCEPTION_DURING_PROCESSING_BATCH_1_ON_CONNECTION_2.toLocalizedString(
+              new Object[] {this, Integer.valueOf(currentBatchId), connection}), ex);
+    }
     catch (Exception e) {
       // An Exception has occurred. Get its cause.
       Throwable t = e.getCause();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a904f147/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
index 0a1a7ef..5da6b5c 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
@@ -2257,7 +2257,7 @@ public class WANTestBase extends DistributedTestCase{
   public static void createSender(String dsName, int remoteDsId,
       boolean isParallel, Integer maxMemory,
       Integer batchSize, boolean isConflation, boolean isPersistent,
-      GatewayEventFilter filter, boolean isManulaStart) {
+      GatewayEventFilter filter, boolean isManualStart) {
     final IgnoredException exln = IgnoredException.addIgnoredException("Could not connect");
     try {
       File persistentDirectory = new File(dsName + "_disk_"
@@ -2270,7 +2270,7 @@ public class WANTestBase extends DistributedTestCase{
         gateway.setParallel(true);
         gateway.setMaximumQueueMemory(maxMemory);
         gateway.setBatchSize(batchSize);
-        gateway.setManualStart(isManulaStart);
+        gateway.setManualStart(isManualStart);
         //set dispatcher threads
         gateway.setDispatcherThreads(numDispatcherThreadsForTheRun);
         ((InternalGatewaySenderFactory) gateway)
@@ -2294,7 +2294,7 @@ public class WANTestBase extends DistributedTestCase{
         GatewaySenderFactory gateway = cache.createGatewaySenderFactory();
         gateway.setMaximumQueueMemory(maxMemory);
         gateway.setBatchSize(batchSize);
-        gateway.setManualStart(isManulaStart);
+        gateway.setManualStart(isManualStart);
         //set dispatcher threads
         gateway.setDispatcherThreads(numDispatcherThreadsForTheRun);
         ((InternalGatewaySenderFactory) gateway)
@@ -3056,7 +3056,25 @@ public class WANTestBase extends DistributedTestCase{
 //      r.destroy(i);
 //    }
   }
-  
+
+
+  public static void doPuts(String regionName, int numPuts, Object value) {
+    IgnoredException exp1 = IgnoredException.addIgnoredException(InterruptedException.class
+        .getName());
+    IgnoredException exp2 = IgnoredException.addIgnoredException(GatewaySenderException.class
+        .getName());
+    try {
+      Region r = cache.getRegion(Region.SEPARATOR + regionName);
+      assertNotNull(r);
+      for (long i = 0; i < numPuts; i++) {
+        r.put(i, value);
+      }
+    } finally {
+      exp1.remove();
+      exp2.remove();
+    }
+  }
+
   public static void doPuts(String regionName, int numPuts) {
     IgnoredException exp1 = IgnoredException.addIgnoredException(InterruptedException.class
         .getName());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a904f147/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
index 9e1b28c..f929d89 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
@@ -16,8 +16,10 @@
  */
 package com.gemstone.gemfire.internal.cache.wan.parallel;
 
+import com.gemstone.gemfire.GemFireIOException;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionDestroyedException;
+import com.gemstone.gemfire.internal.cache.tier.sockets.MessageTooLargeException;
 import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
 import com.gemstone.gemfire.internal.cache.wan.GatewaySenderException;
 import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
@@ -555,6 +557,39 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase {
     vm7.invoke(() -> WANTestBase.verifySenderDestroyed( "ln", true ));
   }
 
+  public void testParallelGatewaySenderMessageTooLargeException() {
+    Integer[] locatorPorts = createLNAndNYLocators();
+    Integer lnPort = locatorPorts[0];
+    Integer nyPort = locatorPorts[1];
+
+    // Create and start sender with reduced maximum message size and 1 dispatcher thread
+    String regionName = getTestMethodName() + "_PR";
+    vm4.invoke(() -> setMaximumMessageSize( 1024*1024 ));
+    vm4.invoke(() -> createCache( lnPort ));
+    vm4.invoke(() -> setNumDispatcherThreadsForTheRun( 1 ));
+    vm4.invoke(() -> createSender( "ln", 2, true, 100, 100, false, false, null, false ));
+    vm4.invoke(() -> createPartitionedRegion( regionName, "ln", 0, 100, isOffHeap() ));
+
+    // Do puts
+    int numPuts = 200;
+    vm4.invoke(() -> doPuts( regionName, numPuts, new byte[11000] ));
+    validateRegionSizes(regionName, numPuts, vm4);
+
+    // Start receiver
+    IgnoredException ignoredMTLE = IgnoredException.addIgnoredException(MessageTooLargeException.class.getName(), vm4);
+    IgnoredException ignoredGIOE = IgnoredException.addIgnoredException(GemFireIOException.class.getName(), vm4);
+    vm2.invoke(() -> createReceiver( nyPort ));
+    vm2.invoke(() -> createPartitionedRegion( regionName, null, 0, 100, isOffHeap() ));
+    validateRegionSizes( regionName, numPuts, vm2 );
+    ignoredMTLE.remove();
+    ignoredGIOE.remove();
+  }
+
+  private void setMaximumMessageSize(int maximumMessageSizeBytes) {
+    System.setProperty("gemfire.client.max-message-size", String.valueOf(maximumMessageSizeBytes));
+    LogWriterUtils.getLogWriter().info("Set gemfire.client.max-message-size: " + System.getProperty("gemfire.client.max-message-size"));
+  }
+
   private void createSendersReceiversAndPartitionedRegion(Integer lnPort, Integer nyPort, boolean createAccessors,
       boolean startSenders) {
     // Note: This is a test-specific method used by several test to create


[07/54] [abbrv] incubator-geode git commit: GEODE-573: Fix broken image links in javadocs

Posted by je...@apache.org.
GEODE-573: Fix broken image links in javadocs

- moved javadoc images from doc-files to resources/javadoc-images.
- removed un-used images.
- gradle changes to copy images from src/main/resources to build/javadocs


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6266eb04
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6266eb04
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6266eb04

Branch: refs/heads/feature/GEODE-17-2
Commit: 6266eb04b5f98b7df97ab414b2eeaa049efbf176
Parents: 7734781
Author: Swapnil Bawaskar <sb...@pivotal.io>
Authored: Fri Feb 26 17:00:31 2016 -0800
Committer: Swapnil Bawaskar <sb...@pivotal.io>
Committed: Fri Mar 11 15:01:16 2016 -0800

----------------------------------------------------------------------
 geode-assembly/build.gradle                     |   10 +
 .../com/gemstone/gemfire/DataSerializable.java  |    2 +-
 .../internal/doc-files/config-hierarchy.fig     |  156 -
 .../admin/internal/doc-files/health-classes.fig |  233 --
 .../admin/internal/doc-files/health-classes.gif |  Bin 8973 -> 0 bytes
 .../gemfire/admin/internal/package.html         |    4 +-
 .../client/doc-files/example-client-cache.xml   |   46 -
 .../doc-files/ConnectionManagerImpl.dia         |  Bin 2034 -> 0 bytes
 .../doc-files/ConnectionManagerImpl.png         |  Bin 11825 -> 0 bytes
 .../client/internal/doc-files/PoolImpl.dia      |  Bin 3083 -> 0 bytes
 .../internal/doc-files/QueueManagerImpl.dia     |  Bin 2180 -> 0 bytes
 .../internal/doc-files/QueueManagerImpl.png     |  Bin 15075 -> 0 bytes
 .../doc-files/client_static_diagram.png         |  Bin 29430 -> 0 bytes
 .../gemfire/cache/client/internal/package.html  |    6 +-
 .../gemstone/gemfire/cache/client/package.html  |    2 +-
 .../gemfire/cache/doc-files/architecture.fig    |  170 -
 .../gemfire/cache/doc-files/architecture.gif    |  Bin 9983 -> 0 bytes
 .../cache/doc-files/entry-life-cycle.fig        |   64 -
 .../cache/doc-files/entry-life-cycle.gif        |  Bin 3357 -> 0 bytes
 .../gemfire/cache/doc-files/example-cache.xml   |   98 -
 .../gemfire/cache/doc-files/example2-cache.xml  |   63 -
 .../gemfire/cache/doc-files/example3-cache.xml  |   60 -
 .../cache/doc-files/partitioned-regions.fig     |  267 --
 .../cache/doc-files/partitioned-regions.gif     |  Bin 9494 -> 0 bytes
 .../com/gemstone/gemfire/cache/package.html     |    8 +-
 .../internal/doc-files/config-classes.fig       |  138 -
 .../internal/doc-files/config-classes.gif       |  Bin 4205 -> 0 bytes
 .../doc-files/distribution-managers.fig         |   76 -
 .../doc-files/distribution-managers.gif         |  Bin 3267 -> 0 bytes
 .../internal/locks/doc-files/elder.fig          |   84 -
 .../internal/locks/doc-files/elder.jpg          |  Bin 55182 -> 0 bytes
 .../internal/locks/doc-files/turks.fig          |  128 -
 .../internal/locks/doc-files/turks.jpg          |  Bin 79859 -> 0 bytes
 .../distributed/internal/locks/package.html     |    4 +-
 .../gemfire/distributed/internal/package.html   |    2 +-
 .../doc-files/data-serialization-exceptions.fig |  135 -
 .../doc-files/data-serialization-exceptions.gif |  Bin 3666 -> 0 bytes
 .../admin/doc-files/class-hierarchy.fig         |  224 -
 .../admin/doc-files/class-hierarchy.gif         |  Bin 11971 -> 0 bytes
 .../cache/doc-files/BucketAdvisor-state.png     |  Bin 39148 -> 0 bytes
 .../internal/cache/doc-files/eventmatrix.xls    |  Bin 24576 -> 0 bytes
 .../cache/doc-files/extensible-hashing.fig      |  159 -
 .../cache/doc-files/extensible-hashing.gif      |  Bin 6605 -> 0 bytes
 .../cache/doc-files/jcache-get-flow.fig         |  349 --
 .../cache/doc-files/jcache-get-flow.pdf         |  Bin 7519 -> 0 bytes
 .../cache/doc-files/jcache-put-flow.fig         |  359 --
 .../cache/doc-files/jcache-put-flow.pdf         |  Bin 7667 -> 0 bytes
 .../doc-files/jcache-update-message-flow.fig    |  334 --
 .../doc-files/jcache-update-message-flow.pdf    |  Bin 5937 -> 0 bytes
 .../cache/doc-files/partitioned-regions.fig     |  255 --
 .../cache/doc-files/partitioned-regions.gif     |  Bin 9273 -> 0 bytes
 .../internal/cache/doc-files/properties.html    | 3937 ------------------
 .../cache/doc-files/region-implementation.fig   |  262 --
 .../gemfire/internal/cache/package.html         |    8 +-
 .../gemfire/internal/cache/properties.html      | 3937 ++++++++++++++++++
 .../doc-files/communication-architecture.fig    |  158 -
 .../doc-files/communication-architecture.gif    |  Bin 5485 -> 0 bytes
 .../gemfire/internal/doc-files/cs-maps.fig      |  150 -
 .../gemfire/internal/doc-files/cs-maps.gif      |  Bin 5951 -> 0 bytes
 .../gemfire/internal/doc-files/ds-map.fig       |  105 -
 .../gemfire/internal/doc-files/ds-map.gif       |  Bin 4867 -> 0 bytes
 .../internal/doc-files/merge-log-files.fig      |  153 -
 .../internal/doc-files/merge-log-files.gif      |  Bin 2646 -> 0 bytes
 .../gemfire/internal/logging/MergeLogFiles.java |    2 +-
 .../internal/util/doc-files/call-stack.fig      |   34 -
 .../internal/util/doc-files/class-loaders.fig   |   49 -
 .../javadoc-images/BucketAdvisor-state.png      |  Bin 0 -> 39148 bytes
 .../javadoc-images/ConnectionManagerImpl.dia    |  Bin 0 -> 2034 bytes
 .../javadoc-images/ConnectionManagerImpl.png    |  Bin 0 -> 11825 bytes
 .../javadoc-images/QueueManagerImpl.dia         |  Bin 0 -> 2180 bytes
 .../javadoc-images/QueueManagerImpl.png         |  Bin 0 -> 15075 bytes
 .../javadoc-images/class-hierarchy.fig          |  224 +
 .../javadoc-images/class-hierarchy.gif          |  Bin 0 -> 11971 bytes
 .../javadoc-images/client_static_diagram.png    |  Bin 0 -> 29430 bytes
 .../data-serialization-exceptions.fig           |  135 +
 .../data-serialization-exceptions.gif           |  Bin 0 -> 3666 bytes
 .../javadoc-images/distribution-managers.fig    |   76 +
 .../javadoc-images/distribution-managers.gif    |  Bin 0 -> 3267 bytes
 .../src/main/resources/javadoc-images/elder.fig |   84 +
 .../src/main/resources/javadoc-images/elder.jpg |  Bin 0 -> 55182 bytes
 .../javadoc-images/entry-life-cycle.fig         |   64 +
 .../javadoc-images/entry-life-cycle.gif         |  Bin 0 -> 3357 bytes
 .../resources/javadoc-images/eventmatrix.xls    |  Bin 0 -> 24576 bytes
 .../resources/javadoc-images/example-cache.xml  |   98 +
 .../javadoc-images/example-client-cache.xml     |   46 +
 .../resources/javadoc-images/example2-cache.xml |   63 +
 .../resources/javadoc-images/example3-cache.xml |   60 +
 .../javadoc-images/extensible-hashing.fig       |  159 +
 .../javadoc-images/extensible-hashing.gif       |  Bin 0 -> 6605 bytes
 .../resources/javadoc-images/health-classes.gif |  Bin 0 -> 8973 bytes
 .../javadoc-images/jcache-get-flow.fig          |  349 ++
 .../javadoc-images/jcache-get-flow.pdf          |  Bin 0 -> 7519 bytes
 .../javadoc-images/jcache-put-flow.fig          |  359 ++
 .../javadoc-images/jcache-put-flow.pdf          |  Bin 0 -> 7667 bytes
 .../jcache-update-message-flow.fig              |  334 ++
 .../jcache-update-message-flow.pdf              |  Bin 0 -> 5937 bytes
 .../javadoc-images/merge-log-files.fig          |  153 +
 .../javadoc-images/merge-log-files.gif          |  Bin 0 -> 2646 bytes
 .../javadoc-images/partitioned-regions.fig      |  255 ++
 .../javadoc-images/partitioned-regions.gif      |  Bin 0 -> 9273 bytes
 .../src/main/resources/javadoc-images/turks.fig |  128 +
 .../src/main/resources/javadoc-images/turks.jpg |  Bin 0 -> 79859 bytes
 102 files changed, 6553 insertions(+), 8265 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index 22a5561..d2a5a65 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -212,6 +212,16 @@ task docs(type: Javadoc) {
     exclude 'com/gemstone/gemfire/distributed/**/util/**/'
     exclude 'com/gemstone/gemfire/test/**/'
     destinationDir = docsDir
+
+    doLast {
+      parent.subprojects.each { project ->
+        copy {
+          from project.sourceSets.main.resources.srcDirs
+          into docsDir
+          include 'javadoc-images/*'
+        }
+      }
+   }
 }
 
 gradle.taskGraph.whenReady( { graph ->

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/DataSerializable.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/DataSerializable.java b/geode-core/src/main/java/com/gemstone/gemfire/DataSerializable.java
index 4bacef4..2a0dc48 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/DataSerializable.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/DataSerializable.java
@@ -72,7 +72,7 @@ import java.io.*;
  * <P>
  *
  * <CENTER>
- * <IMG src="doc-files/data-serialization-exceptions.gif" 
+ * <IMG src="{@docRoot}/javadoc-images/data-serialization-exceptions.gif"
  *      HEIGHT="219" WIDTH="698">
  * </CENTER>
  *

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/doc-files/config-hierarchy.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/doc-files/config-hierarchy.fig b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/doc-files/config-hierarchy.fig
deleted file mode 100644
index 7d3f34d..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/doc-files/config-hierarchy.fig
+++ /dev/null
@@ -1,156 +0,0 @@
-#FIG 3.2
-Portrait
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 150 3825 2325 4725
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 150 4200 2325 4200
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 150 4725 2325 4725 2325 3825 150 3825 150 4725
-4 0 0 50 -1 1 12 0.0000 4 180 630 300 4425 port : int\001
-4 0 0 50 -1 1 12 0.0000 4 180 1485 300 4665 bindAddress : String\001
-4 0 0 50 -1 1 12 0.0000 4 180 1920 300 4050 DistributionLocatorConfig\001
--6
-6 2475 3825 4500 4125
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2475 3825 4500 3825 4500 4125 2475 4125 2475 3825
-4 0 0 50 -1 1 12 0.0000 4 180 1785 2625 4050 GemFireManagerConfig\001
--6
-6 4650 3825 6375 4500
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4650 4500 6375 4500 6375 3825 4650 3825 4650 4500
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4650 4200 6375 4200
-4 0 0 50 -1 1 12 0.0000 4 180 1545 4725 4425 cacheXmlFile : String\001
-4 0 0 50 -1 1 12 0.0000 4 180 1395 4800 4050 CacheServerConfig\001
--6
-6 6525 3825 7950 4125
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6525 3825 7950 3825 7950 4125 6525 4125 6525 3825
-4 0 0 50 -1 1 12 0.0000 4 180 1290 6600 4050 GFXServerConfig\001
--6
-6 3225 675 5250 2925
-6 3300 2400 4575 2850
-6 3300 2400 4575 2625
-4 0 0 50 -1 1 12 0.0000 4 180 1245 3300 2565 +validate() : void\001
--6
-4 0 0 50 -1 1 12 0.0000 4 180 1230 3300 2805 +clone() : Object\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3225 2925 5250 2925 5250 675 3225 675 3225 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3225 1050 5250 1050
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3225 2325 5250 2325
-4 0 0 50 -1 1 12 0.0000 4 180 885 3300 1275 host : String\001
-4 0 0 50 -1 1 12 0.0000 4 180 1860 3300 1515 workingDirectory : String\001
-4 0 0 50 -1 1 12 0.0000 4 180 1830 3300 1755 productDirectory : String\001
-4 0 0 50 -1 1 12 0.0000 4 180 1830 3300 1995 remoteCommand : String\001
-4 0 0 50 -1 1 12 0.0000 4 180 720 3300 2235 id : String\001
-4 0 0 50 -1 1 12 0.0000 4 180 1560 3450 900 ManagedEntityConfig\001
--6
-6 6750 7725 7650 8025
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6750 7725 7650 7725 7650 8025 6750 8025 6750 7725
-4 0 0 50 -1 1 12 0.0000 4 135 810 6825 7950 GFXServer\001
--6
-6 525 7725 2100 8025
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 525 7725 2100 7725 2100 8025 525 8025 525 7725
-4 0 0 50 -1 1 12 0.0000 4 135 1440 600 7950 DistributionLocator\001
--6
-6 2025 5625 3600 7050
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2025 7050 3600 7050 3600 5625 2025 5625 2025 7050
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2025 6000 3600 6000
-4 0 0 50 -1 1 12 0.0000 4 180 1440 2100 6225 isRunning : boolean\001
-4 0 0 50 -1 1 12 0.0000 4 180 900 2100 6465 start() : void\001
-4 0 0 50 -1 1 12 0.0000 4 180 870 2100 6705 stop() : void\001
-4 0 0 50 -1 1 12 0.0000 4 180 1200 2100 6945 getLog() : String\001
-4 0 0 50 -1 1 12 0.0000 4 180 1080 2250 5850 ManagedEntity\001
--6
-6 5175 5625 7275 6975
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5175 6975 7275 6975 7275 5625 5175 5625 5175 6975
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5175 6000 7275 6000
-4 0 0 50 -1 1 12 0.0000 4 180 1875 5325 6225 type : SystemMemberType\001
-4 0 0 50 -1 1 12 0.0000 4 180 1455 5325 6465 licsense : Properties\001
-4 0 0 50 -1 1 12 0.0000 4 180 1110 5325 6705 version : String\001
-4 0 0 50 -1 1 12 0.0000 4 135 1425 5325 6945 hasCache : boolean\001
-4 0 0 50 -1 1 12 0.0000 4 180 1095 5700 5850 SystemMember\001
--6
-6 4875 7725 5925 8025
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4875 7725 5925 7725 5925 8025 4875 8025 4875 7725
-4 0 0 50 -1 1 12 0.0000 4 135 915 4950 7950 CacheServer\001
--6
-6 2925 7725 4350 8025
-6 2925 7725 4350 8025
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2925 7725 4350 7725 4350 8025 2925 8025 2925 7725
-4 0 0 50 -1 1 12 0.0000 4 180 1305 3000 7950 GemFireManager\001
--6
--6
-6 150 9375 2550 9675
-2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
-	 150 9375 2550 9375 2550 9675 150 9675 150 9375
-4 0 0 50 -1 2 12 0.0000 4 180 2250 225 9600 DistributionLocatorJmxImpl\001
--6
-6 525 8625 2625 8925
-2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
-	 525 8625 2625 8625 2625 8925 525 8925 525 8625
-4 0 0 50 -1 2 12 0.0000 4 180 1920 600 8850 DistributionLocatorImpl\001
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
-	 1050 3825 1050 3375 7200 3375 7200 3825
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3450 3375 3450 3825
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5475 3375 5475 3825
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 4200 3375 4200 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
-	 1125 7725 1125 7500 7200 7500 7200 7725
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3375 7725 3375 7500
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5250 7725 5250 7500
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 2700 7500 2700 7050
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
-	 4200 7725 4200 7275 7350 7275 7350 7725
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 6150 7275 6150 6975
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5475 7725 5475 7275
-2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 750 7725 750 4725
-2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 3825 7725 3825 4125
-2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 4950 7725 4950 4500
-2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 7500 7725 7500 4125
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 300 9375 300 4725
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 1275 8625 1275 8025
-2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 1275 9375 1275 8925

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/doc-files/health-classes.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/doc-files/health-classes.fig b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/doc-files/health-classes.fig
deleted file mode 100644
index b2f8342..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/doc-files/health-classes.fig
+++ /dev/null
@@ -1,233 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 300 2475 4050 4050
-6 2550 3000 4050 3300
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2550 3000 4050 3000 4050 3300 2550 3300 2550 3000
-4 1 0 50 -1 1 12 0.0000 4 180 1410 3300 3225 CacheHealthConfig\001
--6
-6 300 3000 1950 3300
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 300 3000 1950 3000 1950 3300 300 3300 300 3000
-4 1 0 50 -1 1 12 0.0000 4 180 1560 1125 3225 MemberHealthConfig\001
--6
-6 1350 3750 3150 4050
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1350 3750 3150 3750 3150 4050 1350 4050 1350 3750
-4 1 0 50 -1 1 12 0.0000 4 180 1605 2250 3975 GemFireHealthConfig\001
--6
-6 1200 2475 3450 2775
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1200 2475 3450 2475 3450 2775 1200 2775 1200 2475
-4 1 0 50 -1 1 12 0.0000 4 180 2115 2325 2700 SystemManagerHealthConfig\001
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 4
-	1 0 1.00 150.00 150.00
-	1 0 1.00 150.00 150.00
-	 1125 3300 1125 3600 3300 3600 3300 3300
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
-	1 0 1.00 150.00 150.00
-	 2250 2775 2250 3750
--6
-6 1125 5925 3525 6225
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1125 5925 3525 5925 3525 6225 1125 6225 1125 5925
-4 1 0 50 -1 1 12 0.0000 4 180 2265 2325 6150 DistributedSystemHealthConfig\001
--6
-6 2325 5025 3525 5325
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2325 5025 3525 5025 3525 5325 2325 5325 2325 5025
-4 1 0 50 -1 1 12 0.0000 4 135 1125 2925 5250 GemFireHealth\001
--6
-6 4950 5925 7950 6225
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4950 5925 7950 5925 7950 6225 4950 6225 4950 5925
-4 1 0 50 -1 2 12 0.0000 4 180 2850 6450 6150 DistributedSystemHealthConfigImpl\001
--6
-6 9000 6750 12150 7425
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9075 6825 12075 6825 12075 7350 9075 7350 9075 6825
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9000 6750 12150 6750 12150 7425 9000 7425 9000 6750
-4 2 0 50 -1 -1 10 0.0000 4 135 2760 11925 7050 Class Hierarchy of the "Health" admin classes\001
-4 2 0 50 -1 -1 10 0.0000 6 105 765 11925 7230 GemFire 3.5\001
--6
-6 5775 1050 7275 1350
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7275 1350 5775 1350 5775 1050 7275 1050 7275 1350
-4 1 0 50 -1 1 12 0.0000 4 180 1365 6525 1275 java.io.Serializable\001
--6
-6 5475 1725 7725 2025
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5475 1725 7725 1725 7725 2025 5475 2025 5475 1725
-4 1 0 50 -1 2 12 0.0000 4 180 2055 6600 1950 MemberHealthConfigImpl\001
--6
-6 5475 3750 7725 4050
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5475 3750 7725 3750 7725 4050 5475 4050 5475 3750
-4 1 0 50 -1 2 12 0.0000 4 180 2070 6600 3975 GemFireHealthConfigImpl\001
--6
-6 5625 2400 7725 2700
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5625 2400 7725 2400 7725 2700 5625 2700 5625 2400
-4 1 0 50 -1 2 12 0.0000 4 180 1890 6675 2625 CacheHealthConfigImpl\001
--6
-6 5325 3075 8175 3375
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5325 3075 8175 3075 8175 3375 5325 3375 5325 3075
-4 1 0 50 -1 2 12 0.0000 4 180 2655 6750 3300 SystemManagerHealthConfigImpl\001
--6
-6 8775 3075 11475 3375
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8775 3075 11475 3075 11475 3375 8775 3375 8775 3075
-4 1 0 50 -1 2 12 0.0000 4 180 2520 10125 3300 SystemManagerHealthEvaluator\001
--6
-6 10125 3750 12225 4050
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 10125 3750 12225 3750 12225 4050 10125 4050 10125 3750
-4 1 0 50 -1 2 12 0.0000 4 135 1935 11175 3975 GemFireHealthEvaluator\001
--6
-6 8025 975 8775 1275
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8025 975 8775 975 8775 1275 8025 1275 8025 975
-4 1 0 50 -1 1 12 0.0000 4 135 630 8400 1200 Statistics\001
--6
-6 9600 975 11625 1275
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9600 975 11625 975 11625 1275 9600 1275 9600 975
-4 0 0 50 -1 3 12 0.0000 4 135 1845 9675 1200 AbstractHealthEvaluator\001
--6
-6 9000 2400 10950 2700
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9000 2400 10950 2400 10950 2700 9000 2700 9000 2400
-4 1 0 50 -1 2 12 0.0000 4 135 1755 9975 2625 CacheHealthEvaluator\001
--6
-6 8325 1725 10425 2025
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8325 1725 10425 1725 10425 2025 8325 2025 8325 1725
-4 1 0 50 -1 2 12 0.0000 4 135 1920 9375 1950 MemberHealthEvaluator\001
--6
-6 4725 4350 6150 4650
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4725 4350 6150 4350 6150 4650 4725 4650 4725 4350
-4 1 0 50 -1 1 12 0.0000 4 135 1305 5475 4575 JoinLeaveListener\001
--6
-6 6600 4350 9600 4650
-6 6600 4350 7875 4650
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6600 4350 7875 4350 7875 4650 6600 4650 6600 4350
-4 1 0 50 -1 1 12 0.0000 4 135 1065 7275 4575 HealthListener\001
--6
-6 8550 4350 9600 4650
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8550 4350 9600 4350 9600 4650 8550 4650 8550 4350
-4 1 0 50 -1 1 12 0.0000 4 135 900 9075 4575 GemFireVM\001
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 75.00 150.00
-	 7875 4500 8550 4500
--6
-6 5175 5025 6900 5325
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5175 5025 6900 5025 6900 5325 5175 5325 5175 5025
-4 1 0 50 -1 2 12 0.0000 4 180 1545 6000 5250 GemFireHealthImpl\001
--6
-6 10350 4725 12000 5025
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 10350 4725 12000 4725 12000 5025 10350 5025 10350 4725
-4 0 0 50 -1 2 12 0.0000 4 180 1515 10425 4950 HealthMonitorImpl\001
--6
-6 8625 5925 11475 6225
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8625 5925 11475 5925 11475 6225 8625 6225 8625 5925
-4 1 0 50 -1 2 12 0.0000 4 180 2715 10050 6150 DistributedSystemHealthEvaluator\001
--6
-2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 2
-	 4500 525 4500 7500
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 1 2
-	1 0 1.00 150.00 150.00
-	 3150 3900 5475 3900
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2625 5025 2625 4050
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 75.00 150.00
-	 2925 5325 2925 5925
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 1 2
-	1 0 1.00 150.00 150.00
-	 3525 5175 5175 5175
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 1 2
-	1 0 1.00 150.00 150.00
-	 3525 6075 4950 6075
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 75.00 150.00
-	 5550 5325 5550 5925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 75.00 150.00
-	 8625 6075 7950 6075
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 75.00 150.00
-	 6375 5025 6375 4050
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 150.00 150.00
-	 6525 3750 6525 3375
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 150.00 150.00
-	 6525 3075 6525 2700
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 150.00 150.00
-	 6525 2400 6525 2025
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 150.00 150.00
-	 6525 1725 6525 1350
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 75.00 150.00
-	 8775 3225 8175 3225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 75.00 150.00
-	 10125 3900 7725 3900
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 75.00 150.00
-	 8325 1875 7725 1875
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 75.00 150.00
-	 8925 2550 7725 2550
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 150.00 150.00
-	 11325 3075 11325 1275
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 150.00 150.00
-	 9975 1725 9975 1275
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9600 1125 8775 1125
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 3
-	0 0 1.00 60.00 120.00
-	 10425 1875 11925 1875 11925 3750
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 60.00 120.00
-	 10950 2550 11925 2550
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 150.00 150.00
-	 10800 2400 10800 1275
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 150.00 150.00
-	 5475 5025 5475 4650
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 150.00 150.00
-	 6750 5025 6750 4650
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 11100 4725 11100 4050
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 60.00 120.00
-	 6375 5325 6375 5625 9975 5625 9975 5925
-4 1 0 50 -1 -1 12 0.0000 4 75 90 2700 4200 *\001
-4 2 0 50 -1 -1 12 0.0000 4 180 2085 4350 675 com.gemstone.gemfire.admin\001
-4 0 0 50 -1 -1 12 0.0000 4 180 2655 4650 675 com.gemstone.gemfire.admin.internal\001
-4 1 0 50 -1 -1 12 0.0000 4 75 90 8925 1050 *\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/doc-files/health-classes.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/doc-files/health-classes.gif b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/doc-files/health-classes.gif
deleted file mode 100644
index 131347a..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/doc-files/health-classes.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/package.html
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/package.html b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/package.html
index 13cf928..a233ec5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/package.html
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/package.html
@@ -46,8 +46,8 @@ component has changed, it alerts the administrator process via a
 of GemFire are implemented.</P>
 
 <CENTER>
-<IMG src="doc-files/health-classes.gif" HEIGHT="803" WIDTH="473"/>
+<IMG src="{@docRoot}/javadoc-images/health-classes.gif" HEIGHT="803" />
 </CENTER>
 
 </BODY>
-</HTML>
\ No newline at end of file
+</HTML>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/client/doc-files/example-client-cache.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/doc-files/example-client-cache.xml b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/doc-files/example-client-cache.xml
deleted file mode 100644
index bddeb9f..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/doc-files/example-client-cache.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!-- A sample client GemFire declarative caching XML File -->
-
-<!DOCTYPE client-cache PUBLIC
-  "-//GemStone Systems, Inc.//GemFire Declarative Cache 6.5//EN"
-  "http://www.gemstone.com/dtd/cache6_5.dtd">
-<client-cache copy-on-read="false">
-
-  <pool name="myPool">
-    <locator host="myHostName" port="41111"/>
-  </pool>
-
-  <!-- Create a proxy region -->
-  <region name="region1" refid="PROXY"/>
-
-  <!-- Create a caching proxy region -->
-  <region name="region2" refid="CACHING_PROXY">
-    <region-attributes>
-
-      <entry-time-to-live>
-        <expiration-attributes action="destroy" timeout="3000"/>
-      </entry-time-to-live>
-
-      <entry-idle-time>
-        <expiration-attributes timeout="600"/>
-      </entry-idle-time>
-    </region-attributes>
-  </region>
-</client-cache>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/ConnectionManagerImpl.dia
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/ConnectionManagerImpl.dia b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/ConnectionManagerImpl.dia
deleted file mode 100644
index 39d8f3d..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/ConnectionManagerImpl.dia and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/ConnectionManagerImpl.png
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/ConnectionManagerImpl.png b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/ConnectionManagerImpl.png
deleted file mode 100644
index 773fabe..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/ConnectionManagerImpl.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/PoolImpl.dia
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/PoolImpl.dia b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/PoolImpl.dia
deleted file mode 100644
index 731aeb0..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/PoolImpl.dia and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/QueueManagerImpl.dia
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/QueueManagerImpl.dia b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/QueueManagerImpl.dia
deleted file mode 100644
index 8cc7d0e..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/QueueManagerImpl.dia and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/QueueManagerImpl.png
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/QueueManagerImpl.png b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/QueueManagerImpl.png
deleted file mode 100644
index d48bbf6..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/QueueManagerImpl.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/client_static_diagram.png
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/client_static_diagram.png b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/client_static_diagram.png
deleted file mode 100644
index afbeaa4..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/doc-files/client_static_diagram.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/package.html
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/package.html b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/package.html
index 18443ca..98abf85 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/package.html
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/package.html
@@ -20,7 +20,7 @@ limitations under the License.
 <P>
 
 <CENTER>
-<IMG SRC="doc-files/client_static_diagram.png"
+<IMG SRC="{@docRoot}/javadoc-images/client_static_diagram.png"
      />
      <h3> Static Architecture Overview </h3>
 </CENTER>
@@ -41,7 +41,7 @@ Operations are performed on the PoolImpl. The pool impl class has methods, such
 The ConnectionManagerImpl class owns the client to server connections. It creates new connections (using a connection factory and connection source) and allows the pool to check out/check in connections. It keeps track of the maximum and minimum number of connections allowed, and the idle timeout for connections.
 
 <CENTER>
-<IMG SRC="doc-files/ConnectionManagerImpl.png"
+<IMG SRC="{@docRoot}/javadoc-images/ConnectionManagerImpl.png"
      />
      <h3> Connection Manager Static Diagram </h3>
 </CENTER>
@@ -51,7 +51,7 @@ The ConnectionManagerImpl class owns the client to server connections. It create
 The ConnectionManagerImpl class owns the server to client connections. It creates new server to client connections (using a connection factory and connection source). It's responsible for maintaing the redundancy of the connections, and recovering interest on new connections.
 
 <CENTER>
-<IMG SRC="doc-files/QueueManagerImpl.png"
+<IMG SRC="{@docRoot}/javadoc-images/QueueManagerImpl.png"
      />
      <h3> Connection Manager Static Diagram </h3>
 </CENTER>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/client/package.html
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/package.html b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/package.html
index 224951d..9898040 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/package.html
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/package.html
@@ -61,7 +61,7 @@ The top level element must be a client-cache element.
 <p>The Document Type Definition for a declarative cache XML file can
 be found in <code>"doc-files/cache6_5.dtd"</code>.
 For examples of declarative cache XML files see <A
-href="doc-files/example-client-cache.xml">example1</A>.
+href="{@docRoot}/javadoc-images/example-client-cache.xml">example1</A>.
 
   </BODY>
 </HTML>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/architecture.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/architecture.fig b/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/architecture.fig
deleted file mode 100644
index 27c150e..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/architecture.fig
+++ /dev/null
@@ -1,170 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 4875 4350 6075 5175
-2 4 0 3 0 7 50 -1 -1 0.000 0 0 7 0 0 5
-	 6000 5100 4950 5100 4950 4425 6000 4425 6000 5100
-4 1 0 50 -1 0 12 0.0000 4 105 795 5475 4725 Distributed\001
-4 1 0 50 -1 0 12 0.0000 4 135 525 5475 4965 System\001
--6
-6 9075 900 11250 3600
-6 9900 1875 10725 2175
-2 4 0 1 1 7 50 -1 -1 0.000 0 0 7 0 0 5
-	 10725 2175 10725 1875 9900 1875 9900 2175 10725 2175
-4 0 1 50 -1 0 12 0.0000 4 105 705 9975 2100 Attributes\001
--6
-6 9900 2325 10350 3075
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9900 2475 10350 2475
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9900 2625 10350 2625
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9900 2775 10350 2775
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9900 2925 10350 2925
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9900 2325 10350 2325 10350 3075 9900 3075 9900 2325
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 10125 2325 10125 3075
--6
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9450 1500 10950 1500 10950 3300 9450 3300 9450 1500
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9075 900 11250 900 11250 3600 9075 3600 9075 900
-4 0 1 50 -1 0 12 0.0000 4 105 690 9150 1125 User VM\001
-4 0 1 50 -1 0 12 0.0000 4 150 990 9600 1725 Cache Region\001
--6
-6 9150 3825 11250 4275
-4 0 0 50 -1 1 12 0.0000 4 165 1740 9150 3975 A region whose contents\001
-4 0 0 50 -1 1 12 0.0000 4 165 2025 9150 4215 are stored in the VM's heap.\001
--6
-6 9075 6225 11250 8925
-6 9900 7200 10725 7500
-2 4 0 1 1 7 50 -1 -1 0.000 0 0 7 0 0 5
-	 10725 7500 10725 7200 9900 7200 9900 7500 10725 7500
-4 0 1 50 -1 0 12 0.0000 4 105 705 9975 7425 Attributes\001
--6
-6 9900 7650 10350 8400
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9900 7800 10350 7800
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9900 7950 10350 7950
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9900 8100 10350 8100
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9900 8250 10350 8250
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9900 7650 10350 7650 10350 8400 9900 8400 9900 7650
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 10125 7650 10125 8400
--6
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9450 6825 10950 6825 10950 8625 9450 8625 9450 6825
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9075 6225 11250 6225 11250 8925 9075 8925 9075 6225
-4 0 1 50 -1 0 12 0.0000 4 105 690 9150 6450 User VM\001
-4 0 1 50 -1 0 12 0.0000 4 150 990 9600 7050 Cache Region\001
--6
-6 4425 6225 6600 8925
-6 5250 7200 6075 7500
-2 4 0 1 1 7 50 -1 -1 0.000 0 0 7 0 0 5
-	 6075 7500 6075 7200 5250 7200 5250 7500 6075 7500
-4 0 1 50 -1 0 12 0.0000 4 105 705 5325 7425 Attributes\001
--6
-6 5250 7650 5700 8400
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5250 7800 5700 7800
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5250 7950 5700 7950
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5250 8100 5700 8100
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5250 8250 5700 8250
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5250 7650 5700 7650 5700 8400 5250 8400 5250 7650
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5475 7650 5475 8400
--6
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4800 6825 6300 6825 6300 8625 4800 8625 4800 6825
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4425 6225 6600 6225 6600 8925 4425 8925 4425 6225
-4 0 1 50 -1 0 12 0.0000 4 105 690 4500 6450 User VM\001
-4 0 1 50 -1 0 12 0.0000 4 150 990 4950 7050 Cache Region\001
--6
-6 6900 375 8550 8925
-2 1 1 1 0 7 50 -1 -1 8.000 0 0 -1 0 0 2
-	 7725 450 7725 8925
-4 1 0 50 -1 0 12 0.0000 4 120 705 7275 525 Machine1\001
-4 1 0 50 -1 0 12 0.0000 4 105 705 8175 525 Machine2\001
--6
-6 825 375 3000 3075
-6 1650 1350 2475 1650
-2 4 0 1 1 7 50 -1 -1 0.000 0 0 7 0 0 5
-	 2475 1650 2475 1350 1650 1350 1650 1650 2475 1650
-4 0 1 50 -1 0 12 0.0000 4 105 705 1725 1575 Attributes\001
--6
-6 1650 1800 2100 2550
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1650 1950 2100 1950
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1650 2100 2100 2100
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1650 2250 2100 2250
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1650 2400 2100 2400
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1650 1800 2100 1800 2100 2550 1650 2550 1650 1800
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1875 1800 1875 2550
--6
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1200 975 2700 975 2700 2775 1200 2775 1200 975
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 825 375 3000 375 3000 3075 825 3075 825 375
-4 0 1 50 -1 0 12 0.0000 4 105 690 900 600 User VM\001
-4 0 1 50 -1 0 12 0.0000 4 150 990 1350 1200 Cache Region\001
--6
-6 825 5550 3000 8250
-6 1650 6525 2475 6825
-2 4 0 1 1 7 50 -1 -1 0.000 0 0 7 0 0 5
-	 2475 6825 2475 6525 1650 6525 1650 6825 2475 6825
-4 0 1 50 -1 0 12 0.0000 4 105 705 1725 6750 Attributes\001
--6
-6 1650 6975 2100 7725
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1650 7125 2100 7125
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1650 7275 2100 7275
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1650 7425 2100 7425
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1650 7575 2100 7575
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1650 6975 2100 6975 2100 7725 1650 7725 1650 6975
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1875 6975 1875 7725
--6
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1200 6150 2700 6150 2700 7950 1200 7950 1200 6150
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 825 5550 3000 5550 3000 8250 825 8250 825 5550
-4 0 1 50 -1 0 12 0.0000 4 105 690 900 5775 User VM\001
-4 0 1 50 -1 0 12 0.0000 4 150 990 1350 6375 Cache Region\001
--6
-2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3000 1500 5175 4425
-2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5175 5100 3000 7125
-2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6000 4500 9075 1425
-2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6000 4950 9075 6750
-2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5475 6225 5475 5100

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/architecture.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/architecture.gif b/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/architecture.gif
deleted file mode 100644
index 82406b2..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/architecture.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/entry-life-cycle.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/entry-life-cycle.fig b/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/entry-life-cycle.fig
deleted file mode 100644
index e3108e5..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/entry-life-cycle.fig
+++ /dev/null
@@ -1,64 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-5 1 0 1 0 7 50 -1 -1 0.000 0 1 1 0 8243.750 2775.000 8175 3150 8625 2775 8175 2400
-	0 0 1.00 60.00 120.00
-5 1 0 1 0 7 50 -1 -1 0.000 0 0 1 0 4537.500 11400.000 1575 1875 4500 1425 7500 1875
-	0 0 1.00 60.00 120.00
-5 1 0 1 0 7 50 -1 -1 0.000 0 0 1 0 4575.000 -8137.500 7575 3675 4575 4050 1575 3675
-	0 0 1.00 60.00 120.00
-6 975 1875 2325 3675
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 975 1875 2325 1875 2325 3675 975 3675 975 1875
-4 1 1 50 -1 0 12 0.0000 4 180 510 1650 2175 Region\001
--6
-6 3900 1875 5250 3675
-6 4050 2625 5100 3000
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4050 2625 5100 2625 5100 3000 4050 3000 4050 2625
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4500 2625 4500 3000
-4 1 1 50 -1 0 12 0.0000 4 180 255 4275 2850 key\001
--6
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3900 1875 5250 1875 5250 3675 3900 3675 3900 1875
-4 1 1 50 -1 0 12 0.0000 4 180 510 4575 2175 Region\001
--6
-6 6825 1875 8175 3675
-6 6975 2625 8025 3000
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6975 2625 8025 2625 8025 3000 6975 3000 6975 2625
-2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7425 2625 7425 3000
-4 1 1 50 -1 0 12 0.0000 4 180 255 7200 2850 key\001
-4 1 1 50 -1 0 12 0.0000 4 135 375 7725 2850 value\001
--6
-2 2 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6825 1875 8175 1875 8175 3675 6825 3675 6825 1875
-4 1 1 50 -1 0 12 0.0000 4 180 510 7500 2175 Region\001
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2325 2475 3900 2475
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 3900 3000 2325 3000
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 5250 2400 6825 2400
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 6825 3000 5250 3000
-4 1 0 50 -1 0 12 0.0000 4 180 1140 3075 2325 create(key, null)\001
-4 1 0 50 -1 0 12 0.0000 4 180 900 3075 3300 destroy(key)\001
-4 1 0 50 -1 0 12 0.0000 4 180 1065 6000 2250 put(key, value)\001
-4 1 0 50 -1 0 12 0.0000 4 180 1050 6075 3300 invalidate(key)\001
-4 1 0 50 -1 0 12 0.0000 4 180 2640 4500 1275 create(key, value)  or  put(key, value)\001
-4 1 0 50 -1 0 12 0.0000 4 180 900 4575 4350 destroy(key)\001
-4 1 0 50 -1 0 12 0.0000 4 180 1065 9300 2850 put(key, value)\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/entry-life-cycle.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/entry-life-cycle.gif b/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/entry-life-cycle.gif
deleted file mode 100644
index 02de9d4..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/entry-life-cycle.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/example-cache.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/example-cache.xml b/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/example-cache.xml
deleted file mode 100644
index 0061b5c..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/example-cache.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!-- A sample GemFire declarative caching XML File -->
-
-<cache
-    xmlns="http://schema.pivotal.io/gemfire/cache"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
-    search-timeout="60" lock-lease="300" copy-on-read="false" version="8.1">
-
-  <!-- Create a partition region -->
-  <region name="myPartitionedRegion" refid="PARTITION">
-    <region-attributes>
-      <partition-attributes local-max-memory="32"/>
-
-      <cache-loader>
-        <class-name>com.company.app.DBLoader</class-name>
-      </cache-loader>
-
-      <eviction-attributes>
-        <lru-entry-count maximum="1000" action="local-destroy"/>
-      </eviction-attributes>
-
-    </region-attributes>
-  </region>
-  
-  <!-- Create a replicate region -->
-  <region name="customers" refid="REPLICATE">
-    <region-attributes>
-
-      <entry-time-to-live>
-        <expiration-attributes action="destroy" timeout="3000"/>
-      </entry-time-to-live>
-
-      <entry-idle-time>
-        <expiration-attributes timeout="600"/>
-      </entry-idle-time>
-
-      <cache-loader>
-        <class-name>com.company.app.DBLoader</class-name>
-        <parameter name="URL">
-          <string>jdbc://12.34.56.78/mydb</string>
-        </parameter>
-      </cache-loader>
-
-      <eviction-attributes>
-        <lru-memory-size maximum="1000" action="overflow-to-disk"> 
-          <class-name>com.company.data.MySizer</class-name>
-          <parameter name="name">
-            <string>SuperSizer</string>
-          </parameter>
-        </lru-memory-size>
-      </eviction-attributes>
-
-    </region-attributes>
-
-    <!-- Add an entry whose value is a Declarable object -->
-    <entry>
-      <key><string>Louise Jones</string></key>
-      <value>
-        <declarable>
-          <class-name>com.company.app.Customer</class-name>
-          <parameter name="name">
-            <string>Louise Jones</string>
-          </parameter>
-          <parameter name="address1">
-            <string>123 Main Street</string>
-          </parameter>
-          <parameter name="city">
-            <string>New York</string>
-          </parameter>
-          <parameter name="state">
-            <string>NY</string>
-          </parameter>
-          <parameter name="zip">
-            <string>12345</string>
-          </parameter>
-        </declarable>
-      </value>
-    </entry>
-  </region>
-</cache>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/example2-cache.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/example2-cache.xml b/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/example2-cache.xml
deleted file mode 100644
index b65c285..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/example2-cache.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<cache
-    xmlns="http://schema.pivotal.io/gemfire/cache"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
-    is-server="true" search-timeout="60" version="8.1">
-  <cache-transaction-manager>
-    <transaction-listener>
-       <class-name>com.company.data.MyTransactionListener</class-name>
-       <parameter name="URL">
-         <string>jdbc:cloudscape:rmi:MyData</string>
-       </parameter>
-    </transaction-listener>    
-  </cache-transaction-manager>
-
-  <cache-server port="12345" max-connections="256"/>
-
-  <region name="myRegion" refid="REPLICATE">
-    <region-attributes scope="global">
-      <entry-time-to-live>
-        <expiration-attributes action="invalidate" timeout="60"/>
-      </entry-time-to-live>
-      <cache-loader>
-        <class-name>com.company.data.DatabaseLoader</class-name>
-        <parameter name="URL">
-          <string>jdbc:cloudscape:rmi:MyData</string>
-        </parameter>
-      </cache-loader>
-    </region-attributes>
-  </region>
-
-  <region name="myOtherRegion" refid="REPLICATE">
-    <entry>
-      <key><string>MyKey</string></key>
-      <value><string>MyValue</string></value>
-    </entry>
-    <entry>
-      <key><string>MyOtherKey</string></key>
-      <value>
-        <declarable>
-          <class-name>com.company.data.MyDeclarable</class-name>
-        </declarable>
-      </value>
-    </entry>
-  </region>
-</cache>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/example3-cache.xml
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/example3-cache.xml b/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/example3-cache.xml
deleted file mode 100644
index 803e72e..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/example3-cache.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!-- A sample GemFire declarative caching XML File that demonstrates
-     the "named region attributes" feature.
--->
-
-<cache
-    xmlns="http://schema.pivotal.io/gemfire/cache"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://schema.pivotal.io/gemfire/cache http://schema.pivotal.io/gemfire/cache/cache-8.1.xsd"
-    version="8.1">
-  <region-attributes id="template" statistics-enabled="true" 
-                     scope="distributed-ack">
-    <key-constraint>java.lang.String</key-constraint>
-    <value-constraint>com.company.app.Customer</value-constraint>
-    <entry-idle-time>
-      <expiration-attributes timeout="60"/>
-    </entry-idle-time>
-  </region-attributes>
-
-  <!-- define a named region-attributes that uses the predefined REPLICATE -->
-  <region-attributes id="distributed" refid="REPLICATE">
-    <cache-loader>
-      <class-name>com.company.app.DBLoader</class-name>
-    </cache-loader>
-  </region-attributes>
-
-  <region-attributes id="persistent" refid="distributed"
-                     data-policy="persistent-replicate"> 
-    <eviction-attributes>
-      <lru-entry-count maximum="1000" action="overflow-to-disk"/>
-    </eviction-attributes>
-  </region-attributes>
-
-  <region name="customers" refid="template"/>
-  <region name="customers-west" refid="template"/>
-  <region name="customers-central" refid="template"/>
-  <region name="customers-east" refid="template"/>
-
-  <region name="orders" refid="template"/>
-  <region name="orders-west" refid="persistent"/>
-  <region name="orders-central" refid="persistent"/>
-  <region name="orders-east" refid="persistent"/>
-</cache>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/partitioned-regions.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/partitioned-regions.fig b/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/partitioned-regions.fig
deleted file mode 100644
index bd5b7a4..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/partitioned-regions.fig
+++ /dev/null
@@ -1,267 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 5625 1800 8025 3975
-6 6825 2175 7800 3600
-6 7087 2550 7537 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7312 2550 7312 3525
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7087 2550 7537 2550 7537 3525 7087 3525 7087 2550
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 2625 7537 2625
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 2700 7537 2700
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 2775 7537 2775
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 2850 7537 2850
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 2925 7537 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 3000 7537 3000
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 3075 7537 3075
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 3150 7537 3150
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 3225 7537 3225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 3300 7537 3300
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 3375 7537 3375
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 3450 7537 3450
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6825 2175 7800 2175 7800 3600 6825 3600 6825 2175
-4 0 0 50 -1 0 12 0.0000 4 135 735 6945 2400 Partition1\001
--6
-6 5850 2325 6300 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5850 2475 6300 2475
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5850 2625 6300 2625
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5850 2775 6300 2775
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6075 2325 6075 2925
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5850 2325 6300 2325 6300 2925 5850 2925 5850 2325
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5625 1800 8025 1800 8025 3975 5625 3975 5625 1800
-4 0 0 50 -1 0 12 0.0000 4 180 1215 5775 2025 Application VM\001
-4 0 0 50 -1 0 12 0.0000 4 135 2070 5775 3825 maxPartitionedData = 1000\001
--6
-6 8775 1800 10950 4125
-6 9375 2250 10350 3675
-6 9637 2625 10087 3600
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9862 2625 9862 3600
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9637 2625 10087 2625 10087 3600 9637 3600 9637 2625
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 2700 10087 2700
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 2775 10087 2775
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 2850 10087 2850
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 2925 10087 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 3000 10087 3000
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 3075 10087 3075
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 3150 10087 3150
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 3225 10087 3225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 3300 10087 3300
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 3375 10087 3375
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 3450 10087 3450
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 3525 10087 3525
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9375 2250 10350 2250 10350 3675 9375 3675 9375 2250
-4 0 0 50 -1 0 12 0.0000 4 135 735 9495 2475 Partition1\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8775 1800 10950 1800 10950 4125 8775 4125 8775 1800
-4 0 0 50 -1 0 12 0.0000 4 135 1365 9075 2025 Cache Server VM\001
-4 0 0 50 -1 0 12 0.0000 4 135 2070 8850 3975 maxPartitionedData = 1000\001
--6
-6 2325 3225 4425 4800
-6 2625 3675 3075 4275
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2625 3825 3075 3825
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2625 3975 3075 3975
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2625 4125 3075 4125
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2850 3675 2850 4275
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2625 3675 3075 3675 3075 4275 2625 4275 2625 3675
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2325 3225 4425 3225 4425 4800 2325 4800 2325 3225
-4 0 0 50 -1 0 12 0.0000 4 180 1215 2475 3450 Application VM\001
-4 0 0 50 -1 0 12 0.0000 4 135 1800 2550 4650 maxPartitionedData = 0\001
--6
-6 675 3600 2250 4500
-4 0 0 50 -1 0 12 0.0000 4 135 1155 675 3750 Some members\001
-4 0 0 50 -1 0 12 0.0000 4 135 1290 675 3975 of the distributed\001
-4 0 0 50 -1 0 12 0.0000 4 180 1500 675 4200 system may choose\001
-4 0 0 50 -1 0 12 0.0000 4 180 1515 675 4425 to not host paritions\001
--6
-6 6750 4200 7950 4875
-2 4 0 2 0 7 50 -1 -1 0.000 0 0 7 0 0 5
-	 7875 4800 6825 4800 6825 4275 7875 4275 7875 4800
-4 1 0 50 -1 0 12 0.0000 4 135 855 7350 4500 Distributed\001
-4 1 0 50 -1 0 12 0.0000 4 180 570 7350 4725 System\001
--6
-6 6000 5250 8250 7575
-6 6600 5700 7575 7125
-6 6862 6075 7312 7050
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7087 6075 7087 7050
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6862 6075 7312 6075 7312 7050 6862 7050 6862 6075
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6862 6150 7312 6150
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6862 6225 7312 6225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6862 6300 7312 6300
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6862 6375 7312 6375
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6862 6450 7312 6450
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6862 6525 7312 6525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6862 6600 7312 6600
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6862 6675 7312 6675
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6862 6750 7312 6750
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6862 6825 7312 6825
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6862 6900 7312 6900
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6862 6975 7312 6975
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6600 5700 7575 5700 7575 7125 6600 7125 6600 5700
-4 0 0 50 -1 0 12 0.0000 4 135 735 6720 5925 Partition2\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6000 5250 8250 5250 8250 7575 6000 7575 6000 5250
-4 0 0 50 -1 0 12 0.0000 4 135 1365 6300 5475 Cache Server VM\001
-4 0 0 50 -1 0 12 0.0000 4 135 2070 6075 7425 maxPartitionedData = 1000\001
--6
-6 8775 7800 11175 8475
-4 0 0 50 -1 0 12 0.0000 4 180 1980 8775 7950 To ensure high availability\001
-4 0 0 50 -1 0 12 0.0000 4 180 1965 8775 8175 of paritioned regions, data\001
-4 0 0 50 -1 0 12 0.0000 4 180 2385 8775 8400 is mirrored to a backup parition.\001
--6
-6 8775 5250 10950 7575
-6 9375 5700 10350 7125
-6 9637 6075 10087 7050
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9862 6075 9862 7050
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9637 6075 10087 6075 10087 7050 9637 7050 9637 6075
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 6150 10087 6150
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 6225 10087 6225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 6300 10087 6300
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 6375 10087 6375
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 6450 10087 6450
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 6525 10087 6525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 6600 10087 6600
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 6675 10087 6675
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 6750 10087 6750
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 6825 10087 6825
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 6900 10087 6900
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9637 6975 10087 6975
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9375 5700 10350 5700 10350 7125 9375 7125 9375 5700
-4 0 0 50 -1 0 12 0.0000 4 135 735 9495 5925 Partition2\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8775 5250 10950 5250 10950 7575 8775 7575 8775 5250
-4 0 0 50 -1 0 12 0.0000 4 180 1215 9075 5475 Application VM\001
-4 0 0 50 -1 0 12 0.0000 4 135 2070 8850 7425 maxPartitionedData = 1000\001
--6
-6 1875 2415 4200 3000
-4 0 0 50 -1 0 12 0.0000 4 135 2325 1875 2550 An accessor maintains a small\001
-4 0 0 50 -1 0 12 0.0000 4 180 2250 1875 2775 subset of the partioned region\001
-4 0 0 50 -1 0 12 0.0000 4 135 1185 1875 3000 for fast access.\001
--6
-6 3075 5490 5400 6075
-4 0 0 50 -1 0 12 0.0000 4 135 2325 3075 5625 Data not found in the accessor\001
-4 0 0 50 -1 0 12 0.0000 4 180 1950 3075 5850 is fetched from a partition\001
--6
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2
-	0 0 1.00 60.00 120.00
-	0 0 1.00 60.00 120.00
-	 6300 2400 6825 2700
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2
-	0 0 1.00 60.00 120.00
-	0 0 1.00 60.00 120.00
-	 3075 3750 6825 3000
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2
-	0 0 1.00 60.00 120.00
-	0 0 1.00 60.00 120.00
-	 3075 3900 6600 6300
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2
-	0 0 1.00 60.00 120.00
-	0 0 1.00 60.00 120.00
-	 6150 2925 6825 5700
-2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2
-	0 0 1.00 60.00 120.00
-	0 0 1.00 60.00 120.00
-	 7800 3075 9375 3075
-2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
-	 6825 4500 4425 4500
-2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
-	 7275 4275 7275 3975
-2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
-	 7275 4800 7275 5250
-2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
-	 7875 4350 8925 3825
-2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
-	 7875 4800 8925 5400
-2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2
-	0 0 1.00 60.00 120.00
-	0 0 1.00 60.00 120.00
-	 7575 6600 9375 6600
-2 1 1 2 0 7 50 -1 -1 4.500 0 0 -1 0 0 2
-	 8475 975 8475 8175
-4 0 0 50 -1 0 12 0.0000 4 135 750 7650 1125 Machine1\001
-4 0 0 50 -1 0 12 0.0000 4 135 750 8625 1125 Machine2\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/partitioned-regions.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/partitioned-regions.gif b/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/partitioned-regions.gif
deleted file mode 100644
index 06bdc27..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/cache/doc-files/partitioned-regions.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/cache/package.html
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/package.html b/geode-core/src/main/java/com/gemstone/gemfire/cache/package.html
index c4d72b1..84a071b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/package.html
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/package.html
@@ -142,7 +142,7 @@ com.gemstone.gemfire.cache.Region#destroy destroy} .  The following
 diagram describes the life cycle of a region entry.</p>
 
 <CENTER>
-<IMG SRC="doc-files/entry-life-cycle.gif"
+<IMG SRC="{@docRoot}/javadoc-images/entry-life-cycle.gif"
      WIDTH="598" HEIGHT="224"/>
 </CENTER>
 
@@ -487,9 +487,9 @@ The top level element must be a cache element.
 <p>The Document Type Definition for a declarative cache XML file can
 be found in <code>"doc-files/cache6_5.dtd"</code>. For examples of
 declarative cache XML files see <A
-href="doc-files/example-cache.xml">example1</A>, <A
-href="doc-files/example2-cache.xml">example2</A>, and <A
-href="doc-files/example3-cache.xml">example3</A>.
+href="{@docRoot}/javadoc-images/example-cache.xml">example1</A>, <A
+href="{@docRoot}/javadoc-images/example2-cache.xml">example2</A>, and <A
+href="{@docRoot}/javadoc-images/example3-cache.xml">example3</A>.
 
 <a name="clientServer"><h2>Client/Server Caching</h2><a href="#top">Back to Top</a>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/config-classes.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/config-classes.fig b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/config-classes.fig
deleted file mode 100644
index 769cd5e..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/config-classes.fig
+++ /dev/null
@@ -1,138 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 375 1500 2400 1800
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 375 1500 2400 1500 2400 1800 375 1800 375 1500
-4 0 0 50 0 0 12 0.0000 4 180 1860 450 1725 InternalDistributedSystem\001
--6
-6 675 450 2100 750
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 675 450 2100 450 2100 750 675 750 675 450
-4 0 0 50 0 0 12 0.0000 4 180 1320 750 675 DistributedSystem\001
--6
-6 450 2550 2250 4125
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	1 1 1.00 120.00 120.00
-	 600 3450 1050 3450
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 600 3675 1050 3675
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 450 2550 2250 2550 2250 4125 450 4125 450 2550
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 600 2925 1125 2925 1125 3225 600 3225 600 2925
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 1275 2925 2025 2925 2025 3225 1275 3225 1275 2925
-2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 600 3900 1050 3900
-4 0 0 50 0 0 12 0.0000 4 135 540 1350 3450 extends\001
-4 0 0 50 0 0 12 0.0000 4 180 810 1350 3690 implements\001
-4 0 0 50 0 0 12 0.0000 4 135 510 1350 3930 "has a"\001
-4 0 0 50 0 2 12 0.0000 4 180 570 525 2775 Legend\001
-4 0 0 50 0 0 12 0.0000 4 135 390 675 3150 Class\001
-4 0 0 50 0 1 12 0.0000 4 180 630 1350 3150 Interface\001
--6
-6 2775 150 4050 525
-2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
-	 2775 150 4050 150 4050 525 2775 525 2775 150
-4 0 0 50 -1 0 12 0.0000 4 180 1095 2925 375 AbstractConfig\001
--6
-6 2700 900 4875 1200
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2700 900 4875 900 4875 1200 2700 1200 2700 900
-4 0 0 50 -1 0 12 0.0000 4 180 1950 2778 1080 AbstractDistributionConfig\001
--6
-6 2775 2250 4650 2550
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2775 2250 4650 2250 4650 2550 2775 2550 2775 2250
-4 0 0 50 0 0 12 0.0000 4 180 1680 2850 2475 DistributionConfigImpl\001
--6
-6 6450 1650 7575 1950
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6450 1650 7575 1650 7575 1950 6450 1950 6450 1650
-4 0 0 50 0 1 12 0.0000 4 180 975 6525 1875 SystemConfig\001
--6
-6 4200 3675 6600 3975
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4200 3675 6600 3675 6600 3975 4200 3975 4200 3675
-4 0 0 50 0 0 12 0.0000 4 180 2310 4275 3900 ManagerSnapshotSystemConfig\001
--6
-6 3900 1650 5625 1950
-2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
-	 3900 1650 5625 1650 5625 1950 3900 1950 3900 1650
-4 0 0 50 -1 0 12 0.0000 4 180 1620 3975 1875 AbstractSystemConfig\001
--6
-6 4425 2925 6075 3225
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4425 2925 6075 2925 6075 3225 4425 3225 4425 2925
-4 0 0 50 0 0 12 0.0000 4 180 1560 4500 3150 InternalSystemConfig\001
--6
-6 6300 2925 8175 3225
-6 6300 2925 8175 3225
-6 6300 2925 8175 3225
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6300 2925 8175 2925 8175 3225 6300 3225 6300 2925
-4 0 0 50 0 0 12 0.0000 4 180 1650 6450 3150 ManagerSystemConfig\001
--6
--6
--6
-6 6075 900 7575 1200
-2 2 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6075 900 7575 900 7575 1200 6075 1200 6075 900
-4 0 0 50 0 1 12 0.0000 4 180 1350 6150 1125 DistributionConfig\001
--6
-6 6150 150 7575 525
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6150 150 7575 150 7575 525 6150 525 6150 150
-4 0 0 50 -1 1 12 0.0000 4 180 480 6600 375 Config\001
--6
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	1 1 1.00 120.00 120.00
-	 1350 1500 1350 750
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	1 1 1.00 120.00 120.00
-	 5175 2925 4725 1950
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	1 1 1.00 120.00 120.00
-	 5325 3675 5100 3225
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 1350 1800 2775 2400
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	1 1 1.00 120.00 120.00
-	 6900 1650 6900 1200
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 1 1.00 120.00 120.00
-	 6750 900 6750 525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	1 1 1.00 120.00 120.00
-	 3600 2250 3750 1200
-2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 4050 300 6150 300
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 4425 3075 3525 2550
-2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 4875 1050 6075 1050
-2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 1 1.00 120.00 120.00
-	 3750 900 3450 525
-2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 1 1.00 120.00 120.00
-	 4650 1650 4050 1200
-2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 5625 1800 6450 1800
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	1 1 1.00 120.00 120.00
-	 7125 2925 5175 1950

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/config-classes.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/config-classes.gif b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/config-classes.gif
deleted file mode 100644
index 1ada30c..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/config-classes.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/distribution-managers.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/distribution-managers.fig b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/distribution-managers.fig
deleted file mode 100644
index 591bf38..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/distribution-managers.fig
+++ /dev/null
@@ -1,76 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 3225 4800 4275 5250
-4 1 4 50 0 0 12 0.0000 4 135 660 3750 4950 GemFire\001
-4 1 4 50 0 0 12 0.0000 4 180 1020 3750 5190 Manager VM\001
--6
-6 3375 5550 4125 5850
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3375 5550 4125 5550 4125 5850 3375 5850 3375 5550
-4 1 4 50 0 0 12 0.0000 4 135 300 3750 5775 DM\001
--6
-6 3450 3525 5400 3975
-2 4 0 3 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 5325 3900 5325 3600 3525 3600 3525 3900 5325 3900
-4 1 0 50 0 0 12 0.0000 4 135 1560 4425 3825 Distribution Channel\001
--6
-6 5400 1800 7350 2850
-6 5625 2400 6225 2700
-2 2 0 1 1 7 50 0 -1 4.000 0 0 -1 0 0 5
-	 5625 2400 6225 2400 6225 2700 5625 2700 5625 2400
-4 1 1 50 0 0 12 0.0000 4 135 435 5925 2625 ADM\001
--6
-2 2 0 1 1 7 50 0 -1 4.000 0 0 -1 0 0 5
-	 5400 1800 7350 1800 7350 2850 5400 2850 5400 1800
-4 1 1 50 0 0 12 0.0000 4 135 1320 6375 2025 GemFire Console\001
--6
-6 5550 4125 6300 5100
-6 5625 4275 6225 4725
-4 1 23 50 0 0 12 0.0000 4 135 585 5925 4425 Locator\001
-4 1 23 50 0 0 12 0.0000 4 135 300 5925 4665 VM\001
--6
-2 2 0 1 23 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 5550 4125 6300 4125 6300 5100 5550 5100 5550 4125
--6
-6 4875 5250 6750 5925
-4 0 23 50 0 1 12 0.0000 4 135 1800 4875 5400 DMs contact the locator\001
-4 0 23 50 0 1 12 0.0000 4 180 1935 4875 5640 to find the other members\001
-4 0 23 50 0 1 12 0.0000 4 180 1920 4875 5880 of the distributed system.\001
--6
-6 6825 4425 10350 6300
-6 6975 5775 9750 6000
--6
-6 7050 6000 10275 6150
-2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 2
-	 7425 6075 7050 6075
-4 0 0 50 0 0 12 0.0000 4 135 2865 7575 6150 Connection to the distribution channel\001
--6
-2 2 0 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
-	 6825 4425 10350 4425 10350 6300 6825 6300 6825 4425
-4 0 0 50 0 2 12 0.0000 4 180 690 6975 4725 Lengend\001
-4 0 4 50 0 0 12 0.0000 4 180 2910 6975 5445 DM - NORMAL DistributionManager\001
-4 0 1 50 0 0 12 0.0000 4 180 3165 6975 5685 ADM - Admin-only DistributionManager\001
--6
-2 2 0 1 4 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3075 4725 4350 4725 4350 6000 3075 6000 3075 4725
-2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 1 2
-	0 0 1.00 60.00 120.00
-	0 0 1.00 60.00 120.00
-	 4125 5700 5025 3900
-2 1 1 1 0 7 50 0 -1 4.000 0 0 -1 1 1 2
-	0 0 1.00 60.00 120.00
-	0 0 1.00 60.00 120.00
-	 5925 2700 4725 3600
-2 1 0 1 23 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4125 5775 5550 4575
-2 1 0 1 23 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 5700 2700 5700 4125

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/distribution-managers.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/distribution-managers.gif b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/distribution-managers.gif
deleted file mode 100644
index b245730..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/doc-files/distribution-managers.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/elder.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/elder.fig b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/elder.fig
deleted file mode 100644
index aa01d0f..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/elder.fig
+++ /dev/null
@@ -1,84 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 1125 5475 2625 6600
-6 1275 6150 2475 6450
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1275 6150 2475 6150 2475 6450 1275 6450 1275 6150
-4 0 0 50 -1 0 12 0.0000 4 135 1005 1350 6375 "locks2" DLS\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1125 6600 2625 6600 2625 5475 1125 5475 1125 6600
-4 0 0 50 -1 0 12 0.0000 4 135 885 1425 5775 frodo:12004\001
--6
-6 3225 4500 4275 5100
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3225 4500 4275 4500 4275 5100 3225 5100 3225 4500
-4 1 0 50 -1 0 12 0.0000 4 135 795 3750 4725 Distributed\001
-4 1 0 50 -1 0 12 0.0000 4 180 525 3750 4965 System\001
--6
-6 4575 2325 6075 3600
-6 4725 2925 5925 3450
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4725 2925 5925 2925 5925 3450 4725 3450 4725 2925
-4 1 0 50 -1 0 12 0.0000 4 135 1005 5325 3150 "locks1" DLS\001
-4 1 0 50 -1 0 12 0.0000 4 135 885 5325 3390 GRANTOR\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4575 3600 6075 3600 6075 2325 4575 2325 4575 3600
-4 0 0 50 -1 0 12 0.0000 4 135 885 4875 2550 frodo:12002\001
--6
-6 4650 5025 6000 6600
-6 4725 6000 5925 6525
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4725 6000 5925 6000 5925 6525 4725 6525 4725 6000
-4 1 0 50 -1 0 12 0.0000 4 135 885 5325 6465 GRANTOR\001
-4 1 0 50 -1 0 12 0.0000 4 135 1005 5325 6225 "locks2" DLS\001
--6
-6 4725 5550 5925 5850
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4725 5550 5925 5550 5925 5850 4725 5850 4725 5550
-4 0 0 50 -1 0 12 0.0000 4 135 1005 4800 5775 "locks1" DLS\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4650 6600 6000 6600 6000 5025 4650 5025 4650 6600
-4 0 0 50 -1 0 12 0.0000 4 135 885 4875 5250 frodo:12003\001
--6
-6 825 4275 2325 5250
-4 0 0 50 -1 1 12 0.0000 4 180 1455 825 4425 A newly created lock\001
-4 0 0 50 -1 1 12 0.0000 4 135 1290 825 4665 service asks Elder\001
-4 0 0 50 -1 1 12 0.0000 4 135 1125 825 4905 who the current\001
-4 0 0 50 -1 1 12 0.0000 4 180 765 825 5145 grantor is.\001
--6
-6 5850 3975 7350 4425
-4 0 0 50 -1 1 12 0.0000 4 135 1470 5850 4125 A lock service knows\001
-4 0 0 50 -1 1 12 0.0000 4 180 1320 5850 4365 who its gratnor is.\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1425 3975 3375 3975 3375 2775 1425 2775 1425 3975
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1350 4050 3450 4050 3450 2325 1350 2325 1350 4050
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2400 6150 2400 3975
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3450 4500 3150 4050
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4050 4500 4725 3600
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4275 4950 4650 5100
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3375 5100 2625 5775
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 5775 5550 5775 3450
-4 0 0 50 -1 0 12 0.0000 4 135 1800 1500 3600 "locks1" -> frodo:12002\001
-4 0 0 50 -1 0 12 0.0000 4 135 1800 1500 3840 "locks2" -> frodo:12003\001
-4 0 0 50 -1 0 16 0.0000 4 165 510 2100 3075 Elder\001
-4 0 0 50 -1 0 12 0.0000 4 135 885 1950 2550 frodo:12001\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/elder.jpg
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/elder.jpg b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/elder.jpg
deleted file mode 100644
index 09ea45b..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/elder.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/turks.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/turks.fig b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/turks.fig
deleted file mode 100644
index f45177c..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/turks.fig
+++ /dev/null
@@ -1,128 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 3825 2025 5025 3225
-6 4050 2625 4800 3150
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4050 3150 4800 3150 4800 2625 4050 2625 4050 3150
-4 1 0 50 -1 -1 12 0.0000 4 135 540 4425 2850 Current\001
-4 1 0 50 -1 -1 12 0.0000 4 135 555 4425 3090 Grantor\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3825 2025 5025 2025 5025 3225 3825 3225 3825 2025
-4 0 0 50 -1 -1 12 0.0000 4 180 945 3975 2250 pippin:12002\001
--6
-6 5625 2025 6825 3225
-6 5925 2550 6525 3000
-4 1 0 50 -1 -1 12 0.0000 4 180 495 6225 2700 Young\001
-4 1 0 50 -1 -1 12 0.0000 4 135 480 6225 2940 Turk 1\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5850 2475 6600 2475 6600 3075 5850 3075 5850 2475
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5625 2025 6825 2025 6825 3225 5625 3225 5625 2025
-4 0 0 50 -1 -1 12 0.0000 4 180 945 5775 2250 pippin:12003\001
--6
-6 7425 2025 8625 3225
-6 7725 2550 8325 3000
-4 1 0 50 -1 -1 12 0.0000 4 180 495 8025 2700 Young\001
-4 1 0 50 -1 -1 12 0.0000 4 135 480 8025 2940 Turk 2\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7650 2475 8400 2475 8400 3075 7650 3075 7650 2475
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7425 2025 8625 2025 8625 3225 7425 3225 7425 2025
-4 0 0 50 -1 -1 12 0.0000 4 180 945 7575 2250 pippin:12004\001
--6
-6 9225 2025 10425 3225
-6 9525 2550 10125 3000
-4 1 0 50 -1 -1 12 0.0000 4 180 495 9825 2700 Young\001
-4 1 0 50 -1 -1 12 0.0000 4 135 480 9825 2940 Turk 3\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9450 2475 10200 2475 10200 3075 9450 3075 9450 2475
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9225 2025 10425 2025 10425 3225 9225 3225 9225 2025
-4 0 0 50 -1 -1 12 0.0000 4 180 945 9375 2250 pippin:12005\001
--6
-6 1050 2100 3075 2925
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1050 2925 3075 2925 3075 2100 1050 2100 1050 2925
-4 0 0 50 -1 -1 12 0.0000 4 180 1860 1125 2850 "locks1" -> pippin:12005\001
-4 0 0 50 -1 -1 16 0.0000 4 165 510 1725 2400 Elder\001
--6
-6 3825 4125 5025 5325
-6 4050 4725 4800 5250
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4050 5250 4800 5250 4800 4725 4050 4725 4050 5250
-4 1 0 50 -1 -1 12 0.0000 4 135 540 4425 4950 Current\001
-4 1 0 50 -1 -1 12 0.0000 4 135 555 4425 5190 Grantor\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3825 4125 5025 4125 5025 5325 3825 5325 3825 4125
-4 0 0 50 -1 -1 12 0.0000 4 180 945 3975 4350 pippin:12002\001
--6
-6 5625 4125 6825 5325
-6 5925 4650 6525 5100
-4 1 0 50 -1 -1 12 0.0000 4 180 495 6225 4800 Young\001
-4 1 0 50 -1 -1 12 0.0000 4 135 480 6225 5040 Turk 1\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5850 4575 6600 4575 6600 5175 5850 5175 5850 4575
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5625 4125 6825 4125 6825 5325 5625 5325 5625 4125
-4 0 0 50 -1 -1 12 0.0000 4 180 945 5775 4350 pippin:12003\001
--6
-6 9225 4125 10425 5325
-6 9525 4650 10125 5100
-4 1 0 50 -1 -1 12 0.0000 4 180 495 9825 4800 Young\001
-4 1 0 50 -1 -1 12 0.0000 4 135 480 9825 5040 Turk 3\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9450 4575 10200 4575 10200 5175 9450 5175 9450 4575
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9225 4125 10425 4125 10425 5325 9225 5325 9225 4125
-4 0 0 50 -1 -1 12 0.0000 4 180 945 9375 4350 pippin:12005\001
--6
-6 1050 4200 3075 5025
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1050 5025 3075 5025 3075 4200 1050 4200 1050 5025
-4 0 0 50 -1 -1 12 0.0000 4 180 1860 1125 4950 "locks1" -> pippin:12005\001
-4 0 0 50 -1 -1 16 0.0000 4 165 510 1725 4500 Elder\001
--6
-6 7500 4425 8550 4875
-4 1 0 50 -1 1 12 0.0000 4 180 960 8025 4575 pippin:12004\001
-4 1 0 50 -1 1 12 0.0000 4 135 555 8025 4815 crashes\001
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
-	 5475 1950 5475 1800 8775 1800 8775 1950
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 5850 2850 4800 2850
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 7650 2850 6600 2850
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 9450 2850 8400 2850
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 5850 4950 4800 4950
-2 1 0 5 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 975 3675 10650 3675
-4 0 0 50 -1 1 12 0.0000 4 180 3045 5625 1650 Have given up dreams of bcoming grantor\001
-4 0 0 50 -1 -1 12 0.0000 4 135 285 5175 2700 xfer\001
-4 0 0 50 -1 -1 12 0.0000 4 135 285 7050 2700 xfer\001
-4 0 0 50 -1 -1 12 0.0000 4 135 285 8775 2700 xfer\001
-4 0 0 50 -1 -1 12 0.0000 4 135 285 5175 4800 xfer\001
-4 0 0 50 -1 1 12 0.0000 4 180 1245 5775 5700 Stops xfer. knows\001
-4 0 0 50 -1 1 12 0.0000 4 135 1035 5775 5940 it will never be\001
-4 0 0 50 -1 1 12 0.0000 4 150 555 5775 6180 grantor\001
-4 0 0 50 -1 1 12 0.0000 4 180 1275 9300 5700 Initiates recovery,\001
-4 0 0 50 -1 1 12 0.0000 4 180 1215 9300 5940 becomes grantor\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/turks.jpg
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/turks.jpg b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/turks.jpg
deleted file mode 100644
index 5c66385..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/doc-files/turks.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/package.html
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/package.html b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/package.html
index e2b742e..65949ac 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/package.html
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/package.html
@@ -47,7 +47,7 @@ request is chosen to be the grantor.
 <P>
 
 <CENTER>
-<IMG SRC="doc-files/elder.jpg" WIDTH="435" HEIGHT="287">
+<IMG SRC="{@docRoot}/javadoc-images/elder.jpg" WIDTH="435" HEIGHT="287">
 </CENTER>
 
 <P>
@@ -264,7 +264,7 @@ has crashed and will initiate grantor recovery.
 <P>
 
 <CENTER>
-<IMG SRC="doc-files/turks.jpg" WIDTH="652" HEIGHT="315">
+<IMG SRC="{@docRoot}/javadoc-images/turks.jpg" WIDTH="652" HEIGHT="315">
 </CENTER>
 
 <H2>Elder Death</H2>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/package.html
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/package.html b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/package.html
index 4287ed6..cdb755f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/package.html
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/package.html
@@ -47,7 +47,7 @@ that is used by the <code>DistributionManager</code>.
 <P>
 
 <CENTER>
-<IMG SRC="doc-files/distribution-managers.gif"
+<IMG SRC="{@docRoot}/javadoc-images/distribution-managers.gif"
      WIDTH="573" HEIGHT="308"/>
 </CENTER>
 



[41/54] [abbrv] incubator-geode git commit: GEODE-620 Geode SSL configuration is out of date

Posted by je...@apache.org.
GEODE-620 Geode SSL configuration is out of date

the change in cipher suite caused suspect strings to be found in
one of the WANSSLDUnitTest test cases.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d72986be
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d72986be
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d72986be

Branch: refs/heads/feature/GEODE-17-2
Commit: d72986be565457c31270326e491c2be98a5e8102
Parents: 05cd144
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Thu Mar 17 10:54:03 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Thu Mar 17 10:54:28 2016 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java  | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d72986be/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java
index 36f1226..3df01ef 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANSSLDUnitTest.java
@@ -96,6 +96,8 @@ public class WANSSLDUnitTest extends WANTestBase{
   public void testSenderSSLReceiverNoSSL(){
     IgnoredException.addIgnoredException("Acceptor received unknown");
     IgnoredException.addIgnoredException("failed accepting client");
+    IgnoredException.addIgnoredException("Error in connecting to peer");
+    IgnoredException.addIgnoredException("Remote host closed connection during handshake");
       Integer lnPort = (Integer)vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId( 1 ));
       Integer nyPort = (Integer)vm1.invoke(() -> WANTestBase.createFirstRemoteLocator( 2, lnPort ));
 


[44/54] [abbrv] incubator-geode git commit: GEODE-949: refactor and repackage security test code

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlErrorHandler.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlErrorHandler.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlErrorHandler.java
new file mode 100755
index 0000000..19d10c6
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlErrorHandler.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.templates;
+
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * Implementation of {@link ErrorHandler} interface to handle validation errors
+ * while XML parsing.
+ * 
+ * This throws back exceptions raised for {@code error} and {@code fatalError}
+ * cases while a {@link LogWriter#warning(String)} level logging is done for
+ * the {@code warning} case.
+ * 
+ * @since 5.5
+ */
+public class XmlErrorHandler implements ErrorHandler {
+
+  private static final Logger logger = LogService.getLogger();
+
+  private final LogWriter systemLogWriter;
+  private final String xmlFileName;
+
+  public XmlErrorHandler(final LogWriter systemLogWriter, final String xmlFileName) {
+    this.systemLogWriter = systemLogWriter;
+    this.xmlFileName = xmlFileName;
+  }
+
+  /**
+   * Throws back the exception with the name of the XML file and the position
+   * where the exception occurred.
+   */
+  @Override
+  public void error(final SAXParseException exception) throws SAXException {
+    throw new SAXParseException("Error while parsing XML at line " + exception.getLineNumber() + " column " + exception.getColumnNumber() + ": " + exception.getMessage(), null, exception);
+  }
+
+  /**
+   * Throws back the exception with the name of the XML file and the position
+   * where the exception occurred.
+   */
+  @Override
+  public void fatalError(final SAXParseException exception) throws SAXException {
+    throw new SAXParseException("Fatal error while parsing XML at line " + exception.getLineNumber() + " column " + exception.getColumnNumber() + ": " + exception.getMessage(), null, exception);
+  }
+
+  /**
+   * Log the exception at {@link LogWriter#warning(String)} level with XML
+   * filename and the position of exception in the file.
+   */
+  @Override
+  public void warning(final SAXParseException exception) throws SAXException {
+    this.systemLogWriter.warning("Warning while parsing XML [" + this.xmlFileName + "] at line " + exception.getLineNumber() + " column " + exception.getColumnNumber() + ": " + exception.getMessage(), exception);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java
index 67357d9..ece90ba 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java
@@ -16,7 +16,6 @@
  */
 package com.gemstone.gemfire.test.dunit;
 
-
 public class NamedCallable<T> implements SerializableCallableIF<T> {
 
   private static final long serialVersionUID = -4417299628656632541L;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java
index 9c127b0..ba06f6e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java
@@ -16,7 +16,6 @@
  */
 package com.gemstone.gemfire.test.dunit;
 
-
 public class NamedRunnable implements SerializableRunnableIF {
 
   private static final long serialVersionUID = -2786841298145567914L;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/security/AuthzCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/security/AuthzCredentialGenerator.java b/geode-core/src/test/java/security/AuthzCredentialGenerator.java
deleted file mode 100755
index fdd10b0..0000000
--- a/geode-core/src/test/java/security/AuthzCredentialGenerator.java
+++ /dev/null
@@ -1,462 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package security;
-
-import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.security.AccessControl;
-import org.apache.logging.log4j.Logger;
-
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * Encapsulates obtaining authorized and unauthorized credentials for a given
- * operation in a region. Implementations will be for different kinds of
- * authorization scheme and authentication scheme combos.
- * 
- * @author sumedh
- * @since 5.5
- */
-public abstract class AuthzCredentialGenerator {
-  private static final Logger logger = LogService.getLogger();
-
-  /**
-   * Enumeration for various {@link AuthzCredentialGenerator} implementations.
-   * 
-   * The following schemes are supported as of now:
-   * <ul>
-   * <li><code>DummyAuthorization</code> with <code>DummyAuthenticator</code></li>
-   * <li><code>XMLAuthorization</code> with <code>DummyAuthenticator</code></li>
-   * <li><code>XMLAuthorization</code> with <code>LDAPAuthenticator</code></li>
-   * <li><code>XMLAuthorization</code> with <code>PKCSAuthenticator</code></li>
-   * <li><code>XMLAuthorization</code> when using SSL sockets</li>
-   * </ul>
-   * 
-   * To add a new authorization scheme the following needs to be done:
-   * <ul>
-   * <li>Add implementation for {@link AccessControl}.</li>
-   * <li>Choose the authentication schemes that it shall work with from
-   * {@link CredentialGenerator.ClassCode}</li>
-   * <li>Add a new enumeration value for the scheme in this class. Notice the
-   * size of <code>VALUES</code> array and increase that if it is getting
-   * overflowed. Note the methods and fields for existing schemes and add for
-   * the new one in a similar manner.</li>
-   * <li>Add an implementation for {@link AuthzCredentialGenerator}. Note the
-   * {@link AuthzCredentialGenerator#init} method where different authentication
-   * schemes can be passed and initialize differently for the authentication
-   * schemes that shall be handled.</li>
-   * <li>Modify the {@link AuthzCredentialGenerator#create} method to add
-   * creation of an instance of the new implementation for the
-   * <code>ClassCode</code> enumeration value.</li>
-   * </ul>
-   * All dunit tests will automagically start testing the new implementation
-   * after this.
-   * 
-   * @author sumedh
-   * @since 5.5
-   */
-  public static final class ClassCode {
-
-    private static final byte ID_DUMMY = 1;
-
-    private static final byte ID_XML = 2;
-
-    private static byte nextOrdinal = 0;
-
-    private static final ClassCode[] VALUES = new ClassCode[10];
-
-    private static final Map CodeNameMap = new HashMap();
-
-    public static final ClassCode DUMMY = new ClassCode(
-        templates.security.DummyAuthorization.class.getName() + ".create", ID_DUMMY);
-
-    public static final ClassCode XML = new ClassCode(
-        templates.security.XmlAuthorization.class.getName() + ".create", ID_XML);
-
-    /** The name of this class. */
-    private final String name;
-
-    /** byte used as ordinal to represent this class */
-    private final byte ordinal;
-
-    /**
-     * One of the following: ID_DUMMY, ID_LDAP, ID_PKI
-     */
-    private final byte classType;
-
-    /** Creates a new instance of class code. */
-    private ClassCode(String name, byte classType) {
-      this.name = name;
-      this.classType = classType;
-      this.ordinal = nextOrdinal++;
-      VALUES[this.ordinal] = this;
-      CodeNameMap.put(name, this);
-    }
-
-    public boolean isDummy() {
-      return (this.classType == ID_DUMMY);
-    }
-
-    public boolean isXml() {
-      return (this.classType == ID_XML);
-    }
-
-    /**
-     * Returns the <code>ClassCode</code> represented by specified ordinal.
-     */
-    public static ClassCode fromOrdinal(byte ordinal) {
-      return VALUES[ordinal];
-    }
-
-    /**
-     * Returns the <code>ClassCode</code> represented by specified string.
-     */
-    public static ClassCode parse(String operationName) {
-      return (ClassCode)CodeNameMap.get(operationName);
-    }
-
-    /**
-     * Returns all the possible values.
-     */
-    public static List getAll() {
-      List codes = new ArrayList();
-      Iterator iter = CodeNameMap.values().iterator();
-      while (iter.hasNext()) {
-        codes.add(iter.next());
-      }
-      return codes;
-    }
-
-    /**
-     * Returns the ordinal for this class code.
-     * 
-     * @return the ordinal of this class code.
-     */
-    public byte toOrdinal() {
-      return this.ordinal;
-    }
-
-    /**
-     * Returns a string representation for this class code.
-     * 
-     * @return the name of this class code.
-     */
-    final public String toString() {
-      return this.name;
-    }
-
-    /**
-     * Indicates whether other object is same as this one.
-     * 
-     * @return true if other object is same as this one.
-     */
-    @Override
-    final public boolean equals(final Object obj) {
-      if (obj == this) {
-        return true;
-      }
-      if (!(obj instanceof ClassCode)) {
-        return false;
-      }
-      final ClassCode other = (ClassCode)obj;
-      return (other.ordinal == this.ordinal);
-    }
-
-    /**
-     * Indicates whether other <code>ClassCode</code> is same as this one.
-     * 
-     * @return true if other <code>ClassCode</code> is same as this one.
-     */
-    final public boolean equals(final ClassCode opCode) {
-      return (opCode != null && opCode.ordinal == this.ordinal);
-    }
-
-    /**
-     * Returns a hash code value for this <code>ClassCode</code> which is the
-     * same as its ordinal.
-     * 
-     * @return the ordinal of this <code>ClassCode</code>.
-     */
-    @Override
-    final public int hashCode() {
-      return this.ordinal;
-    }
-
-  }
-
-  /**
-   * The {@link CredentialGenerator} being used.
-   */
-  protected CredentialGenerator cGen;
-
-  /**
-   * A set of system properties that should be added to the gemfire system
-   * properties before using the authorization module.
-   */
-  private Properties sysProps;
-
-  /**
-   * A factory method to create a new instance of an
-   * {@link AuthzCredentialGenerator} for the given {@link ClassCode}. Caller
-   * is supposed to invoke {@link AuthzCredentialGenerator#init} immediately
-   * after obtaining the instance.
-   * 
-   * @param classCode
-   *                the <code>ClassCode</code> of the
-   *                <code>AuthzCredentialGenerator</code> implementation
-   * 
-   * @return an instance of <code>AuthzCredentialGenerator</code> for the
-   *         given class code
-   */
-  public static AuthzCredentialGenerator create(ClassCode classCode) {
-    switch (classCode.classType) {
-      case ClassCode.ID_DUMMY:
-        return new DummyAuthzCredentialGenerator();
-      case ClassCode.ID_XML:
-        return new XmlAuthzCredentialGenerator();
-      default:
-        return null;
-    }
-  }
-
-  /**
-   * Initialize the authorized credential generator.
-   * 
-   * @param cGen
-   *                an instance of {@link CredentialGenerator} of the credential
-   *                implementation for which to obtain authorized/unauthorized
-   *                credentials.
-   * 
-   * @return false when the given {@link CredentialGenerator} is incompatible
-   *         with this authorization module.
-   */
-  public boolean init(CredentialGenerator cGen) {
-    this.cGen = cGen;
-    try {
-      this.sysProps = init();
-    }
-    catch (IllegalArgumentException ex) {
-      return false;
-    }
-    return true;
-  }
-
-  /**
-   * 
-   * @return A set of extra properties that should be added to Gemfire system
-   *         properties when not null.
-   */
-  public Properties getSystemProperties() {
-    return this.sysProps;
-  }
-
-  /**
-   * Get the {@link CredentialGenerator} being used by this instance.
-   */
-  public CredentialGenerator getCredentialGenerator() {
-    return this.cGen;
-  }
-
-  /**
-   * The {@link ClassCode} of the particular implementation.
-   * 
-   * @return the <code>ClassCode</code>
-   */
-  public abstract ClassCode classCode();
-
-  /**
-   * The name of the {@link AccessControl} factory function that should be used
-   * as the authorization module on the server side.
-   * 
-   * @return name of the <code>AccessControl</code> factory function
-   */
-  public abstract String getAuthorizationCallback();
-
-  /**
-   * Get a set of credentials generated using the given index allowed to perform
-   * the given {@link OperationCode}s for the given regions.
-   * 
-   * @param opCodes
-   *                the list of {@link OperationCode}s of the operations
-   *                requiring authorization; should not be null
-   * @param regionNames
-   *                list of the region names requiring authorization; a value of
-   *                null indicates all regions
-   * @param index
-   *                used to generate multiple such credentials by passing
-   *                different values for this
-   * 
-   * @return the set of credentials authorized to perform the given operation in
-   *         the given regions
-   */
-  public Properties getAllowedCredentials(OperationCode[] opCodes,
-      String[] regionNames, int index) {
-
-    int numTries = getNumPrincipalTries(opCodes, regionNames);
-    if (numTries <= 0) {
-      numTries = 1;
-    }
-    for (int tries = 0; tries < numTries; tries++) {
-      Principal principal = getAllowedPrincipal(opCodes, regionNames,
-          (index + tries) % numTries);
-      try {
-        return this.cGen.getValidCredentials(principal);
-      }
-      catch (IllegalArgumentException ex) {
-      }
-    }
-    return null;
-  }
-
-  /**
-   * Get a set of credentials generated using the given index not allowed to
-   * perform the given {@link OperationCode}s for the given regions. The
-   * credentials are required to be valid for authentication.
-   * 
-   * @param opCodes
-   *                the {@link OperationCode}s of the operations requiring
-   *                authorization failure; should not be null
-   * @param regionNames
-   *                list of the region names requiring authorization failure; a
-   *                value of null indicates all regions
-   * @param index
-   *                used to generate multiple such credentials by passing
-   *                different values for this
-   * 
-   * @return the set of credentials that are not authorized to perform the given
-   *         operation in the given region
-   */
-  public Properties getDisallowedCredentials(OperationCode[] opCodes,
-      String[] regionNames, int index) {
-
-    // This may not be very correct since we use the value of
-    // getNumPrincipalTries() but is used to avoid adding another method.
-    // Also something like getNumDisallowedPrincipals() will be normally always
-    // infinite, and the number here is just to perform some number of tries
-    // before giving up.
-    int numTries = getNumPrincipalTries(opCodes, regionNames);
-    if (numTries <= 0) {
-      numTries = 1;
-    }
-    for (int tries = 0; tries < numTries; tries++) {
-      Principal principal = getDisallowedPrincipal(opCodes, regionNames,
-          (index + tries) % numTries);
-      try {
-        return this.cGen.getValidCredentials(principal);
-      }
-      catch (IllegalArgumentException ex) {
-      }
-    }
-    return null;
-  }
-
-  /**
-   * Initialize the authorized credential generator.
-   * 
-   * Required to be implemented by concrete classes that implement this abstract
-   * class.
-   * 
-   * @return A set of extra properties that should be added to Gemfire system
-   *         properties when not null.
-   * 
-   * @throws IllegalArgumentException
-   *                 when the {@link CredentialGenerator} is incompatible with
-   *                 this authorization module.
-   */
-  protected abstract Properties init() throws IllegalArgumentException;
-
-  /**
-   * Get the number of tries to be done for obtaining valid credentials for the
-   * given operations in the given region. It is required that
-   * {@link #getAllowedPrincipal} method returns valid principals for values of
-   * <code>index</code> from 0 through (n-1) where <code>n</code> is the
-   * value returned by this method. It is recommended that the principals so
-   * returned be unique for efficiency.
-   * 
-   * This will be used by {@link #getAllowedCredentials} to step through
-   * different principals and obtain a set of valid credentials.
-   * 
-   * Required to be implemented by concrete classes that implement this abstract
-   * class.
-   * 
-   * @param opCodes
-   *                the {@link OperationCode}s of the operations requiring
-   *                authorization
-   * @param regionNames
-   *                list of the region names requiring authorization; a value of
-   *                null indicates all regions
-   * 
-   * @return the number of principals allowed to perform the given operation in
-   *         the given region
-   */
-  protected abstract int getNumPrincipalTries(OperationCode[] opCodes,
-      String[] regionNames);
-
-  /**
-   * Get a {@link Principal} generated using the given index allowed to perform
-   * the given {@link OperationCode}s for the given region.
-   * 
-   * Required to be implemented by concrete classes that implement this abstract
-   * class.
-   * 
-   * @param opCodes
-   *                the {@link OperationCode}s of the operations requiring
-   *                authorization
-   * @param regionNames
-   *                list of the region names requiring authorization; a value of
-   *                null indicates all regions
-   * @param index
-   *                used to generate multiple such principals by passing
-   *                different values for this
-   * 
-   * @return the {@link Principal} authorized to perform the given operation in
-   *         the given region
-   */
-  protected abstract Principal getAllowedPrincipal(OperationCode[] opCodes,
-      String[] regionNames, int index);
-
-  /**
-   * Get a {@link Principal} generated using the given index not allowed to
-   * perform the given {@link OperationCode}s for the given region.
-   * 
-   * Required to be implemented by concrete classes that implement this abstract
-   * class.
-   * 
-   * @param opCodes
-   *                the {@link OperationCode}s of the operations requiring
-   *                authorization failure
-   * @param regionNames
-   *                list of the region names requiring authorization failure; a
-   *                value of null indicates all regions
-   * @param index
-   *                used to generate multiple such principals by passing
-   *                different values for this
-   * 
-   * @return a {@link Principal} not authorized to perform the given operation
-   *         in the given region
-   */
-  protected abstract Principal getDisallowedPrincipal(OperationCode[] opCodes,
-      String[] regionNames, int index);
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/security/CredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/security/CredentialGenerator.java b/geode-core/src/test/java/security/CredentialGenerator.java
deleted file mode 100755
index 475cefa..0000000
--- a/geode-core/src/test/java/security/CredentialGenerator.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package security;
-
-import com.gemstone.gemfire.security.AuthInitialize;
-import com.gemstone.gemfire.security.Authenticator;
-
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * Encapsulates obtaining valid and invalid credentials. Implementations will be
- * for different kinds of authentication schemes.
- * 
- * @author sumedh
- * @since 5.5
- */
-public abstract class CredentialGenerator {
-
-  /**
-   * Enumeration for various {@link CredentialGenerator} implementations.
-   * 
-   * The following schemes are supported as of now:
-   * <code>DummyAuthenticator</code>, <code>LdapUserAuthenticator</code>,
-   * <code>PKCSAuthenticator</code>. In addition SSL socket mode with mutual
-   * authentication is also supported.
-   * 
-   * To add a new authentication scheme the following needs to be done:
-   * <ul>
-   * <li>Add implementations for {@link AuthInitialize} and
-   * {@link Authenticator} classes for clients/peers.</li>
-   * <li>Add a new enumeration value for the scheme in this class. Notice the
-   * size of <code>VALUES</code> array and increase that if it is getting
-   * overflowed. Note the methods and fields for existing schemes and add for
-   * the new one in a similar manner.</li>
-   * <li>Add an implementation for {@link CredentialGenerator}.</li>
-   * <li>Modify the CredentialGenerator.Factory#create [no such Factory exists] method to add
-   * creation of an instance of the new implementation for the
-   * <code>ClassCode</code> enumeration value.</li>
-   * </ul>
-   * All security dunit tests will automagically start testing the new
-   * implementation after this.
-   * 
-   * @author sumedh
-   * @since 5.5
-   */
-  public static final class ClassCode {
-
-    private static final byte ID_DUMMY = 1;
-
-    private static final byte ID_LDAP = 2;
-
-    private static final byte ID_PKCS = 3;
-
-    private static final byte ID_SSL = 4;
-
-    private static byte nextOrdinal = 0;
-
-    private static final ClassCode[] VALUES = new ClassCode[10];
-
-    private static final Map CodeNameMap = new HashMap();
-
-    public static final ClassCode DUMMY = new ClassCode(
-        templates.security.DummyAuthenticator.class.getName() + ".create", ID_DUMMY);
-
-    public static final ClassCode LDAP = new ClassCode(
-        templates.security.LdapUserAuthenticator.class.getName() + ".create", ID_LDAP);
-
-    public static final ClassCode PKCS = new ClassCode(
-        templates.security.PKCSAuthenticator.class.getName() + ".create", ID_PKCS);
-
-    public static final ClassCode SSL = new ClassCode("SSL", ID_SSL);
-
-    /** The name of this class. */
-    private final String name;
-
-    /** byte used as ordinal to represent this class */
-    private final byte ordinal;
-
-    /**
-     * One of the following: ID_DUMMY, ID_LDAP, ID_PKCS
-     */
-    private final byte classType;
-
-    /** Creates a new instance of class code. */
-    private ClassCode(String name, byte classType) {
-      this.name = name;
-      this.classType = classType;
-      this.ordinal = nextOrdinal++;
-      VALUES[this.ordinal] = this;
-      CodeNameMap.put(name, this);
-    }
-
-    public boolean isDummy() {
-      return (this.classType == ID_DUMMY);
-    }
-
-    public boolean isLDAP() {
-      return (this.classType == ID_LDAP);
-    }
-
-    public boolean isPKCS() {
-      return (this.classType == ID_PKCS);
-    }
-
-    public boolean isSSL() {
-      return (this.classType == ID_SSL);
-    }
-
-    /**
-     * Returns the <code>ClassCode</code> represented by specified ordinal.
-     */
-    public static ClassCode fromOrdinal(byte ordinal) {
-      return VALUES[ordinal];
-    }
-
-    /**
-     * Returns the <code>ClassCode</code> represented by specified string.
-     */
-    public static ClassCode parse(String operationName) {
-      return (ClassCode)CodeNameMap.get(operationName);
-    }
-
-    /**
-     * Returns all the possible values.
-     */
-    public static List getAll() {
-      List codes = new ArrayList();
-      Iterator iter = CodeNameMap.values().iterator();
-      while (iter.hasNext()) {
-        codes.add(iter.next());
-      }
-      return codes;
-    }
-
-    /**
-     * Returns the ordinal for this operation code.
-     * 
-     * @return the ordinal of this operation.
-     */
-    public byte toOrdinal() {
-      return this.ordinal;
-    }
-
-    /**
-     * Returns a string representation for this operation.
-     * 
-     * @return the name of this operation.
-     */
-    final public String toString() {
-      return this.name;
-    }
-
-    /**
-     * Indicates whether other object is same as this one.
-     * 
-     * @return true if other object is same as this one.
-     */
-    @Override
-    final public boolean equals(final Object obj) {
-      if (obj == this) {
-        return true;
-      }
-      if (!(obj instanceof ClassCode)) {
-        return false;
-      }
-      final ClassCode other = (ClassCode)obj;
-      return (other.ordinal == this.ordinal);
-    }
-
-    /**
-     * Indicates whether other <code>ClassCode</code> is same as this one.
-     * 
-     * @return true if other <code>ClassCode</code> is same as this one.
-     */
-    final public boolean equals(final ClassCode opCode) {
-      return (opCode != null && opCode.ordinal == this.ordinal);
-    }
-
-    /**
-     * Returns a hash code value for this <code>ClassCode</code> which is the
-     * same as its ordinal.
-     * 
-     * @return the ordinal of this operation.
-     */
-    @Override
-    final public int hashCode() {
-      return this.ordinal;
-    }
-
-  }
-
-  /**
-   * A set of properties that should be added to the Gemfire system properties
-   * before using the authentication module.
-   */
-  private Properties sysProps = null;
-
-  /**
-   * A set of properties that should be added to the java system properties
-   * before using the authentication module.
-   */
-  protected Properties javaProps = null;
-
-  /**
-   * A factory method to create a new instance of an {@link CredentialGenerator}
-   * for the given {@link ClassCode}. Caller is supposed to invoke
-   * {@link CredentialGenerator#init} immediately after obtaining the instance.
-   * 
-   * @param classCode
-   *                the <code>ClassCode</code> of the
-   *                <code>CredentialGenerator</code> implementation
-   * 
-   * @return an instance of <code>CredentialGenerator</code> for the given
-   *         class code
-   */
-  public static CredentialGenerator create(ClassCode classCode) {
-    switch (classCode.classType) {
-      // Removing dummy one to reduce test run times
-      // case ClassCode.ID_DUMMY:
-      // return new DummyCredentialGenerator();
-      case ClassCode.ID_LDAP:
-        return new LdapUserCredentialGenerator();
-        // case ClassCode.ID_SSL:ø
-        // return new SSLCredentialGenerator();
-      case ClassCode.ID_PKCS:
-        return new PKCSCredentialGenerator();
-      default:
-        return null;
-    }
-  }
-
-  /**
-   * Initialize the credential generator.
-   * 
-   * @throws IllegalArgumentException
-   *                 when there is a problem during initialization
-   */
-  public void init() throws IllegalArgumentException {
-    this.sysProps = initialize();
-  }
-
-  /**
-   * Initialize the credential generator. This is provided separately from the
-   * {@link #init} method for convenience of implementations so that they do not
-   * need to store in {@link #sysProps}. The latter is convenient for the users
-   * who do not need to store these properties rather can obtain it later by
-   * invoking {@link #getSystemProperties}
-   * 
-   * Required to be implemented by concrete classes that implement this abstract
-   * class.
-   * 
-   * @return A set of extra properties that should be added to Gemfire system
-   *         properties when not null.
-   * 
-   * @throws IllegalArgumentException
-   *                 when there is a problem during initialization
-   */
-  protected abstract Properties initialize() throws IllegalArgumentException;
-
-  /**
-   * 
-   * @return A set of extra properties that should be added to Gemfire system
-   *         properties when not null.
-   */
-  public Properties getSystemProperties() {
-    return this.sysProps;
-  }
-
-  /**
-   * 
-   * @return A set of extra properties that should be added to Gemfire system
-   *         properties when not null.
-   */
-  public Properties getJavaProperties() {
-    return this.javaProps;
-  }
-
-  /**
-   * The {@link ClassCode} of this particular implementation.
-   * 
-   * @return the <code>ClassCode</code>
-   */
-  public abstract ClassCode classCode();
-
-  /**
-   * The name of the {@link AuthInitialize} factory function that should be used
-   * in conjunction with the credentials generated by this generator.
-   * 
-   * @return name of the <code>AuthInitialize</code> factory function
-   */
-  public abstract String getAuthInit();
-
-  /**
-   * The name of the {@link Authenticator} factory function that should be used
-   * in conjunction with the credentials generated by this generator.
-   * 
-   * @return name of the <code>Authenticator</code> factory function
-   */
-  public abstract String getAuthenticator();
-
-  /**
-   * Get a set of valid credentials generated using the given index.
-   */
-  public abstract Properties getValidCredentials(int index);
-
-  /**
-   * Get a set of valid credentials for the given {@link Principal}.
-   * 
-   * @return credentials for the given <code>Principal</code> or null if none
-   *         possible.
-   */
-  public abstract Properties getValidCredentials(Principal principal);
-
-  /**
-   * Get a set of invalid credentials generated using the given index.
-   */
-  public abstract Properties getInvalidCredentials(int index);
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/security/DummyAuthzCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/security/DummyAuthzCredentialGenerator.java b/geode-core/src/test/java/security/DummyAuthzCredentialGenerator.java
deleted file mode 100755
index 8496be3..0000000
--- a/geode-core/src/test/java/security/DummyAuthzCredentialGenerator.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package security;
-
-import java.security.Principal;
-import java.util.HashSet;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
-import templates.security.DummyAuthorization;
-import templates.security.UsernamePrincipal;
-
-public class DummyAuthzCredentialGenerator extends AuthzCredentialGenerator {
-
-  public static final byte READER_ROLE = 1;
-
-  public static final byte WRITER_ROLE = 2;
-
-  public static final byte ADMIN_ROLE = 3;
-
-  private static Set readerOpsSet;
-
-  private static Set writerOpsSet;
-
-  static {
-
-    readerOpsSet = new HashSet();
-    for (int index = 0; index < DummyAuthorization.READER_OPS.length; index++) {
-      readerOpsSet.add(DummyAuthorization.READER_OPS[index]);
-    }
-    writerOpsSet = new HashSet();
-    for (int index = 0; index < DummyAuthorization.WRITER_OPS.length; index++) {
-      writerOpsSet.add(DummyAuthorization.WRITER_OPS[index]);
-    }
-  }
-
-  public DummyAuthzCredentialGenerator() {
-  }
-
-  protected Properties init() throws IllegalArgumentException {
-
-    if (!this.cGen.classCode().isDummy()) {
-      throw new IllegalArgumentException(
-          "DummyAuthorization module only works with DummyAuthenticator");
-    }
-    return null;
-  }
-
-  public ClassCode classCode() {
-    return ClassCode.DUMMY;
-  }
-
-  public String getAuthorizationCallback() {
-    return templates.security.DummyAuthorization.class.getName() + ".create";
-  }
-
-  public static byte getRequiredRole(OperationCode[] opCodes) {
-
-    byte roleType = ADMIN_ROLE;
-    boolean requiresReader = true;
-    boolean requiresWriter = true;
-
-    for (int opNum = 0; opNum < opCodes.length; opNum++) {
-      if (requiresReader && !readerOpsSet.contains(opCodes[opNum])) {
-        requiresReader = false;
-      }
-      if (requiresWriter && !writerOpsSet.contains(opCodes[opNum])) {
-        requiresWriter = false;
-      }
-    }
-    if (requiresReader) {
-      roleType = READER_ROLE;
-    }
-    else if (requiresWriter) {
-      roleType = WRITER_ROLE;
-    }
-    return roleType;
-  }
-
-  private Principal getPrincipal(byte roleType, int index) {
-
-    String[] admins = new String[] { "root", "admin", "administrator" };
-    switch (roleType) {
-      case READER_ROLE:
-        return new UsernamePrincipal("reader" + index);
-      case WRITER_ROLE:
-        return new UsernamePrincipal("writer" + index);
-      default:
-        return new UsernamePrincipal(admins[index % admins.length]);
-    }
-  }
-
-  protected Principal getAllowedPrincipal(OperationCode[] opCodes,
-      String[] regionNames, int index) {
-
-    byte roleType = getRequiredRole(opCodes);
-    return getPrincipal(roleType, index);
-  }
-
-  protected Principal getDisallowedPrincipal(OperationCode[] opCodes,
-      String[] regionNames, int index) {
-
-    byte roleType = getRequiredRole(opCodes);
-    byte disallowedRoleType;
-    switch (roleType) {
-      case READER_ROLE:
-        disallowedRoleType = WRITER_ROLE;
-        break;
-      case WRITER_ROLE:
-        disallowedRoleType = READER_ROLE;
-        break;
-      default:
-        disallowedRoleType = READER_ROLE;
-        break;
-    }
-    return getPrincipal(disallowedRoleType, index);
-  }
-
-  protected int getNumPrincipalTries(OperationCode[] opCodes,
-      String[] regionNames) {
-    return 5;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/security/DummyCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/security/DummyCredentialGenerator.java b/geode-core/src/test/java/security/DummyCredentialGenerator.java
deleted file mode 100755
index 5419587..0000000
--- a/geode-core/src/test/java/security/DummyCredentialGenerator.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package security;
-
-import templates.security.DummyAuthenticator;
-import templates.security.UserPasswordAuthInit;
-
-import java.security.Principal;
-import java.util.Properties;
-
-public class DummyCredentialGenerator extends CredentialGenerator {
-
-  public DummyCredentialGenerator() {
-  }
-
-  protected Properties initialize() throws IllegalArgumentException {
-    return null;
-  }
-
-  public ClassCode classCode() {
-    return ClassCode.DUMMY;
-  }
-
-  public String getAuthInit() {
-    return templates.security.UserPasswordAuthInit.class.getName() + ".create";
-  }
-
-  public String getAuthenticator() {
-    return templates.security.DummyAuthenticator.class.getName() + ".create";
-  }
-
-  public Properties getValidCredentials(int index) {
-
-    String[] validGroups = new String[] { "admin", "user", "reader", "writer" };
-    String[] admins = new String[] { "root", "admin", "administrator" };
-
-    Properties props = new Properties();
-    int groupNum = (index % validGroups.length);
-    String userName;
-    if (groupNum == 0) {
-      userName = admins[index % admins.length];
-    }
-    else {
-      userName = validGroups[groupNum] + (index / validGroups.length);
-    }
-    props.setProperty(UserPasswordAuthInit.USER_NAME, userName);
-    props.setProperty(UserPasswordAuthInit.PASSWORD, userName);
-    return props;
-  }
-
-  public Properties getValidCredentials(Principal principal) {
-
-    String userName = principal.getName();
-    if (DummyAuthenticator.testValidName(userName)) {
-      Properties props = new Properties();
-      props.setProperty(UserPasswordAuthInit.USER_NAME, userName);
-      props.setProperty(UserPasswordAuthInit.PASSWORD, userName);
-      return props;
-    }
-    else {
-      throw new IllegalArgumentException("Dummy: [" + userName
-          + "] is not a valid user");
-    }
-  }
-
-  public Properties getInvalidCredentials(int index) {
-
-    Properties props = new Properties();
-    props.setProperty(UserPasswordAuthInit.USER_NAME, "invalid" + index);
-    props.setProperty(UserPasswordAuthInit.PASSWORD, "none");
-    return props;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/security/LdapUserCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/security/LdapUserCredentialGenerator.java b/geode-core/src/test/java/security/LdapUserCredentialGenerator.java
deleted file mode 100755
index 2b95616..0000000
--- a/geode-core/src/test/java/security/LdapUserCredentialGenerator.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package security;
-
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.cache.tier.sockets.HandShake;
-import com.gemstone.gemfire.util.test.TestUtil;
-import templates.security.LdapUserAuthenticator;
-import templates.security.UserPasswordAuthInit;
-
-import java.security.Principal;
-import java.util.Properties;
-import java.util.Random;
-
-public class LdapUserCredentialGenerator extends CredentialGenerator {
-
-  private static final String USER_PREFIX = "gemfire";
-
-  private static boolean enableServerAuthentication = false;
-
-  private boolean serverAuthEnabled = false;
-
-  private static final Random prng = new Random();
-
-  private static final String[] algos = new String[] { "", "DESede", "AES:128",
-      "Blowfish:128" };
-
-  public LdapUserCredentialGenerator() {
-    // Toggle server authentication enabled for each test
-    // This is done instead of running all the tests with both
-    // server auth enabled/disabled to reduce test run time.
-    enableServerAuthentication = !enableServerAuthentication;
-    serverAuthEnabled = enableServerAuthentication;
-  }
-
-  @Override
-  protected Properties initialize() throws IllegalArgumentException {
-
-    Properties extraProps = new Properties();
-    String ldapServer = System.getProperty("gf.ldap.server", "ldap");
-    String ldapBaseDN = System.getProperty("gf.ldap.basedn", "ou=ldapTesting,dc=pune,dc=gemstone,dc=com");
-    String ldapUseSSL = System.getProperty("gf.ldap.usessl");
-    extraProps.setProperty(LdapUserAuthenticator.LDAP_SERVER_NAME, ldapServer);
-    extraProps.setProperty(LdapUserAuthenticator.LDAP_BASEDN_NAME, ldapBaseDN);
-    if (ldapUseSSL != null && ldapUseSSL.length() > 0) {
-      extraProps.setProperty(LdapUserAuthenticator.LDAP_SSL_NAME, ldapUseSSL);
-    }
-    if (serverAuthEnabled) {
-      String keyStoreFile = TestUtil.getResourcePath(LdapUserCredentialGenerator.class, PKCSCredentialGenerator.keyStoreDir + "/gemfire1.keystore");
-      extraProps.setProperty(HandShake.PRIVATE_KEY_FILE_PROP, keyStoreFile);
-      extraProps.setProperty(HandShake.PRIVATE_KEY_ALIAS_PROP, "gemfire1");
-      extraProps.setProperty(HandShake.PRIVATE_KEY_PASSWD_PROP, "gemfire");
-    }
-    return extraProps;
-  }
-
-  @Override
-  public ClassCode classCode() {
-    return ClassCode.LDAP;
-  }
-
-  @Override
-  public String getAuthInit() {
-    return templates.security.UserPasswordAuthInit.class.getName() + ".create";
-  }
-
-  @Override
-  public String getAuthenticator() {
-    return templates.security.LdapUserAuthenticator.class.getName() + ".create";
-  }
-
-  @Override
-  public Properties getValidCredentials(int index) {
-
-    Properties props = new Properties();
-    props.setProperty(UserPasswordAuthInit.USER_NAME, USER_PREFIX
-        + ((index % 10) + 1));
-    props.setProperty(UserPasswordAuthInit.PASSWORD, USER_PREFIX
-        + ((index % 10) + 1));
-    props.setProperty(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME,
-        algos[prng.nextInt(algos.length)]);
-    if (serverAuthEnabled) {
-      String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, PKCSCredentialGenerator.keyStoreDir + "/publickeyfile");
-      props.setProperty(HandShake.PUBLIC_KEY_FILE_PROP, keyStoreFile);
-      props.setProperty(HandShake.PUBLIC_KEY_PASSWD_PROP, "gemfire");
-    }
-    return props;
-  }
-
-  @Override
-  public Properties getValidCredentials(Principal principal) {
-
-    Properties props = null;
-    String userName = principal.getName();
-    if (userName != null && userName.startsWith(USER_PREFIX)) {
-      boolean isValid;
-      try {
-        int suffix = Integer.parseInt(userName.substring(USER_PREFIX.length()));
-        isValid = (suffix >= 1 && suffix <= 10);
-      }
-      catch (Exception ex) {
-        isValid = false;
-      }
-      if (isValid) {
-        props = new Properties();
-        props.setProperty(UserPasswordAuthInit.USER_NAME, userName);
-        props.setProperty(UserPasswordAuthInit.PASSWORD, userName);
-      }
-    }
-    if (props == null) {
-      throw new IllegalArgumentException("LDAP: [" + userName
-          + "] not a valid user");
-    }
-    props.setProperty(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME,
-        algos[prng.nextInt(algos.length)]);
-    if (serverAuthEnabled) {
-      String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, PKCSCredentialGenerator.keyStoreDir + "/publickeyfile");
-      props.setProperty(HandShake.PUBLIC_KEY_FILE_PROP, keyStoreFile);
-      props.setProperty(HandShake.PUBLIC_KEY_PASSWD_PROP, "gemfire");
-    }
-    return props;
-  }
-
-  @Override
-  public Properties getInvalidCredentials(int index) {
-
-    Properties props = new Properties();
-    props.setProperty(UserPasswordAuthInit.USER_NAME, "invalid" + index);
-    props.setProperty(UserPasswordAuthInit.PASSWORD, "none");
-    props.setProperty(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME,
-        algos[prng.nextInt(algos.length)]);
-    if (serverAuthEnabled) {
-      String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, PKCSCredentialGenerator.keyStoreDir + "/publickeyfile");
-      props.setProperty(HandShake.PUBLIC_KEY_FILE_PROP, keyStoreFile);
-      props.setProperty(HandShake.PUBLIC_KEY_PASSWD_PROP, "gemfire");
-    }
-    return props;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/security/PKCSCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/security/PKCSCredentialGenerator.java b/geode-core/src/test/java/security/PKCSCredentialGenerator.java
deleted file mode 100755
index 5b6d5fa..0000000
--- a/geode-core/src/test/java/security/PKCSCredentialGenerator.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package security;
-
-import com.gemstone.gemfire.util.test.TestUtil;
-import templates.security.PKCSAuthInit;
-import templates.security.PKCSAuthenticator;
-
-import java.security.Principal;
-import java.security.Provider;
-import java.security.Security;
-import java.util.Properties;
-
-/**
- * @author kneeraj
- * 
- */
-public class PKCSCredentialGenerator extends CredentialGenerator {
-
-  public static String keyStoreDir = getKeyStoreDir();
-
-  public static boolean usesIBMJSSE;
-
-  // Checks if the current JVM uses only IBM JSSE providers.
-  private static boolean usesIBMProviders() {
-    Provider[] providers = Security.getProviders();
-    for (int index = 0; index < providers.length; ++index) {
-      if (!providers[index].getName().toLowerCase().startsWith("ibm")) {
-        return false;
-      }
-    }
-    return true;
-  }
-
-  private static String getKeyStoreDir() {
-    usesIBMJSSE = usesIBMProviders();
-    if (usesIBMJSSE) {
-      return "/lib/keys/ibm";
-    }
-    else {
-      return "/lib/keys";
-    }
-  }
-
-  public ClassCode classCode() {
-    return ClassCode.PKCS;
-  }
-
-  public String getAuthInit() {
-    return templates.security.PKCSAuthInit.class.getName() + ".create";
-  }
-
-  public String getAuthenticator() {
-    return templates.security.PKCSAuthenticator.class.getName() + ".create";
-  }
-
-  public Properties getInvalidCredentials(int index) {
-    Properties props = new Properties();
-    String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, keyStoreDir + "/gemfire11.keystore");
-    props.setProperty(PKCSAuthInit.KEYSTORE_FILE_PATH, keyStoreFile);
-    props.setProperty(PKCSAuthInit.KEYSTORE_ALIAS, "gemfire11");
-    props.setProperty(PKCSAuthInit.KEYSTORE_PASSWORD, "gemfire");
-    return props;
-  }
-
-  public Properties getValidCredentials(int index) {
-    Properties props = new Properties();
-    int aliasnum = (index % 10) + 1;
-    String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, keyStoreDir + "/gemfire" + aliasnum + ".keystore");
-    props.setProperty(PKCSAuthInit.KEYSTORE_FILE_PATH, keyStoreFile);
-    props.setProperty(PKCSAuthInit.KEYSTORE_ALIAS, "gemfire" + aliasnum);
-    props.setProperty(PKCSAuthInit.KEYSTORE_PASSWORD, "gemfire");
-    return props;
-  }
-
-  public Properties getValidCredentials(Principal principal) {
-    Properties props = new Properties();
-    String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, keyStoreDir + principal.getName() + ".keystore");
-    props.setProperty(PKCSAuthInit.KEYSTORE_FILE_PATH, keyStoreFile);
-    props.setProperty(PKCSAuthInit.KEYSTORE_ALIAS, principal.getName());
-    props.setProperty(PKCSAuthInit.KEYSTORE_PASSWORD, "gemfire");
-    return props;
-  }
-
-  protected Properties initialize() throws IllegalArgumentException {
-    Properties props = new Properties();
-    String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, keyStoreDir + "/publickeyfile");
-    props.setProperty(PKCSAuthenticator.PUBLIC_KEY_FILE, keyStoreFile);
-    props.setProperty(PKCSAuthenticator.PUBLIC_KEYSTORE_PASSWORD, "gemfire");
-    return props;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/security/SSLCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/security/SSLCredentialGenerator.java b/geode-core/src/test/java/security/SSLCredentialGenerator.java
deleted file mode 100755
index d05e963..0000000
--- a/geode-core/src/test/java/security/SSLCredentialGenerator.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package security;
-
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-import org.apache.logging.log4j.Logger;
-
-import java.io.File;
-import java.io.IOException;
-import java.security.Principal;
-import java.util.Properties;
-
-public class SSLCredentialGenerator extends CredentialGenerator {
-  private static final Logger logger = LogService.getLogger();
-
-  private File findTrustedJKS() {
-    File ssldir = new File(System.getProperty("JTESTS") + "/ssl");
-    return new File(ssldir, "trusted.keystore");
-  }
-
-  private File findUntrustedJKS() {
-    File ssldir = new File(System.getProperty("JTESTS") + "/ssl");
-    return new File(ssldir, "untrusted.keystore");
-  }
-
-  private Properties getValidJavaSSLProperties() {
-    File jks = findTrustedJKS();
-    try {
-      Properties props = new Properties();
-      props.setProperty("javax.net.ssl.trustStore", jks.getCanonicalPath());
-      props.setProperty("javax.net.ssl.trustStorePassword", "password");
-      props.setProperty("javax.net.ssl.keyStore", jks.getCanonicalPath());
-      props.setProperty("javax.net.ssl.keyStorePassword", "password");
-      return props;
-    }
-    catch (IOException ex) {
-      throw new AuthenticationFailedException(
-          "SSL: Exception while opening the key store: " + ex.getMessage(), ex);
-    }
-  }
-
-  private Properties getInvalidJavaSSLProperties() {
-    File jks = findUntrustedJKS();
-    try {
-      Properties props = new Properties();
-      props.setProperty("javax.net.ssl.trustStore", jks.getCanonicalPath());
-      props.setProperty("javax.net.ssl.trustStorePassword", "password");
-      props.setProperty("javax.net.ssl.keyStore", jks.getCanonicalPath());
-      props.setProperty("javax.net.ssl.keyStorePassword", "password");
-      return props;
-    }
-    catch (IOException ex) {
-      throw new AuthenticationFailedException(
-          "SSL: Exception while opening the key store: " + ex.getMessage(), ex);
-    }
-  }
-
-  private Properties getSSLProperties() {
-    Properties props = new Properties();
-    props.setProperty("ssl-enabled", "true");
-    props.setProperty("ssl-require-authentication", "true");
-    props.setProperty("ssl-ciphers", "SSL_RSA_WITH_3DES_EDE_CBC_SHA");
-    props.setProperty("ssl-protocols", "TLSv1");
-    return props;
-  }
-
-  protected Properties initialize() throws IllegalArgumentException {
-    this.javaProps = getValidJavaSSLProperties();
-    return getSSLProperties();
-  }
-
-  public ClassCode classCode() {
-    return ClassCode.SSL;
-  }
-
-  public String getAuthInit() {
-    return null;
-  }
-
-  public String getAuthenticator() {
-    return null;
-  }
-
-  public Properties getValidCredentials(int index) {
-    this.javaProps = getValidJavaSSLProperties();
-    return getSSLProperties();
-  }
-
-  public Properties getValidCredentials(Principal principal) {
-    this.javaProps = getValidJavaSSLProperties();
-    return getSSLProperties();
-  }
-
-  public Properties getInvalidCredentials(int index) {
-    this.javaProps = getInvalidJavaSSLProperties();
-    return getSSLProperties();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/security/UserPasswordWithExtraPropsAuthInit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/security/UserPasswordWithExtraPropsAuthInit.java b/geode-core/src/test/java/security/UserPasswordWithExtraPropsAuthInit.java
deleted file mode 100755
index cc585cd..0000000
--- a/geode-core/src/test/java/security/UserPasswordWithExtraPropsAuthInit.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package security;
-
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.security.AuthInitialize;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-import templates.security.UserPasswordAuthInit;
-
-import java.util.Iterator;
-import java.util.Properties;
-
-/**
- * An {@link AuthInitialize} implementation that obtains the user name and
- * password as the credentials from the given set of properties. If 
- * keep-extra-props property exits, it will copy rest of the
- * properties provided in getCredential props argument will also be 
- * copied as new credentials.
- * 
- * @author Soubhik
- * @since 5.5
- */
-public class UserPasswordWithExtraPropsAuthInit extends UserPasswordAuthInit {
-
-  public static final String EXTRA_PROPS = "security-keep-extra-props";
-
-  public static final String SECURITY_PREFIX = "security-";
-  
-  public static AuthInitialize create() {
-    return new UserPasswordWithExtraPropsAuthInit();
-  }
-
-  public UserPasswordWithExtraPropsAuthInit() {
-    super();
-  }
-
-  public Properties getCredentials(Properties props, DistributedMember server,
-      boolean isPeer) throws AuthenticationFailedException {
-
-    Properties newProps = super.getCredentials(props, server, isPeer);
-    String extraProps = props.getProperty(EXTRA_PROPS);
-    if(extraProps != null) {
-    	for(Iterator it = props.keySet().iterator(); it.hasNext();) {
-    		String key = (String)it.next();
-    		if( key.startsWith(SECURITY_PREFIX) && 
-    		    key.equalsIgnoreCase(USER_NAME) == false &&
-    		    key.equalsIgnoreCase(PASSWORD) == false &&
-    		    key.equalsIgnoreCase(EXTRA_PROPS) == false) {
-    			newProps.setProperty(key, props.getProperty(key));
-    		}
-    	}
-    	this.securitylog.fine("got everything and now have: "
-          + newProps.keySet().toString());
-    }
-    return newProps;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/security/XmlAuthzCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/security/XmlAuthzCredentialGenerator.java b/geode-core/src/test/java/security/XmlAuthzCredentialGenerator.java
deleted file mode 100755
index 118e86f..0000000
--- a/geode-core/src/test/java/security/XmlAuthzCredentialGenerator.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package security;
-
-import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
-import com.gemstone.gemfire.util.test.TestUtil;
-import templates.security.UsernamePrincipal;
-import templates.security.XmlAuthorization;
-
-import java.security.Principal;
-import java.util.HashSet;
-import java.util.Properties;
-import java.util.Set;
-
-public class XmlAuthzCredentialGenerator extends AuthzCredentialGenerator {
-
-  private static final String dummyXml = "authz-dummy.xml";
-
-  private static final String ldapXml = "authz-ldap.xml";
-
-  private static final String pkcsXml = "authz-pkcs.xml";
-
-  private static final String sslXml = "authz-ssl.xml";
-
-  private static final String[] QUERY_REGIONS = { "/Portfolios", "/Positions",
-      "/AuthRegion" };
-
-  public static OperationCode[] READER_OPS = { OperationCode.GET,
-      OperationCode.REGISTER_INTEREST, OperationCode.UNREGISTER_INTEREST,
-      OperationCode.KEY_SET, OperationCode.CONTAINS_KEY, OperationCode.EXECUTE_FUNCTION };
-
-  public static OperationCode[] WRITER_OPS = { OperationCode.PUT,
-      OperationCode.DESTROY, OperationCode.INVALIDATE, OperationCode.REGION_CLEAR };
-
-  public static OperationCode[] QUERY_OPS = { OperationCode.QUERY,
-      OperationCode.EXECUTE_CQ, OperationCode.STOP_CQ, OperationCode.CLOSE_CQ };
-
-  private static final byte READER_ROLE = 1;
-
-  private static final byte WRITER_ROLE = 2;
-
-  private static final byte QUERY_ROLE = 3;
-
-  private static final byte ADMIN_ROLE = 4;
-
-  private static Set readerOpsSet;
-
-  private static Set writerOpsSet;
-
-  private static Set queryOpsSet;
-
-  private static Set queryRegionSet;
-
-  static {
-
-    readerOpsSet = new HashSet();
-    for (int index = 0; index < READER_OPS.length; index++) {
-      readerOpsSet.add(READER_OPS[index]);
-    }
-    writerOpsSet = new HashSet();
-    for (int index = 0; index < WRITER_OPS.length; index++) {
-      writerOpsSet.add(WRITER_OPS[index]);
-    }
-    queryOpsSet = new HashSet();
-    for (int index = 0; index < QUERY_OPS.length; index++) {
-      queryOpsSet.add(QUERY_OPS[index]);
-    }
-    queryRegionSet = new HashSet();
-    for (int index = 0; index < QUERY_REGIONS.length; index++) {
-      queryRegionSet.add(QUERY_REGIONS[index]);
-    }
-  }
-
-  public XmlAuthzCredentialGenerator() {
-  }
-
-  protected Properties init() throws IllegalArgumentException {
-
-    Properties sysProps = new Properties();
-    String dirName = "/lib/";
-    if (this.cGen.classCode().isDummy()) {
-      String xmlFilename = TestUtil.getResourcePath(XmlAuthzCredentialGenerator.class, dirName + dummyXml);
-      sysProps.setProperty(XmlAuthorization.DOC_URI_PROP_NAME, xmlFilename);
-    }
-    else if (this.cGen.classCode().isLDAP()) {
-      String xmlFilename = TestUtil.getResourcePath(XmlAuthzCredentialGenerator.class, dirName + ldapXml);
-      sysProps.setProperty(XmlAuthorization.DOC_URI_PROP_NAME, xmlFilename);
-    }
-    // else if (this.cGen.classCode().isPKCS()) {
-    // sysProps
-    // .setProperty(XmlAuthorization.DOC_URI_PROP_NAME, dirName + pkcsXml);
-    // }
-    // else if (this.cGen.classCode().isSSL()) {
-    // sysProps
-    // .setProperty(XmlAuthorization.DOC_URI_PROP_NAME, dirName + sslXml);
-    // }
-    else {
-      throw new IllegalArgumentException(
-          "No XML defined for XmlAuthorization module to work with "
-              + this.cGen.getAuthenticator());
-    }
-    return sysProps;
-  }
-
-  public ClassCode classCode() {
-    return ClassCode.XML;
-  }
-
-  public String getAuthorizationCallback() {
-    return templates.security.XmlAuthorization.class.getName() + ".create";
-  }
-
-  private Principal getDummyPrincipal(byte roleType, int index) {
-
-    String[] admins = new String[] { "root", "admin", "administrator" };
-    int numReaders = 3;
-    int numWriters = 3;
-
-    switch (roleType) {
-      case READER_ROLE:
-        return new UsernamePrincipal("reader" + (index % numReaders));
-      case WRITER_ROLE:
-        return new UsernamePrincipal("writer" + (index % numWriters));
-      case QUERY_ROLE:
-        return new UsernamePrincipal("reader" + ((index % 2) + 3));
-      default:
-        return new UsernamePrincipal(admins[index % admins.length]);
-    }
-  }
-
-  private Principal getLdapPrincipal(byte roleType, int index) {
-
-    final String userPrefix = "gemfire";
-    final int[] readerIndices = { 3, 4, 5 };
-    final int[] writerIndices = { 6, 7, 8 };
-    final int[] queryIndices = { 9, 10 };
-    final int[] adminIndices = { 1, 2 };
-
-    switch (roleType) {
-      case READER_ROLE:
-        int readerIndex = readerIndices[index % readerIndices.length];
-        return new UsernamePrincipal(userPrefix + readerIndex);
-      case WRITER_ROLE:
-        int writerIndex = writerIndices[index % writerIndices.length];
-        return new UsernamePrincipal(userPrefix + writerIndex);
-      case QUERY_ROLE:
-        int queryIndex = queryIndices[index % queryIndices.length];
-        return new UsernamePrincipal(userPrefix + queryIndex);
-      default:
-        int adminIndex = adminIndices[index % adminIndices.length];
-        return new UsernamePrincipal(userPrefix + adminIndex);
-    }
-  }
-
-  private byte getRequiredRole(OperationCode[] opCodes, String[] regionNames) {
-
-    byte roleType = ADMIN_ROLE;
-    boolean requiresReader = true;
-    boolean requiresWriter = true;
-    boolean requiresQuery = true;
-
-    for (int opNum = 0; opNum < opCodes.length; opNum++) {
-      OperationCode opCode = opCodes[opNum];
-      if (requiresReader && !readerOpsSet.contains(opCode)) {
-        requiresReader = false;
-      }
-      if (requiresWriter && !writerOpsSet.contains(opCode)) {
-        requiresWriter = false;
-      }
-      if (requiresQuery && !queryOpsSet.contains(opCode)) {
-        requiresQuery = false;
-      }
-    }
-    if (requiresReader) {
-      roleType = READER_ROLE;
-    }
-    else if (requiresWriter) {
-      roleType = WRITER_ROLE;
-    }
-    else if (requiresQuery) {
-      if (regionNames != null && regionNames.length > 0) {
-        for (int index = 0; index < regionNames.length; index++) {
-          String regionName = XmlAuthorization
-              .normalizeRegionName(regionNames[index]);
-          if (requiresQuery && !queryRegionSet.contains(regionName)) {
-            requiresQuery = false;
-            break;
-          }
-        }
-        if (requiresQuery) {
-          roleType = QUERY_ROLE;
-        }
-      }
-    }
-    return roleType;
-  }
-
-  protected Principal getAllowedPrincipal(OperationCode[] opCodes,
-      String[] regionNames, int index) {
-
-    if (this.cGen.classCode().isDummy()) {
-      byte roleType = getRequiredRole(opCodes, regionNames);
-      return getDummyPrincipal(roleType, index);
-    }
-    else if (this.cGen.classCode().isLDAP()) {
-      byte roleType = getRequiredRole(opCodes, regionNames);
-      return getLdapPrincipal(roleType, index);
-    }
-    return null;
-  }
-
-  protected Principal getDisallowedPrincipal(OperationCode[] opCodes,
-      String[] regionNames, int index) {
-
-    byte roleType = getRequiredRole(opCodes, regionNames);
-    byte disallowedRoleType = READER_ROLE;
-    switch (roleType) {
-      case READER_ROLE:
-        disallowedRoleType = WRITER_ROLE;
-        break;
-      case WRITER_ROLE:
-        disallowedRoleType = READER_ROLE;
-        break;
-      case QUERY_ROLE:
-        disallowedRoleType = READER_ROLE;
-        break;
-      case ADMIN_ROLE:
-        disallowedRoleType = READER_ROLE;
-        break;
-    }
-    if (this.cGen.classCode().isDummy()) {
-      return getDummyPrincipal(disallowedRoleType, index);
-    }
-    else if (this.cGen.classCode().isLDAP()) {
-      return getLdapPrincipal(disallowedRoleType, index);
-    }
-    return null;
-  }
-
-  protected int getNumPrincipalTries(OperationCode[] opCodes,
-      String[] regionNames) {
-    return 5;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/DummyAuthenticator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/DummyAuthenticator.java b/geode-core/src/test/java/templates/security/DummyAuthenticator.java
deleted file mode 100755
index 5070836..0000000
--- a/geode-core/src/test/java/templates/security/DummyAuthenticator.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package templates.security;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-import com.gemstone.gemfire.security.Authenticator;
-
-import java.security.Principal;
-import java.util.Properties;
-
-/**
- * A dummy implementation of the {@link Authenticator} interface that expects a
- * user name and password allowing authentication depending on the format of the
- * user name.
- * 
- * @author Sumedh Wale
- * @since 5.5
- */
-public class DummyAuthenticator implements Authenticator {
-
-  public static Authenticator create() {
-    return new DummyAuthenticator();
-  }
-
-  public DummyAuthenticator() {
-  }
-
-  public void init(Properties systemProps, LogWriter systemLogger,
-      LogWriter securityLogger) throws AuthenticationFailedException {
-  }
-
-  public static boolean testValidName(String userName) {
-
-    return (userName.startsWith("user") || userName.startsWith("reader")
-        || userName.startsWith("writer") || userName.equals("admin")
-        || userName.equals("root") || userName.equals("administrator"));
-  }
-
-  public Principal authenticate(Properties props, DistributedMember member)
-      throws AuthenticationFailedException {
-
-    String userName = props.getProperty(UserPasswordAuthInit.USER_NAME);
-    if (userName == null) {
-      throw new AuthenticationFailedException(
-          "DummyAuthenticator: user name property ["
-              + UserPasswordAuthInit.USER_NAME + "] not provided");
-    }
-    String password = props.getProperty(UserPasswordAuthInit.PASSWORD);
-    if (password == null) {
-      throw new AuthenticationFailedException(
-          "DummyAuthenticator: password property ["
-              + UserPasswordAuthInit.PASSWORD + "] not provided");
-    }
-
-    if (userName.equals(password) && testValidName(userName)) {
-      return new UsernamePrincipal(userName);
-    }
-    else {
-      throw new AuthenticationFailedException(
-          "DummyAuthenticator: Invalid user name [" + userName
-              + "], password supplied.");
-    }
-  }
-
-  public void close() {
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/DummyAuthorization.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/DummyAuthorization.java b/geode-core/src/test/java/templates/security/DummyAuthorization.java
deleted file mode 100755
index 4c2bfec..0000000
--- a/geode-core/src/test/java/templates/security/DummyAuthorization.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package templates.security;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.operations.OperationContext;
-import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.security.AccessControl;
-import com.gemstone.gemfire.security.NotAuthorizedException;
-
-import java.security.Principal;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * A dummy implementation of the <code>AccessControl</code> interface that
- * allows authorization depending on the format of the <code>Principal</code>
- * string.
- * 
- * @author Sumedh Wale
- * @since 5.5
- */
-public class DummyAuthorization implements AccessControl {
-
-  private Set allowedOps;
-
-  private DistributedMember remoteDistributedMember;
-
-  private LogWriter logger;
-
-  public static final OperationCode[] READER_OPS = { OperationCode.GET,
-      OperationCode.QUERY, OperationCode.EXECUTE_CQ, OperationCode.CLOSE_CQ,
-      OperationCode.STOP_CQ, OperationCode.REGISTER_INTEREST,
-      OperationCode.UNREGISTER_INTEREST, OperationCode.KEY_SET,
-      OperationCode.CONTAINS_KEY, OperationCode.EXECUTE_FUNCTION };
-
-  public static final OperationCode[] WRITER_OPS = { OperationCode.PUT, OperationCode.PUTALL, 
-      OperationCode.DESTROY, OperationCode.INVALIDATE, OperationCode.REGION_CLEAR };
-
-  public DummyAuthorization() {
-    this.allowedOps = new HashSet(20);
-  }
-
-  public static AccessControl create() {
-    return new DummyAuthorization();
-  }
-
-  private void addReaderOps() {
-
-    for (int index = 0; index < READER_OPS.length; index++) {
-      this.allowedOps.add(READER_OPS[index]);
-    }
-  }
-
-  private void addWriterOps() {
-
-    for (int index = 0; index < WRITER_OPS.length; index++) {
-      this.allowedOps.add(WRITER_OPS[index]);
-    }
-  }
-
-  public void init(Principal principal, 
-                   DistributedMember remoteMember,
-                   Cache cache) throws NotAuthorizedException {
-
-    if (principal != null) {
-      String name = principal.getName().toLowerCase();
-      if (name != null) {
-        if (name.equals("root") || name.equals("admin")
-            || name.equals("administrator")) {
-          addReaderOps();
-          addWriterOps();
-          this.allowedOps.add(OperationCode.REGION_CREATE);
-          this.allowedOps.add(OperationCode.REGION_DESTROY);
-        }
-        else if (name.startsWith("writer")) {
-          addWriterOps();
-        }
-        else if (name.startsWith("reader")) {
-          addReaderOps();
-        }
-      }
-    }
-    this.remoteDistributedMember = remoteMember;
-    this.logger = cache.getSecurityLogger();
-  }
-
-  public boolean authorizeOperation(String regionName, OperationContext context) {
-
-    OperationCode opCode = context.getOperationCode();
-    this.logger.fine("Invoked authorize operation for [" + opCode
-        + "] in region [" + regionName + "] for client: " + remoteDistributedMember);
-    return this.allowedOps.contains(opCode);
-  }
-
-  public void close() {
-
-    this.allowedOps.clear();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/FunctionSecurityPrmsHolder.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/FunctionSecurityPrmsHolder.java b/geode-core/src/test/java/templates/security/FunctionSecurityPrmsHolder.java
deleted file mode 100755
index 5771fd4..0000000
--- a/geode-core/src/test/java/templates/security/FunctionSecurityPrmsHolder.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package templates.security;
-
-import java.util.HashSet;
-
-/**
- * This is a sample class for objects which hold information of the authorized
- * function names and authorized value for the optimizeForWrite.
- * 
- * @author Aneesh Karayil
- * @since 6.0
- */
-public class FunctionSecurityPrmsHolder {
-
-  private final Boolean isOptimizeForWrite;
-
-  private final HashSet<String> functionIds;
-
-  private final HashSet<String> keySet;
-
-  public FunctionSecurityPrmsHolder(Boolean isOptimizeForWrite,
-      HashSet<String> functionIds, HashSet<String> keySet) {
-    this.isOptimizeForWrite = isOptimizeForWrite;
-    this.functionIds = functionIds;
-    this.keySet = keySet;
-  }
-
-  public Boolean isOptimizeForWrite() {
-    return isOptimizeForWrite;
-  }
-
-  public HashSet<String> getFunctionIds() {
-    return functionIds;
-  }
-
-  public HashSet<String> getKeySet() {
-    return keySet;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/templates/security/LdapUserAuthenticator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/templates/security/LdapUserAuthenticator.java b/geode-core/src/test/java/templates/security/LdapUserAuthenticator.java
deleted file mode 100755
index 49059c3..0000000
--- a/geode-core/src/test/java/templates/security/LdapUserAuthenticator.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package templates.security;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-import com.gemstone.gemfire.security.Authenticator;
-import org.apache.logging.log4j.Logger;
-
-import java.security.Principal;
-import java.util.Properties;
-import javax.naming.Context;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-
-/**
- * @author Kumar Neeraj
- * @since 5.5
- */
-public class LdapUserAuthenticator implements Authenticator {
-  private static final Logger logger = LogService.getLogger();
-
-  private String ldapServer = null;
-
-  private String basedn = null;
-
-  private String ldapUrlScheme = null;
-
-  public static final String LDAP_SERVER_NAME = "security-ldap-server";
-
-  public static final String LDAP_BASEDN_NAME = "security-ldap-basedn";
-
-  public static final String LDAP_SSL_NAME = "security-ldap-usessl";
-
-  public static Authenticator create() {
-    return new LdapUserAuthenticator();
-  }
-
-  public LdapUserAuthenticator() {
-  }
-
-  public void init(Properties securityProps, LogWriter systemLogger,
-      LogWriter securityLogger) throws AuthenticationFailedException {
-    this.ldapServer = securityProps.getProperty(LDAP_SERVER_NAME);
-    if (this.ldapServer == null || this.ldapServer.length() == 0) {
-      throw new AuthenticationFailedException(
-          "LdapUserAuthenticator: LDAP server property [" + LDAP_SERVER_NAME
-              + "] not specified");
-    }
-    this.basedn = securityProps.getProperty(LDAP_BASEDN_NAME);
-    if (this.basedn == null || this.basedn.length() == 0) {
-      throw new AuthenticationFailedException(
-          "LdapUserAuthenticator: LDAP base DN property [" + LDAP_BASEDN_NAME
-              + "] not specified");
-    }
-    String sslStr = securityProps.getProperty(LDAP_SSL_NAME);
-    if (sslStr != null && sslStr.toLowerCase().equals("true")) {
-      this.ldapUrlScheme = "ldaps://";
-    }
-    else {
-      this.ldapUrlScheme = "ldap://";
-    }
-  }
-
-  public Principal authenticate(Properties props, DistributedMember member) {
-
-    String userName = props.getProperty(UserPasswordAuthInit.USER_NAME);
-    if (userName == null) {
-      throw new AuthenticationFailedException(
-          "LdapUserAuthenticator: user name property ["
-              + UserPasswordAuthInit.USER_NAME + "] not provided");
-    }
-    String passwd = props.getProperty(UserPasswordAuthInit.PASSWORD);
-    if (passwd == null) {
-      passwd = "";
-    }
-
-    Properties env = new Properties();
-    env
-        .put(Context.INITIAL_CONTEXT_FACTORY,
-            com.sun.jndi.ldap.LdapCtxFactory.class.getName());
-    env.put(Context.PROVIDER_URL, this.ldapUrlScheme + this.ldapServer + '/'
-        + this.basedn);
-    String fullentry = "uid=" + userName + "," + this.basedn;
-    env.put(Context.SECURITY_PRINCIPAL, fullentry);
-    env.put(Context.SECURITY_CREDENTIALS, passwd);
-    try {
-      DirContext ctx = new InitialDirContext(env);
-      ctx.close();
-    }
-    catch (Exception e) {
-      throw new AuthenticationFailedException(
-          "LdapUserAuthenticator: Failure with provided username, password "
-              + "combination for user name: " + userName, e);
-    }
-    return new UsernamePrincipal(userName);
-  }
-
-  public void close() {
-  }
-
-}


[16/54] [abbrv] incubator-geode git commit: GEODE-1097 allow Lambda invocations to be named so that they show up in test logs

Posted by je...@apache.org.
GEODE-1097 allow Lambda invocations to be named so that they show up in test logs

This adds variants of VM.invoke() and VM.invokeAsync() that take a String name
for the invocation that will be logged during dunit testing.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/22ab2706
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/22ab2706
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/22ab2706

Branch: refs/heads/feature/GEODE-17-2
Commit: 22ab27067c74eae5b2af799d6453dad461f98eec
Parents: ce8d087
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Tue Mar 15 10:58:06 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Tue Mar 15 10:59:17 2016 -0700

----------------------------------------------------------------------
 .../cache30/ClientMembershipDUnitTest.java      | 14 +++--
 .../gemfire/test/dunit/NamedCallable.java       | 26 +++++++++
 .../gemfire/test/dunit/NamedRunnable.java       | 26 +++++++++
 .../com/gemstone/gemfire/test/dunit/VM.java     | 61 ++++++++++++++++++++
 .../test/dunit/tests/BasicDUnitTest.java        | 24 ++++++++
 5 files changed, 146 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/22ab2706/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
index d4678ca..19ce28d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
@@ -804,10 +804,11 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     });
     
     // gather details for later creation of ConnectionPool...
-    ports[0] = vm0.invoke(() -> ClientMembershipDUnitTest.getTestClientMembershipEventsInClient_port());
+    ports[0] = vm0.invoke("getTestClientMembershipEventsInClient_port",
+        () -> ClientMembershipDUnitTest.getTestClientMembershipEventsInClient_port());
     assertTrue(ports[0] != 0);
 
-    DistributedMember serverMember = (DistributedMember) vm0.invoke(() -> ClientMembershipDUnitTest.getDistributedMember());
+    DistributedMember serverMember = (DistributedMember) vm0.invoke("get distributed member", () -> ClientMembershipDUnitTest.getDistributedMember());
 
     String serverMemberId = serverMember.toString();
 
@@ -1440,7 +1441,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
             getDistributedMember());
         }
       });
-      ports[whichVM] = vm.invoke(() -> ClientMembershipDUnitTest.getTestGetConnectedServers_port());
+      ports[whichVM] = vm.invoke("getTestGetConnectedServers_port",
+          () -> ClientMembershipDUnitTest.getTestGetConnectedServers_port());
       assertTrue(ports[whichVM] != 0);
     }
     
@@ -1555,7 +1557,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
             getMemberId());
         }
       });
-      ports[whichVM] = vm.invoke(() -> ClientMembershipDUnitTest.getTestGetNotifiedClients_port());
+      ports[whichVM] = vm.invoke("getTestGetNotifiedClients_port",
+          () -> ClientMembershipDUnitTest.getTestGetNotifiedClients_port());
       assertTrue(ports[whichVM] != 0);
     }
     
@@ -1599,7 +1602,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
           }
         }
       });
-      clientCounts[whichVM] = vm.invoke(() -> ClientMembershipDUnitTest.getTestGetNotifiedClients_clientCount());
+      clientCounts[whichVM] = vm.invoke("getTestGetNotifiedClients_clientCount",
+          () -> ClientMembershipDUnitTest.getTestGetNotifiedClients_clientCount());
     }
     
     // only one server should have a notifier for this client...

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/22ab2706/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java
new file mode 100755
index 0000000..66a3f38
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedCallable.java
@@ -0,0 +1,26 @@
+package com.gemstone.gemfire.test.dunit;
+
+
+public class NamedCallable<T> implements SerializableCallableIF<T> {
+
+  private static final long serialVersionUID = -4417299628656632541L;
+
+  String name;
+  SerializableCallableIF<T> delegate;
+  
+  public NamedCallable(String name, SerializableCallableIF<T> delegate) {
+    this.name = name;
+    this.delegate = delegate;
+  }
+  
+  @Override
+  public T call() throws Exception {
+    return delegate.call();
+  }
+  
+  @Override
+  public String toString() {
+    return ("callable("+name+")");
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/22ab2706/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java
new file mode 100755
index 0000000..8a7fe28
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NamedRunnable.java
@@ -0,0 +1,26 @@
+package com.gemstone.gemfire.test.dunit;
+
+
+public class NamedRunnable implements SerializableRunnableIF {
+
+  private static final long serialVersionUID = -2786841298145567914L;
+
+  String name;
+  SerializableRunnableIF delegate;
+  
+  public NamedRunnable(String name, SerializableRunnableIF delegate) {
+    this.name = name;
+    this.delegate = delegate;
+  }
+  
+  @Override
+  public void run() throws Exception {
+    delegate.run();
+  }
+  
+  @Override
+  public String toString() {
+    return ("runnable("+name+")");
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/22ab2706/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java
index 122aa0e..8e408dc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java
@@ -246,6 +246,37 @@ public class VM implements Serializable {
   }
   
   /**
+   * Invokes the <code>run</code> method of a {@link Runnable} in this
+   * VM.  Recall that <code>run</code> takes no arguments and has no
+   * return value.  The Runnable is wrapped in a NamedRunnable having
+   * the given name so it shows up in dunit logs.
+   *
+   * @param r
+   *        The <code>Runnable</code> to be run
+   * @param name the name of the runnable, which will be logged in dunit output
+   *
+   * @see SerializableRunnable
+   */
+  public AsyncInvocation invokeAsync(String name, SerializableRunnableIF r) {
+    NamedRunnable nr = new NamedRunnable(name, r);
+    return invokeAsync(r, "run", new Object[0]);
+  }
+  
+  /**
+   * Invokes the <code>call</code> method of a {@link Runnable} in this
+   * VM.  
+   *
+   * @param c
+   *        The <code>Callable</code> to be run
+   * @param name the name of the callable, which will be logged in dunit output
+   *
+   * @see SerializableCallable
+   */
+  public <T> AsyncInvocation<T> invokeAsync(String name, SerializableCallableIF<T> c) {
+    return invokeAsync(new NamedCallable(name, c), "call", new Object[0]);
+  }
+
+  /**
    * Invokes the <code>call</code> method of a {@link Runnable} in this
    * VM.  
    *
@@ -265,6 +296,21 @@ public class VM implements Serializable {
    *
    * @param r
    *        The <code>Runnable</code> to be run
+   * @param name the name of the runnable, which will be logged in dunit output
+   *
+   * @see SerializableRunnable
+   */
+  public void invoke(String name, SerializableRunnableIF r) {
+    invoke(new NamedRunnable(name, r), "run");
+  }
+
+  /**
+   * Invokes the <code>run</code> method of a {@link Runnable} in this
+   * VM.  Recall that <code>run</code> takes no arguments and has no
+   * return value.
+   *
+   * @param r
+   *        The <code>Runnable</code> to be run
    *
    * @see SerializableRunnable
    */
@@ -279,6 +325,21 @@ public class VM implements Serializable {
    *
    * @param c
    *        The <code>Callable</code> to be run
+   * @param name the name of the callable, which will be logged in dunit output
+   *
+   * @see SerializableCallable
+   */
+  public <T>  T invoke(String name, SerializableCallableIF<T> c) {
+    return (T) invoke(new NamedCallable(name, c), "call");
+  }
+  
+  /**
+   * Invokes the <code>run</code> method of a {@link Runnable} in this
+   * VM.  Recall that <code>run</code> takes no arguments and has no
+   * return value.
+   *
+   * @param c
+   *        The <code>Callable</code> to be run
    *
    * @see SerializableCallable
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/22ab2706/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/BasicDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/BasicDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/BasicDUnitTest.java
index 068e81b..195d5f4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/BasicDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/BasicDUnitTest.java
@@ -83,6 +83,30 @@ public class BasicDUnitTest extends DistributedTestCase {
     
   }
 
+  public void testInvokeWithNamedLambda() {
+    Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    
+    int vm0Num = vm0.invoke("getVMID", () -> DUnitEnv.get().getVMID());
+    int vm1Num = vm1.invoke("getVMID", () -> DUnitEnv.get().getVMID());
+    
+    assertEquals(0, vm0Num);
+    assertEquals(1, vm1Num);
+    
+  }
+  
+  public void testInvokeNamedLambdaAsync() throws Throwable {
+    Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    
+    AsyncInvocation<Integer> async0 = vm0.invokeAsync("getVMID", () -> DUnitEnv.get().getVMID());
+    int vm0num = async0.getResult();
+    
+    assertEquals(0, vm0num);
+    
+  }
+
   static class BasicTestException extends RuntimeException {
     BasicTestException() {
       this("Test exception.  Please ignore.");


[36/54] [abbrv] incubator-geode git commit: GEODE-992: Integrate with Travis CI

Posted by je...@apache.org.
GEODE-992: Integrate with Travis CI

disable CI on feature branches and asf-site branch.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/67f0e2ca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/67f0e2ca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/67f0e2ca

Branch: refs/heads/feature/GEODE-17-2
Commit: 67f0e2ca8dd384100a111e56aba052bc825ba103
Parents: 91b7096
Author: Swapnil Bawaskar <sb...@pivotal.io>
Authored: Wed Mar 16 18:06:53 2016 -0700
Committer: Swapnil Bawaskar <sb...@pivotal.io>
Committed: Wed Mar 16 18:06:53 2016 -0700

----------------------------------------------------------------------
 .travis.yml | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67f0e2ca/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index c532f20..fdbea8d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,3 +35,8 @@ notifications:
       - dev@geode.incubator.apache.org
     on_success: change
     on_failure: change
+
+branches:
+  except:
+    - /^feature.*$/
+    - asf-site


[33/54] [abbrv] incubator-geode git commit: GEODE-620 Geode SSL configuration is out of date

Posted by je...@apache.org.
GEODE-620 Geode SSL configuration is out of date

In reviewing uses of SSL I found that SocketCreator did not have support for
TLSv1.2 and that one of the test classes had a reference to an RC4-based
cipher suite.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/442718f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/442718f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/442718f4

Branch: refs/heads/feature/GEODE-17-2
Commit: 442718f45f49add3c4b1e4d47049174f038663b3
Parents: d8f28d2
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Wed Mar 16 15:57:55 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Wed Mar 16 16:01:17 2016 -0700

----------------------------------------------------------------------
 .../src/main/java/com/gemstone/gemfire/internal/SocketCreator.java | 2 +-
 geode-core/src/test/java/security/SSLCredentialGenerator.java      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/442718f4/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
index 5bfa7bd..458f41a 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
@@ -571,7 +571,7 @@ public class SocketCreator {
       return c;
     }
     // lookup known algorithms
-    String[] knownAlgorithms = {"SSL", "SSLv2", "SSLv3", "TLS", "TLSv1", "TLSv1.1"};
+    String[] knownAlgorithms = {"SSL", "SSLv2", "SSLv3", "TLS", "TLSv1", "TLSv1.1", "TLSv1.2"};
     for (String algo : knownAlgorithms) {
       try {
         c = SSLContext.getInstance(algo);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/442718f4/geode-core/src/test/java/security/SSLCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/security/SSLCredentialGenerator.java b/geode-core/src/test/java/security/SSLCredentialGenerator.java
index e547630..d05e963 100755
--- a/geode-core/src/test/java/security/SSLCredentialGenerator.java
+++ b/geode-core/src/test/java/security/SSLCredentialGenerator.java
@@ -76,7 +76,7 @@ public class SSLCredentialGenerator extends CredentialGenerator {
     Properties props = new Properties();
     props.setProperty("ssl-enabled", "true");
     props.setProperty("ssl-require-authentication", "true");
-    props.setProperty("ssl-ciphers", "SSL_RSA_WITH_RC4_128_MD5");
+    props.setProperty("ssl-ciphers", "SSL_RSA_WITH_3DES_EDE_CBC_SHA");
     props.setProperty("ssl-protocols", "TLSv1");
     return props;
   }


[22/54] [abbrv] incubator-geode git commit: GEODE-639 CI failure: CacheXml80DUnitTest.testCacheServerEnableTcpNoDelay

Posted by je...@apache.org.
GEODE-639 CI failure: CacheXml80DUnitTest.testCacheServerEnableTcpNoDelay

Use TCP port 0, so that an available port will be automatically assigned


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/44c388ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/44c388ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/44c388ef

Branch: refs/heads/feature/GEODE-17-2
Commit: 44c388efc6f2a475baeb6a83f62926fcb83dc6d2
Parents: 3ae26b6
Author: Jianxia Chen <jc...@pivotal.io>
Authored: Tue Mar 15 16:07:04 2016 -0700
Committer: Jianxia Chen <jc...@pivotal.io>
Committed: Tue Mar 15 16:07:04 2016 -0700

----------------------------------------------------------------------
 .../test/java/com/gemstone/gemfire/cache30/CacheXml80DUnitTest.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/44c388ef/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml80DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml80DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml80DUnitTest.java
index 98134ce..155fb78 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml80DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml80DUnitTest.java
@@ -197,6 +197,7 @@ public class CacheXml80DUnitTest extends CacheXml70DUnitTest {
     CacheCreation cache = new CacheCreation();
 
     CacheServer cs = cache.addCacheServer();
+    cs.setPort(0);
     cs.setTcpNoDelay(true);
     RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
     attrs.setDataPolicy(DataPolicy.NORMAL);


[13/54] [abbrv] incubator-geode git commit: GEODE-986 MultiuserAPIDUnitTest.testMultiUserUnsupportedAPIs failed with SocketException

Posted by je...@apache.org.
GEODE-986 MultiuserAPIDUnitTest.testMultiUserUnsupportedAPIs failed with SocketException

Reactivated the TcpServer backward-compatibility test.  This test failed if
TcpClient thought that the locator was running 5.7 (I hand-sabotaged the
code to make it think the locator was 5.7) but it passes with 9a .0 fallback
default.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/aef84eb0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/aef84eb0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/aef84eb0

Branch: refs/heads/feature/GEODE-17-2
Commit: aef84eb091791312efba7d42bcde9b7f6436223c
Parents: d25e445
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Mar 14 09:31:08 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Mar 14 09:34:52 2016 -0700

----------------------------------------------------------------------
 .../internal/tcpserver/TcpClient.java           | 16 +++-
 .../internal/tcpserver/TcpServer.java           |  0
 .../TcpServerBackwardCompatDUnitTest.java       | 97 +++++++-------------
 .../gemfire/test/dunit/DistributedTestCase.java |  2 +
 4 files changed, 44 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/aef84eb0/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
old mode 100644
new mode 100755
index dfcb78c..803f284
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpClient.java
@@ -105,8 +105,6 @@ public class TcpClient {
       ipAddr = new InetSocketAddress(addr, port); // fix for bug 30810
     }
     
-    logger.debug("TcpClient sending {} to {}", request, ipAddr);
-
     long giveupTime = System.currentTimeMillis() + timeout;
     
     // Get the GemFire version of the TcpServer first, before sending any other request.
@@ -128,6 +126,8 @@ public class TcpClient {
       return null;
     }
     
+    logger.debug("TcpClient sending {} to {}", request, ipAddr);
+
     Socket sock=SocketCreator.getDefaultInstance().connect(ipAddr.getAddress(), ipAddr.getPort(), (int)newTimeout, null, false);
     sock.setSoTimeout((int)newTimeout);
     DataOutputStream out = null;
@@ -214,7 +214,7 @@ public class TcpClient {
       out.flush();
 
       DataInputStream in = new DataInputStream(sock.getInputStream());
-      in = new VersionedDataInputStream(in, Version.GFE_57); 
+      in = new VersionedDataInputStream(in, Version.GFE_90); 
       try {
         VersionResponse response = DataSerializer.readObject(in);
         if (response != null) {
@@ -239,13 +239,19 @@ public class TcpClient {
       logger.debug("Locator " + ipAddr + " did not respond to a request for its version.  I will assume it is using v5.7 for safety.");
     }
     synchronized(serverVersions) {
-      serverVersions.put(ipAddr, Version.GFE_57.ordinal());
+      serverVersions.put(ipAddr, Version.GFE_90.ordinal());
     }
-    return Short.valueOf(Version.GFE_57.ordinal());
+    return Short.valueOf(Version.GFE_90.ordinal());
   }
 
   private TcpClient() {
     //static class
   }
+  
+  public static void clearStaticData() {
+    synchronized(serverVersions) {
+      serverVersions.clear();
+    }
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/aef84eb0/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
old mode 100644
new mode 100755

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/aef84eb0/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
index a66367b..3685ac4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
@@ -32,8 +32,13 @@ import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.distributed.Locator;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.distributed.internal.membership.gms.locator.FindCoordinatorRequest;
+import com.gemstone.gemfire.distributed.internal.membership.gms.locator.FindCoordinatorResponse;
 import com.gemstone.gemfire.distributed.internal.tcpserver.TcpServer;
 import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
@@ -51,7 +56,7 @@ import com.gemstone.gemfire.test.junit.categories.DistributedTest;
  *
  */
 @Category(DistributedTest.class)
-@Ignore("Test was disabled by renaming to DisabledTest")
+//@Ignore("Test was disabled by renaming to DisabledTest")
 public class TcpServerBackwardCompatDUnitTest extends DistributedTestCase {
 
   /**
@@ -98,18 +103,15 @@ public class TcpServerBackwardCompatDUnitTest extends DistributedTestCase {
     final VM locatorRestart0 = host.getVM(2);
     final VM member = host.getVM(3);
 
+    int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
+
     // Create properties for locator0
-    final int port0 = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    final File logFile0 = new File(getUniqueName() + "-locator" + port0 + ".log");
+    final int port0 = ports[0];
+    final File logFile0 = null;//new File("");
     
     // Create properties for locator1
-    int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    while (port == port0) {
-      port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    }
-    final int port1 = port;
-
-    final File logFile1 = new File(getUniqueName() + "-locator" + port1 + ".log");
+    final int port1 = ports[1];
+    final File logFile1 = null;//new File("");
     
     final String locators = host.getHostName() + "[" + port0 + "]," +
                             host.getHostName() + "[" + port1 + "]";
@@ -118,6 +120,7 @@ public class TcpServerBackwardCompatDUnitTest extends DistributedTestCase {
     props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
     props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
     props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+    props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "finest");
     
     // Start locator0 with props.
     //props.setProperty(DistributionConfig.START_LOCATOR_NAME, host.getHostName() + "["+port0+"]");
@@ -157,45 +160,20 @@ public class TcpServerBackwardCompatDUnitTest extends DistributedTestCase {
           TcpServer.OLDTESTVERSION -= 100;
           TcpServer.getGossipVersionMapForTestOnly().put(TcpServer.TESTVERSION, Version.CURRENT_ORDINAL);
           TcpServer.getGossipVersionMapForTestOnly().put(TcpServer.OLDTESTVERSION, Version.GFE_57.ordinal());
-          assertEquals("Gossip Version and Test version are not same", TcpServer.GOSSIPVERSION, TcpServer.TESTVERSION);
-          assertEquals("Previous Gossip Version and Test version are not same", TcpServer.OLDGOSSIPVERSION, TcpServer.OLDTESTVERSION);
+//          assertEquals("Gossip Version and Test version are not same", TcpServer.GOSSIPVERSION, TcpServer.TESTVERSION);
+//          assertEquals("Previous Gossip Version and Test version are not same", TcpServer.OLDGOSSIPVERSION, TcpServer.OLDTESTVERSION);
 
           Locator.startLocatorAndDS(port1, logFile1, props);
 
           // Start a gossip client to connect to first locator "locator0".
-          fail("this test must be fixed to work with the jgroups replacement");
-          // TODO
-//          final GossipClient client = new GossipClient(new IpAddress(InetAddress.getLocalHost(), port1),  500);
-//          client.register("mygroup1", new IpAddress(InetAddress.getLocalHost(), port1), 5000, false);
-
-          WaitCriterion ev = new WaitCriterion() {
-            public boolean done() {
-              try {
-                // TODO
-//                Vector members = client.getMembers("mygroup1", 
-//                    new IpAddress(InetAddress.getLocalHost(), port0), true, 5000);
-//                return members.size() == 2;
-              }
-              catch (Exception e) {
-                e.printStackTrace();
-                fail("unexpected exception");
-              }
-              return false; // NOTREACHED
-            }
-            public String description() {
-              return null;
-            }
-          };
+          FindCoordinatorRequest req = new FindCoordinatorRequest(new InternalDistributedMember(
+              SocketCreator.getLocalHost(), 1234));
+          FindCoordinatorResponse response = null;
           
-          Wait.waitForCriterion(ev, 1000, 200, true);
-          fail("this test must be fixed to work with the jgroups replacement");
-          // TODO
-//          Vector members = client.getMembers("mygroup1", new IpAddress(InetAddress.getLocalHost(), port0), true, 5000);
-//          Assert.assertEquals(2, members.size());
-//          Assert.assertTrue(members.contains(new IpAddress(InetAddress.getLocalHost(), port0)));
-//          Assert.assertTrue(members.contains(new IpAddress(InetAddress.getLocalHost(), port1)));
+          response = (FindCoordinatorResponse)TcpClient.requestToServer(SocketCreator.getLocalHost(), port1, req, 5000);
+          assertNotNull(response);
 
-        } catch (IOException e) {
+        } catch (Exception e) {
           com.gemstone.gemfire.test.dunit.Assert.fail("Locator1 start failed with Gossip Version: " + TcpServer.GOSSIPVERSION + "!", e);
         }
       }
@@ -222,33 +200,20 @@ public class TcpServerBackwardCompatDUnitTest extends DistributedTestCase {
           TcpServer.OLDTESTVERSION -= 100;
           TcpServer.getGossipVersionMapForTestOnly().put(TcpServer.TESTVERSION, Version.CURRENT_ORDINAL);
           TcpServer.getGossipVersionMapForTestOnly().put(TcpServer.OLDTESTVERSION, Version.GFE_57.ordinal());
-          assertEquals("Gossip Version and Test version are not same", TcpServer.GOSSIPVERSION, TcpServer.TESTVERSION);
-          assertEquals("Previous Gossip Version and Test version are not same", TcpServer.OLDGOSSIPVERSION, TcpServer.OLDTESTVERSION);
+//          assertEquals("Gossip Version and Test version are not same", TcpServer.GOSSIPVERSION, TcpServer.TESTVERSION);
+//          assertEquals("Previous Gossip Version and Test version are not same", TcpServer.OLDGOSSIPVERSION, TcpServer.OLDTESTVERSION);
 
           Locator.startLocatorAndDS(port0, logFile0, props);
 
-          // A new gossip client with new GOSSIPVERSION must be able
-          // to connect with new locator on port1, remote locator.
-          // Reuse locator0 VM.
-          fail("this test must be fixed to work with the jgroups replacement");
-          // TODO
-//          final GossipClient client2 = new GossipClient(new IpAddress(InetAddress.getLocalHost(), port1),  500);
-//          Vector<IpAddress> members = client2.getMembers("mygroup1", new IpAddress(InetAddress.getLocalHost(), port1), true, 5000);
-//          Assert.assertEquals(2, members.size());
-          // As they are coming from other locator, their pid is of other locator process.
-//          getLogWriter().info(members.get(0) + " " + members.get(1));
-
-          // TODO
-//          for (IpAddress ipAddr : members) {
-//            int port = ipAddr.getPort();
-//            String hostname = ipAddr.getIpAddress().getHostAddress();
-//            int pid = ipAddr.getProcessId();
-//            Assert.assertTrue(" " + ipAddr, port == port0 || port == port1);
-//            Assert.assertTrue(" " + ipAddr, hostname.equals(InetAddress.getLocalHost().getHostAddress()));
-//            Assert.assertTrue(" " + ipAddr, pid == locator1.getPid());
-//          }
+          // Start a gossip client to connect to first locator "locator0".
+          FindCoordinatorRequest req = new FindCoordinatorRequest(new InternalDistributedMember(
+              SocketCreator.getLocalHost(), 1234));
+          FindCoordinatorResponse response = null;
+          
+          response = (FindCoordinatorResponse)TcpClient.requestToServer(SocketCreator.getLocalHost(), port0, req, 5000);
+          assertNotNull(response);
 
-        } catch (IOException e) {
+        } catch (Exception e) {
           com.gemstone.gemfire.test.dunit.Assert.fail("Locator0 start failed with Gossip Version: " + TcpServer.GOSSIPVERSION + "!", e);
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/aef84eb0/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestCase.java
index c7227a2..4f656fd 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestCase.java
@@ -42,6 +42,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.CreationStackGenerator;
+import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
 import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.internal.admin.ClientStatsManager;
 import com.gemstone.gemfire.internal.cache.DiskStoreObserver;
@@ -487,6 +488,7 @@ public abstract class DistributedTestCase extends TestCase implements java.io.Se
     RegionTestCase.preSnapshotRegion = null;
     SocketCreator.resetHostNameCache();
     SocketCreator.resolve_dns = true;
+    TcpClient.clearStaticData();
 
     // clear system properties -- keep alphabetized
     System.clearProperty("gemfire.log-level");


[45/54] [abbrv] incubator-geode git commit: GEODE-949: refactor and repackage security test code

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/generator/PKCSCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/PKCSCredentialGenerator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/PKCSCredentialGenerator.java
new file mode 100755
index 0000000..6d33493
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/PKCSCredentialGenerator.java
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.generator;
+
+import com.gemstone.gemfire.util.test.TestUtil;
+import com.gemstone.gemfire.security.templates.PKCSAuthInit;
+import com.gemstone.gemfire.security.templates.PKCSAuthenticator;
+
+import java.security.Principal;
+import java.security.Provider;
+import java.security.Security;
+import java.util.Properties;
+
+public class PKCSCredentialGenerator extends CredentialGenerator {
+
+  public static String keyStoreDir = getKeyStoreDir();
+  public static boolean usesIBMJSSE;
+
+  // Checks if the current JVM uses only IBM JSSE providers.
+  private static boolean usesIBMProviders() {
+    final Provider[] providers = Security.getProviders();
+    for (int index = 0; index < providers.length; ++index) {
+      if (!providers[index].getName().toLowerCase().startsWith("ibm")) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  private static String getKeyStoreDir() {
+    usesIBMJSSE = usesIBMProviders();
+    if (usesIBMJSSE) {
+      return "/com/gemstone/gemfire/security/generator/keys/ibm";
+    } else {
+      return "/com/gemstone/gemfire/security/generator/keys";
+    }
+  }
+
+  @Override
+  protected Properties initialize() throws IllegalArgumentException {
+    final String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, keyStoreDir + "/publickeyfile");
+
+    final Properties props = new Properties();
+    props.setProperty(PKCSAuthenticator.PUBLIC_KEY_FILE, keyStoreFile);
+    props.setProperty(PKCSAuthenticator.PUBLIC_KEYSTORE_PASSWORD, "gemfire");
+
+    return props;
+  }
+
+  @Override
+  public ClassCode classCode() {
+    return ClassCode.PKCS;
+  }
+
+  @Override
+  public String getAuthInit() {
+    return PKCSAuthInit.class.getName() + ".create";
+  }
+
+  @Override
+  public String getAuthenticator() {
+    return PKCSAuthenticator.class.getName() + ".create";
+  }
+
+  @Override
+  public Properties getInvalidCredentials(int index) {
+    final String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, keyStoreDir + "/gemfire11.keystore");
+
+    final Properties props = new Properties();
+    props.setProperty(PKCSAuthInit.KEYSTORE_FILE_PATH, keyStoreFile);
+    props.setProperty(PKCSAuthInit.KEYSTORE_ALIAS, "gemfire11");
+    props.setProperty(PKCSAuthInit.KEYSTORE_PASSWORD, "gemfire");
+
+    return props;
+  }
+
+  @Override
+  public Properties getValidCredentials(int index) {
+    final int aliasnum = (index % 10) + 1;
+    final String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, keyStoreDir + "/gemfire" + aliasnum + ".keystore");
+
+    final Properties props = new Properties();
+    props.setProperty(PKCSAuthInit.KEYSTORE_FILE_PATH, keyStoreFile);
+    props.setProperty(PKCSAuthInit.KEYSTORE_ALIAS, "gemfire" + aliasnum);
+    props.setProperty(PKCSAuthInit.KEYSTORE_PASSWORD, "gemfire");
+
+    return props;
+  }
+
+  @Override
+  public Properties getValidCredentials(Principal principal) {
+    final String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, keyStoreDir + principal.getName() + ".keystore");
+
+    final Properties props = new Properties();
+    props.setProperty(PKCSAuthInit.KEYSTORE_FILE_PATH, keyStoreFile);
+    props.setProperty(PKCSAuthInit.KEYSTORE_ALIAS, principal.getName());
+    props.setProperty(PKCSAuthInit.KEYSTORE_PASSWORD, "gemfire");
+
+    return props;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
new file mode 100755
index 0000000..ff23f78
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.generator;
+
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.security.Principal;
+import java.util.Properties;
+
+public class SSLCredentialGenerator extends CredentialGenerator {
+
+  private static final Logger logger = LogService.getLogger();
+
+  @Override
+  protected Properties initialize() throws IllegalArgumentException {
+    this.javaProperties = getValidJavaSSLProperties();
+    return getSSLProperties();
+  }
+
+  @Override
+  public ClassCode classCode() {
+    return ClassCode.SSL;
+  }
+
+  @Override
+  public String getAuthInit() {
+    return null;
+  }
+
+  @Override
+  public String getAuthenticator() {
+    return null;
+  }
+
+  @Override
+  public Properties getValidCredentials(int index) {
+    this.javaProperties = getValidJavaSSLProperties();
+    return getSSLProperties();
+  }
+
+  @Override
+  public Properties getValidCredentials(final Principal principal) {
+    this.javaProperties = getValidJavaSSLProperties();
+    return getSSLProperties();
+  }
+
+  @Override
+  public Properties getInvalidCredentials(final int index) {
+    this.javaProperties = getInvalidJavaSSLProperties();
+    return getSSLProperties();
+  }
+
+  private File findTrustedJKS() {
+    final File ssldir = new File(System.getProperty("JTESTS") + "/ssl");
+    return new File(ssldir, "trusted.keystore");
+  }
+
+  private File findUntrustedJKS() {
+    final File ssldir = new File(System.getProperty("JTESTS") + "/ssl");
+    return new File(ssldir, "untrusted.keystore");
+  }
+
+  private Properties getValidJavaSSLProperties() {
+    final File jks = findTrustedJKS();
+
+    try {
+      final Properties props = new Properties();
+      props.setProperty("javax.net.ssl.trustStore", jks.getCanonicalPath());
+      props.setProperty("javax.net.ssl.trustStorePassword", "password");
+      props.setProperty("javax.net.ssl.keyStore", jks.getCanonicalPath());
+      props.setProperty("javax.net.ssl.keyStorePassword", "password");
+      return props;
+
+    } catch (IOException ex) {
+      throw new AuthenticationFailedException("SSL: Exception while opening the key store: " + ex.getMessage(), ex);
+    }
+  }
+
+  private Properties getInvalidJavaSSLProperties() {
+    final File jks = findUntrustedJKS();
+
+    try {
+      final Properties props = new Properties();
+      props.setProperty("javax.net.ssl.trustStore", jks.getCanonicalPath());
+      props.setProperty("javax.net.ssl.trustStorePassword", "password");
+      props.setProperty("javax.net.ssl.keyStore", jks.getCanonicalPath());
+      props.setProperty("javax.net.ssl.keyStorePassword", "password");
+      return props;
+
+    } catch (IOException ex) {
+      throw new AuthenticationFailedException("SSL: Exception while opening the key store: " + ex.getMessage(), ex);
+    }
+  }
+
+  private Properties getSSLProperties() {
+    Properties props = new Properties();
+    props.setProperty("ssl-enabled", "true");
+    props.setProperty("ssl-require-authentication", "true");
+    props.setProperty("ssl-ciphers", "SSL_RSA_WITH_3DES_EDE_CBC_SHA");
+    props.setProperty("ssl-protocols", "TLSv1");
+    return props;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/generator/UserPasswordWithExtraPropsAuthInit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/UserPasswordWithExtraPropsAuthInit.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/UserPasswordWithExtraPropsAuthInit.java
new file mode 100755
index 0000000..b29f16b
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/UserPasswordWithExtraPropsAuthInit.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.generator;
+
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.security.AuthInitialize;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
+import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+/**
+ * An {@link AuthInitialize} implementation that obtains the user name and
+ * password as the credentials from the given set of properties. If 
+ * keep-extra-props property exits, it will copy rest of the
+ * properties provided in getCredential props argument will also be 
+ * copied as new credentials.
+ * 
+ * @since 5.5
+ */
+public class UserPasswordWithExtraPropsAuthInit extends UserPasswordAuthInit {
+
+  public static final String SECURITY_PREFIX = "security-";
+  public static final String EXTRA_PROPS = "security-keep-extra-props";
+
+  public static AuthInitialize create() {
+    return new UserPasswordWithExtraPropsAuthInit();
+  }
+
+  public UserPasswordWithExtraPropsAuthInit() {
+    super();
+  }
+
+  @Override
+  public Properties getCredentials(final Properties securityProperties, final DistributedMember server, final boolean isPeer) throws AuthenticationFailedException {
+    final Properties securityPropertiesCopy = super.getCredentials(securityProperties, server, isPeer);
+    final String extraProps = securityProperties.getProperty(EXTRA_PROPS);
+
+    if (extraProps != null) {
+    	for (Iterator it = securityProperties.keySet().iterator(); it.hasNext();) {
+    		final String key = (String) it.next();
+    		if (key.startsWith(SECURITY_PREFIX) &&
+    		    key.equalsIgnoreCase(USER_NAME) == false &&
+    		    key.equalsIgnoreCase(PASSWORD) == false &&
+    		    key.equalsIgnoreCase(EXTRA_PROPS) == false) {
+    			securityPropertiesCopy.setProperty(key, securityProperties.getProperty(key));
+    		}
+    	}
+    	this.securityLogWriter.fine("got everything and now have: " + securityPropertiesCopy.keySet().toString());
+    }
+
+    return securityPropertiesCopy;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/generator/XmlAuthzCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/XmlAuthzCredentialGenerator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/XmlAuthzCredentialGenerator.java
new file mode 100755
index 0000000..5d07004
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/XmlAuthzCredentialGenerator.java
@@ -0,0 +1,257 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.generator;
+
+import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
+import com.gemstone.gemfire.util.test.TestUtil;
+import com.gemstone.gemfire.security.templates.UsernamePrincipal;
+import com.gemstone.gemfire.security.templates.XmlAuthorization;
+
+import java.security.Principal;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+
+public class XmlAuthzCredentialGenerator extends AuthzCredentialGenerator {
+
+  private static final String dummyXml = "authz-dummy.xml";
+  private static final String ldapXml = "authz-ldap.xml";
+  private static final String pkcsXml = "authz-pkcs.xml";
+  private static final String sslXml = "authz-ssl.xml";
+
+  private static final String[] QUERY_REGIONS = { "/Portfolios", "/Positions", "/AuthRegion" };
+
+  public static OperationCode[] READER_OPS = {
+      OperationCode.GET,
+      OperationCode.REGISTER_INTEREST,
+      OperationCode.UNREGISTER_INTEREST,
+      OperationCode.KEY_SET,
+      OperationCode.CONTAINS_KEY,
+      OperationCode.EXECUTE_FUNCTION };
+
+  public static OperationCode[] WRITER_OPS = {
+      OperationCode.PUT,
+      OperationCode.DESTROY,
+      OperationCode.INVALIDATE,
+      OperationCode.REGION_CLEAR };
+
+  public static OperationCode[] QUERY_OPS = {
+      OperationCode.QUERY,
+      OperationCode.EXECUTE_CQ,
+      OperationCode.STOP_CQ,
+      OperationCode.CLOSE_CQ };
+
+  private static final byte READER_ROLE = 1;
+  private static final byte WRITER_ROLE = 2;
+  private static final byte QUERY_ROLE = 3;
+  private static final byte ADMIN_ROLE = 4;
+
+  private static Set readerOpsSet;
+  private static Set writerOpsSet;
+  private static Set queryOpsSet;
+  private static Set queryRegionSet;
+
+  static {
+    readerOpsSet = new HashSet();
+    for (int index = 0; index < READER_OPS.length; index++) {
+      readerOpsSet.add(READER_OPS[index]);
+    }
+
+    writerOpsSet = new HashSet();
+    for (int index = 0; index < WRITER_OPS.length; index++) {
+      writerOpsSet.add(WRITER_OPS[index]);
+    }
+
+    queryOpsSet = new HashSet();
+    for (int index = 0; index < QUERY_OPS.length; index++) {
+      queryOpsSet.add(QUERY_OPS[index]);
+    }
+
+    queryRegionSet = new HashSet();
+    for (int index = 0; index < QUERY_REGIONS.length; index++) {
+      queryRegionSet.add(QUERY_REGIONS[index]);
+    }
+  }
+
+  @Override
+  protected Properties init() throws IllegalArgumentException {
+    final Properties sysProps = new Properties();
+    final String dirName = "/com/gemstone/gemfire/security/generator/";
+
+    if (this.generator.classCode().isDummy()) {
+      final String xmlFilename = TestUtil.getResourcePath(XmlAuthzCredentialGenerator.class, dirName + dummyXml);
+      sysProps.setProperty(XmlAuthorization.DOC_URI_PROP_NAME, xmlFilename);
+
+    } else if (this.generator.classCode().isLDAP()) {
+      final String xmlFilename = TestUtil.getResourcePath(XmlAuthzCredentialGenerator.class, dirName + ldapXml);
+      sysProps.setProperty(XmlAuthorization.DOC_URI_PROP_NAME, xmlFilename);
+
+      // } else if (this.generator.classCode().isPKCS()) {
+      //   sysProps.setProperty(XmlAuthorization.DOC_URI_PROP_NAME, dirName + pkcsXml);
+      // }
+      // } else if (this.generator.classCode().isSSL()) {
+      //   sysProps.setProperty(XmlAuthorization.DOC_URI_PROP_NAME, dirName + sslXml);
+      // }
+
+    } else {
+      throw new IllegalArgumentException("No XML defined for XmlAuthorization module to work with " + this.generator.getAuthenticator());
+    }
+    return sysProps;
+  }
+
+  @Override
+  public ClassCode classCode() {
+    return ClassCode.XML;
+  }
+
+  @Override
+  public String getAuthorizationCallback() {
+    return XmlAuthorization.class.getName() + ".create";
+  }
+
+  private Principal getDummyPrincipal(final byte roleType, final int index) {
+    final String[] admins = new String[] { "root", "admin", "administrator" };
+    final int numReaders = 3;
+    final int numWriters = 3;
+
+    switch (roleType) {
+      case READER_ROLE:
+        return new UsernamePrincipal("reader" + (index % numReaders));
+      case WRITER_ROLE:
+        return new UsernamePrincipal("writer" + (index % numWriters));
+      case QUERY_ROLE:
+        return new UsernamePrincipal("reader" + ((index % 2) + 3));
+      default:
+        return new UsernamePrincipal(admins[index % admins.length]);
+    }
+  }
+
+  @Override
+  protected Principal getAllowedPrincipal(final OperationCode[] opCodes, final String[] regionNames, final int index) {
+    if (this.generator.classCode().isDummy()) {
+      final byte roleType = getRequiredRole(opCodes, regionNames);
+      return getDummyPrincipal(roleType, index);
+
+    } else if (this.generator.classCode().isLDAP()) {
+      final byte roleType = getRequiredRole(opCodes, regionNames);
+      return getLdapPrincipal(roleType, index);
+    }
+
+    return null;
+  }
+
+  @Override
+  protected Principal getDisallowedPrincipal(final OperationCode[] opCodes, final String[] regionNames, final int index) {
+    final byte roleType = getRequiredRole(opCodes, regionNames);
+
+    byte disallowedRoleType = READER_ROLE;
+    switch (roleType) {
+      case READER_ROLE:
+        disallowedRoleType = WRITER_ROLE;
+        break;
+      case WRITER_ROLE:
+        disallowedRoleType = READER_ROLE;
+        break;
+      case QUERY_ROLE:
+        disallowedRoleType = READER_ROLE;
+        break;
+      case ADMIN_ROLE:
+        disallowedRoleType = READER_ROLE;
+        break;
+    }
+
+    if (this.generator.classCode().isDummy()) {
+      return getDummyPrincipal(disallowedRoleType, index);
+
+    } else if (this.generator.classCode().isLDAP()) {
+      return getLdapPrincipal(disallowedRoleType, index);
+    }
+
+    return null;
+  }
+
+  @Override
+  protected int getNumPrincipalTries(final OperationCode[] opCodes, final String[] regionNames) {
+    return 5;
+  }
+
+  private Principal getLdapPrincipal(final byte roleType, final int index) {
+    final String userPrefix = "gemfire";
+    final int[] readerIndices = { 3, 4, 5 };
+    final int[] writerIndices = { 6, 7, 8 };
+    final int[] queryIndices = { 9, 10 };
+    final int[] adminIndices = { 1, 2 };
+
+    switch (roleType) {
+      case READER_ROLE:
+        int readerIndex = readerIndices[index % readerIndices.length];
+        return new UsernamePrincipal(userPrefix + readerIndex);
+      case WRITER_ROLE:
+        int writerIndex = writerIndices[index % writerIndices.length];
+        return new UsernamePrincipal(userPrefix + writerIndex);
+      case QUERY_ROLE:
+        int queryIndex = queryIndices[index % queryIndices.length];
+        return new UsernamePrincipal(userPrefix + queryIndex);
+      default:
+        int adminIndex = adminIndices[index % adminIndices.length];
+        return new UsernamePrincipal(userPrefix + adminIndex);
+    }
+  }
+
+  private byte getRequiredRole(final OperationCode[] opCodes, final String[] regionNames) {
+    byte roleType = ADMIN_ROLE;
+    boolean requiresReader = true;
+    boolean requiresWriter = true;
+    boolean requiresQuery = true;
+
+    for (int opNum = 0; opNum < opCodes.length; opNum++) {
+      final OperationCode opCode = opCodes[opNum];
+      if (requiresReader && !readerOpsSet.contains(opCode)) {
+        requiresReader = false;
+      }
+      if (requiresWriter && !writerOpsSet.contains(opCode)) {
+        requiresWriter = false;
+      }
+      if (requiresQuery && !queryOpsSet.contains(opCode)) {
+        requiresQuery = false;
+      }
+    }
+
+    if (requiresReader) {
+      roleType = READER_ROLE;
+
+    } else if (requiresWriter) {
+      roleType = WRITER_ROLE;
+
+    } else if (requiresQuery) {
+      if (regionNames != null && regionNames.length > 0) {
+        for (int index = 0; index < regionNames.length; index++) {
+          final String regionName = XmlAuthorization.normalizeRegionName(regionNames[index]);
+          if (requiresQuery && !queryRegionSet.contains(regionName)) {
+            requiresQuery = false;
+            break;
+          }
+        }
+        if (requiresQuery) {
+          roleType = QUERY_ROLE;
+        }
+      }
+    }
+
+    return roleType;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/DummyAuthenticator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/DummyAuthenticator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/DummyAuthenticator.java
new file mode 100755
index 0000000..f9293b8
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/DummyAuthenticator.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.templates;
+
+import java.security.Principal;
+import java.util.Properties;
+
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
+import com.gemstone.gemfire.security.Authenticator;
+
+/**
+ * A dummy implementation of the {@link Authenticator} interface that expects a
+ * user name and password allowing authentication depending on the format of the
+ * user name.
+ *
+ * @since 5.5
+ */
+public class DummyAuthenticator implements Authenticator {
+
+  public static Authenticator create() {
+    return new DummyAuthenticator();
+  }
+
+  public static boolean checkValidName(final String userName) {
+    return userName.startsWith("user") ||
+           userName.startsWith("reader") ||
+           userName.startsWith("writer") ||
+           userName.equals("admin") ||
+           userName.equals("root") ||
+           userName.equals("administrator");
+  }
+
+  @Override
+  public void init(final Properties securityProperties, final LogWriter systemLogWriter, final LogWriter securityLogWriter) throws AuthenticationFailedException {
+  }
+
+  @Override
+  public Principal authenticate(final Properties credentials, final DistributedMember member) throws AuthenticationFailedException {
+    final String userName = credentials.getProperty(UserPasswordAuthInit.USER_NAME);
+    if (userName == null) {
+      throw new AuthenticationFailedException("DummyAuthenticator: user name property [" + UserPasswordAuthInit.USER_NAME + "] not provided");
+    }
+
+    final String password = credentials.getProperty(UserPasswordAuthInit.PASSWORD);
+    if (password == null) {
+      throw new AuthenticationFailedException( "DummyAuthenticator: password property [" + UserPasswordAuthInit.PASSWORD + "] not provided");
+    }
+
+    if (userName.equals(password) && checkValidName(userName)) {
+      return new UsernamePrincipal(userName);
+    } else {
+      throw new AuthenticationFailedException("DummyAuthenticator: Invalid user name [" + userName + "], password supplied.");
+    }
+  }
+
+  @Override
+  public void close() {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/DummyAuthorization.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/DummyAuthorization.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/DummyAuthorization.java
new file mode 100755
index 0000000..a76a46f
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/DummyAuthorization.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.templates;
+
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.operations.OperationContext;
+import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.security.AccessControl;
+import com.gemstone.gemfire.security.NotAuthorizedException;
+
+import java.security.Principal;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * A dummy implementation of the {@code AccessControl} interface that
+ * allows authorization depending on the format of the {@code Principal}
+ * string.
+ * 
+ * @since 5.5
+ */
+public class DummyAuthorization implements AccessControl {
+
+  private Set allowedOps;
+  private DistributedMember remoteMember;
+  private LogWriter securityLogWriter;
+
+  public static final OperationCode[] READER_OPS = {
+      OperationCode.GET,
+      OperationCode.QUERY,
+      OperationCode.EXECUTE_CQ,
+      OperationCode.CLOSE_CQ,
+      OperationCode.STOP_CQ,
+      OperationCode.REGISTER_INTEREST,
+      OperationCode.UNREGISTER_INTEREST,
+      OperationCode.KEY_SET,
+      OperationCode.CONTAINS_KEY,
+      OperationCode.EXECUTE_FUNCTION };
+
+  public static final OperationCode[] WRITER_OPS = {
+      OperationCode.PUT,
+      OperationCode.PUTALL,
+      OperationCode.DESTROY,
+      OperationCode.INVALIDATE,
+      OperationCode.REGION_CLEAR };
+
+  public static AccessControl create() {
+    return new DummyAuthorization();
+  }
+
+  public DummyAuthorization() {
+    this.allowedOps = new HashSet(20);
+  }
+
+  @Override
+  public void init(final Principal principal, final DistributedMember remoteMember, final Cache cache) throws NotAuthorizedException {
+    if (principal != null) {
+
+      final String name = principal.getName().toLowerCase();
+
+      if (name != null) {
+
+        if (name.equals("root") || name.equals("admin") || name.equals("administrator")) {
+          addReaderOps();
+          addWriterOps();
+          this.allowedOps.add(OperationCode.REGION_CREATE);
+          this.allowedOps.add(OperationCode.REGION_DESTROY);
+
+        } else if (name.startsWith("writer")) {
+          addWriterOps();
+
+        } else if (name.startsWith("reader")) {
+          addReaderOps();
+        }
+
+      }
+    }
+
+    this.remoteMember = remoteMember;
+    this.securityLogWriter = cache.getSecurityLogger();
+  }
+
+  @Override
+  public boolean authorizeOperation(String regionName, OperationContext context) {
+    final OperationCode opCode = context.getOperationCode();
+    this.securityLogWriter.fine("Invoked authorize operation for [" + opCode + "] in region [" + regionName + "] for client: " + remoteMember);
+    return this.allowedOps.contains(opCode);
+  }
+
+  @Override
+  public void close() {
+    this.allowedOps.clear();
+  }
+
+  private void addReaderOps() {
+    for (int index = 0; index < READER_OPS.length; index++) {
+      this.allowedOps.add(READER_OPS[index]);
+    }
+  }
+
+  private void addWriterOps() {
+    for (int index = 0; index < WRITER_OPS.length; index++) {
+      this.allowedOps.add(WRITER_OPS[index]);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/FunctionSecurityPrmsHolder.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/FunctionSecurityPrmsHolder.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/FunctionSecurityPrmsHolder.java
new file mode 100755
index 0000000..9ce82f3
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/FunctionSecurityPrmsHolder.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.templates;
+
+import java.util.Set;
+
+/**
+ * This is a sample class for objects which hold information of the authorized
+ * function names and authorized value for the {@code optimizeForWrite}.
+ * 
+ * @since 6.0
+ */
+public class FunctionSecurityPrmsHolder {
+
+  private final Boolean optimizeForWrite;
+  private final Set<String> functionIds;
+  private final Set<String> keySet;
+
+  public FunctionSecurityPrmsHolder(final Boolean optimizeForWrite, final Set<String> functionIds, final Set<String> keySet) {
+    this.optimizeForWrite = optimizeForWrite;
+    this.functionIds = functionIds;
+    this.keySet = keySet;
+  }
+
+  public Boolean isOptimizeForWrite() {
+    return this.optimizeForWrite;
+  }
+
+  public Set<String> getFunctionIds() {
+    return this.functionIds;
+  }
+
+  public Set<String> getKeySet() {
+    return this.keySet;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/LdapUserAuthenticator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/LdapUserAuthenticator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/LdapUserAuthenticator.java
new file mode 100755
index 0000000..fd2286e
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/LdapUserAuthenticator.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.templates;
+
+import java.security.Principal;
+import java.util.Properties;
+import javax.naming.Context;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
+import com.gemstone.gemfire.security.Authenticator;
+import org.apache.logging.log4j.Logger;
+
+/**
+ * An implementation of {@link Authenticator} that uses LDAP.
+ *
+ * @since 5.5
+ */
+public class LdapUserAuthenticator implements Authenticator {
+
+  private static final Logger logger = LogService.getLogger();
+
+  public static final String LDAP_SERVER_NAME = "security-ldap-server";
+  public static final String LDAP_BASEDN_NAME = "security-ldap-basedn";
+  public static final String LDAP_SSL_NAME = "security-ldap-usessl";
+
+  private String ldapServer = null;
+  private String baseDomainName = null;
+  private String ldapUrlScheme = null;
+
+  public static Authenticator create() {
+    return new LdapUserAuthenticator();
+  }
+
+  @Override
+  public void init(final Properties securityProps, final LogWriter systemLogWriter, final LogWriter securityLogWriter) throws AuthenticationFailedException {
+    logger.info("Initializing LdapUserAuthenticator with {}", securityProps);
+
+    this.ldapServer = securityProps.getProperty(LDAP_SERVER_NAME);
+    if (this.ldapServer == null || this.ldapServer.length() == 0) {
+      throw new AuthenticationFailedException("LdapUserAuthenticator: LDAP server property [" + LDAP_SERVER_NAME + "] not specified");
+    }
+
+    this.baseDomainName = securityProps.getProperty(LDAP_BASEDN_NAME);
+    if (this.baseDomainName == null || this.baseDomainName.length() == 0) {
+      throw new AuthenticationFailedException("LdapUserAuthenticator: LDAP base DN property [" + LDAP_BASEDN_NAME + "] not specified");
+    }
+
+    final String sslName = securityProps.getProperty(LDAP_SSL_NAME);
+    if (sslName != null && sslName.toLowerCase().equals("true")) {
+      this.ldapUrlScheme = "ldaps://";
+    } else {
+      this.ldapUrlScheme = "ldap://";
+    }
+  }
+
+  @Override
+  public Principal authenticate(final Properties credentials, final DistributedMember member) {
+    final String userName = credentials.getProperty(UserPasswordAuthInit.USER_NAME);
+    if (userName == null) {
+      throw new AuthenticationFailedException("LdapUserAuthenticator: user name property [" + UserPasswordAuthInit.USER_NAME + "] not provided");
+    }
+
+    String password = credentials.getProperty(UserPasswordAuthInit.PASSWORD);
+    if (password == null) {
+      password = "";
+    }
+
+    final Properties env = new Properties();
+    env.put(Context.INITIAL_CONTEXT_FACTORY, com.sun.jndi.ldap.LdapCtxFactory.class.getName());
+    env.put(Context.PROVIDER_URL, this.ldapUrlScheme + this.ldapServer + '/' + this.baseDomainName);
+    env.put(Context.SECURITY_PRINCIPAL, "uid=" + userName + "," + this.baseDomainName);
+    env.put(Context.SECURITY_CREDENTIALS, password);
+
+    try {
+      final DirContext ctx = new InitialDirContext(env);
+      ctx.close();
+    } catch (Exception e) {
+      throw new AuthenticationFailedException("LdapUserAuthenticator: Failure with provided username, password combination for user name: " + userName, e);
+    }
+
+    return new UsernamePrincipal(userName);
+  }
+
+  @Override
+  public void close() {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSAuthInit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSAuthInit.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSAuthInit.java
new file mode 100755
index 0000000..a60c8fb
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSAuthInit.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.templates;
+
+import java.io.FileInputStream;
+import java.security.Key;
+import java.security.KeyStore;
+import java.security.PrivateKey;
+import java.security.Signature;
+import java.security.cert.X509Certificate;
+import java.util.Properties;
+
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.security.AuthInitialize;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
+import org.apache.logging.log4j.Logger;
+
+/**
+ * An {@link AuthInitialize} implementation that obtains the digital signature
+ * for use with PKCS scheme on server from the given set of properties.
+ * 
+ * To use this class the {@code security-client-auth-init} property should be
+ * set to the fully qualified name the static {@code create} function
+ * viz. <{@code templates.security.PKCSAuthInit.create}
+ * 
+ * @since 5.5
+ */
+public class PKCSAuthInit implements AuthInitialize {
+
+  private static final Logger logger = LogService.getLogger();
+
+  public static final String KEYSTORE_FILE_PATH = "security-keystorepath";
+  public static final String KEYSTORE_ALIAS = "security-alias";
+  public static final String KEYSTORE_PASSWORD = "security-keystorepass";
+  public static final String SIGNATURE_DATA = "security-signature";
+
+  protected LogWriter systemLogWriter;
+  protected LogWriter securityLogWriter;
+
+  public static AuthInitialize create() {
+    return new PKCSAuthInit();
+  }
+
+  @Override
+  public void init(final LogWriter systemLogWriter, final LogWriter securityLogWriter) throws AuthenticationFailedException {
+    this.systemLogWriter = systemLogWriter;
+    this.securityLogWriter = securityLogWriter;
+  }
+
+  @Override
+  public Properties getCredentials(final Properties securityProperties, final DistributedMember server, final boolean isPeer) throws AuthenticationFailedException {
+    final String keyStorePath = securityProperties.getProperty(KEYSTORE_FILE_PATH);
+    if (keyStorePath == null) {
+      throw new AuthenticationFailedException("PKCSAuthInit: key-store file path property [" + KEYSTORE_FILE_PATH + "] not set.");
+    }
+
+    final String alias = securityProperties.getProperty(KEYSTORE_ALIAS);
+    if (alias == null) {
+      throw new AuthenticationFailedException("PKCSAuthInit: key alias name property [" + KEYSTORE_ALIAS + "] not set.");
+    }
+
+    final String keyStorePass = securityProperties.getProperty(KEYSTORE_PASSWORD);
+
+    try {
+      final KeyStore ks = KeyStore.getInstance("PKCS12");
+      final char[] passPhrase = (keyStorePass != null ? keyStorePass.toCharArray() : null);
+      final FileInputStream certificatefile = new FileInputStream(keyStorePath);
+
+      try {
+        ks.load(certificatefile, passPhrase);
+      } finally {
+        certificatefile.close();
+      }
+
+      final Key key = ks.getKey(alias, passPhrase);
+
+      if (key instanceof PrivateKey) {
+        final PrivateKey privKey = (PrivateKey)key;
+        final X509Certificate cert = (X509Certificate)ks.getCertificate(alias);
+        final Signature sig = Signature.getInstance(cert.getSigAlgName());
+
+        sig.initSign(privKey);
+        sig.update(alias.getBytes("UTF-8"));
+        final byte[] signatureBytes = sig.sign();
+
+        final Properties newprops = new Properties();
+        newprops.put(KEYSTORE_ALIAS, alias);
+        newprops.put(SIGNATURE_DATA, signatureBytes);
+        return newprops;
+
+      } else {
+        throw new AuthenticationFailedException("PKCSAuthInit: " + "Failed to load private key from the given file: " + keyStorePath);
+      }
+
+    } catch (Exception ex) {
+      throw new AuthenticationFailedException("PKCSAuthInit: Exception while getting credentials: " + ex, ex);
+    }
+  }
+
+  @Override
+  public void close() {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSAuthenticator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSAuthenticator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSAuthenticator.java
new file mode 100755
index 0000000..971cf60
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSAuthenticator.java
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.templates;
+
+import java.io.FileInputStream;
+import java.security.KeyStore;
+import java.security.NoSuchAlgorithmException;
+import java.security.Principal;
+import java.security.Signature;
+import java.security.cert.Certificate;
+import java.security.cert.X509Certificate;
+import java.security.spec.InvalidKeySpecException;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
+import com.gemstone.gemfire.security.Authenticator;
+import org.apache.logging.log4j.Logger;
+
+/**
+ * An implementation of {@link Authenticator} that uses PKCS.
+ */
+public class PKCSAuthenticator implements Authenticator {
+
+  private static final Logger logger = LogService.getLogger();
+
+  public static final String PUBLIC_KEY_FILE = "security-publickey-filepath";
+  public static final String PUBLIC_KEYSTORE_PASSWORD = "security-publickey-pass";
+
+  private String pubKeyFilePath;
+  private String pubKeyPass;
+  private Map aliasCertificateMap;
+
+  private LogWriter systemLogWriter;
+  private LogWriter securityLogWriter;
+
+  public static Authenticator create() {
+    return new PKCSAuthenticator();
+  }
+
+  @Override
+  public void init(final Properties securityProperties, final LogWriter systemLogWriter, final LogWriter securityLogWriter) throws AuthenticationFailedException {
+    this.systemLogWriter = systemLogWriter;
+    this.securityLogWriter = securityLogWriter;
+
+    this.pubKeyFilePath = securityProperties.getProperty(PUBLIC_KEY_FILE);
+    if (this.pubKeyFilePath == null) {
+      throw new AuthenticationFailedException("PKCSAuthenticator: property " + PUBLIC_KEY_FILE + " not specified as the public key file.");
+    }
+
+    this.pubKeyPass = securityProperties.getProperty(PUBLIC_KEYSTORE_PASSWORD);
+    this.aliasCertificateMap = new HashMap();
+
+    populateMap();
+  }
+
+  @Override
+  public Principal authenticate(final Properties credentials, final DistributedMember member) throws AuthenticationFailedException {
+    final String alias = (String)credentials.get(PKCSAuthInit.KEYSTORE_ALIAS);
+    if (alias == null || alias.length() <= 0) {
+      throw new AuthenticationFailedException("No alias received");
+    }
+
+    try {
+      final X509Certificate cert = getCertificate(alias);
+      if (cert == null) {
+        throw newException("No certificate found for alias:" + alias);
+      }
+
+      final byte[] signatureBytes = (byte[])credentials.get(PKCSAuthInit.SIGNATURE_DATA);
+      if (signatureBytes == null) {
+        throw newException("signature data property [" + PKCSAuthInit.SIGNATURE_DATA + "] not provided");
+      }
+
+      final Signature sig = Signature.getInstance(cert.getSigAlgName());
+      sig.initVerify(cert);
+      sig.update(alias.getBytes("UTF-8"));
+
+      if (!sig.verify(signatureBytes)) {
+        throw newException("verification of client signature failed");
+      }
+
+      return new PKCSPrincipal(alias);
+
+    } catch (Exception ex) {
+      throw newException(ex.toString(), ex);
+    }
+  }
+
+  @Override
+  public void close() {
+  }
+
+  private void populateMap() {
+    try {
+      final KeyStore keyStore = KeyStore.getInstance("JKS");
+      final char[] passPhrase = this.pubKeyPass != null ? this.pubKeyPass.toCharArray() : null;
+      final FileInputStream keyStoreFile = new FileInputStream(this.pubKeyFilePath);
+
+      try {
+        keyStore.load(keyStoreFile, passPhrase);
+      } finally {
+        keyStoreFile.close();
+      }
+
+      for (Enumeration e = keyStore.aliases(); e.hasMoreElements();) {
+        final Object alias = e.nextElement();
+        final Certificate cert = keyStore.getCertificate((String)alias);
+        if (cert instanceof X509Certificate) {
+          this.aliasCertificateMap.put(alias, cert);
+        }
+      }
+
+    } catch (Exception e) {
+      throw new AuthenticationFailedException("Exception while getting public keys: " + e.getMessage(), e);
+    }
+  }
+
+  private AuthenticationFailedException newException(final String message, final Exception cause) {
+    final String fullMessage = "PKCSAuthenticator: Authentication of client failed due to: " + message;
+    if (cause != null) {
+      return new AuthenticationFailedException(fullMessage, cause);
+    } else {
+      return new AuthenticationFailedException(fullMessage);
+    }
+  }
+
+  private AuthenticationFailedException newException(final String message) {
+    return newException(message, null);
+  }
+
+  private X509Certificate getCertificate(final String alias) throws NoSuchAlgorithmException, InvalidKeySpecException {
+    if (this.aliasCertificateMap.containsKey(alias)) {
+      return (X509Certificate) this.aliasCertificateMap.get(alias);
+    }
+    return null;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipal.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipal.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipal.java
new file mode 100755
index 0000000..4a6c45e
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipal.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.gemstone.gemfire.security.templates;
+
+import java.io.Serializable;
+import java.security.Principal;
+
+public class PKCSPrincipal implements Principal, Serializable {
+
+  private final String alias;
+
+  public PKCSPrincipal(final String alias) {
+    this.alias = alias;
+  }
+
+  @Override
+  public String getName() {
+    return this.alias;
+  }
+
+  @Override
+  public String toString() {
+    return this.alias;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipalTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipalTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipalTest.java
new file mode 100644
index 0000000..e0bc1e4
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/PKCSPrincipalTest.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.templates;
+
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.apache.commons.lang.SerializationUtils;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.Serializable;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Unit tests for {@link PKCSPrincipal}
+ */
+@Category(UnitTest.class)
+public class PKCSPrincipalTest {
+
+  @Test
+  public void isSerializable() throws Exception {
+    assertThat(PKCSPrincipal.class).isInstanceOf(Serializable.class);
+  }
+
+  @Test
+  public void canBeSerialized() throws Exception {
+    String name = "jsmith";
+    PKCSPrincipal instance = new PKCSPrincipal(name);
+
+    PKCSPrincipal cloned = (PKCSPrincipal) SerializationUtils.clone(instance);
+
+    assertThat(cloned.getName()).isEqualTo(name);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UserPasswordAuthInit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UserPasswordAuthInit.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UserPasswordAuthInit.java
new file mode 100755
index 0000000..312f18b
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UserPasswordAuthInit.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.templates;
+
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.security.AuthInitialize;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
+
+import java.util.Properties;
+
+/**
+ * An {@link AuthInitialize} implementation that obtains the user name and
+ * password as the credentials from the given set of properties.
+ * 
+ * To use this class the {@code security-client-auth-init} property should be
+ * set to the fully qualified name the static {@code create} function
+ * viz. {@code templates.security.UserPasswordAuthInit.create}
+ * 
+ * @since 5.5
+ */
+public class UserPasswordAuthInit implements AuthInitialize {
+
+  public static final String USER_NAME = "security-username";
+  public static final String PASSWORD = "security-password";
+
+  protected LogWriter systemLogWriter;
+  protected LogWriter securityLogWriter;
+
+  public static AuthInitialize create() {
+    return new UserPasswordAuthInit();
+  }
+
+  @Override
+  public void init(final LogWriter systemLogWriter, final LogWriter securityLogWriter) throws AuthenticationFailedException {
+    this.systemLogWriter = systemLogWriter;
+    this.securityLogWriter = securityLogWriter;
+  }
+
+  @Override
+  public Properties getCredentials(final Properties securityProperties, final DistributedMember server, final boolean isPeer) throws AuthenticationFailedException {
+    String userName = securityProperties.getProperty(USER_NAME);
+    if (userName == null) {
+      throw new AuthenticationFailedException("UserPasswordAuthInit: user name property [" + USER_NAME + "] not set.");
+    }
+
+    String password = securityProperties.getProperty(PASSWORD);
+    if (password == null) {
+      password = "";
+    }
+
+    Properties securityPropertiesCopy = new Properties();
+    securityPropertiesCopy.setProperty(USER_NAME, userName);
+    securityPropertiesCopy.setProperty(PASSWORD, password);
+    return securityPropertiesCopy;
+  }
+
+  @Override
+  public void close() {
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipal.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipal.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipal.java
new file mode 100755
index 0000000..a5062f2
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipal.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.templates;
+
+import java.io.Serializable;
+import java.security.Principal;
+
+/**
+ * An implementation of {@link Principal} class for a simple user name.
+ * 
+ * @since 5.5
+ */
+public class UsernamePrincipal implements Principal, Serializable {
+
+  private final String userName;
+
+  public UsernamePrincipal(final String userName) {
+    this.userName = userName;
+  }
+
+  @Override
+  public String getName() {
+    return this.userName;
+  }
+
+  @Override
+  public String toString() {
+    return this.userName;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipalTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipalTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipalTest.java
new file mode 100644
index 0000000..e762d06
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/UsernamePrincipalTest.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.templates;
+
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.apache.commons.lang.SerializationUtils;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.Serializable;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Unit tests for {@link UsernamePrincipal}
+ */
+@Category(UnitTest.class)
+public class UsernamePrincipalTest {
+
+  @Test
+  public void isSerializable() throws Exception {
+    assertThat(UsernamePrincipal.class).isInstanceOf(Serializable.class);
+  }
+
+  @Test
+  public void canBeSerialized() throws Exception {
+    String name = "jsmith";
+    UsernamePrincipal instance = new UsernamePrincipal(name);
+
+    UsernamePrincipal cloned = (UsernamePrincipal) SerializationUtils.clone(instance);
+
+    assertThat(cloned.getName()).isEqualTo(name);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlAuthorization.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlAuthorization.java b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlAuthorization.java
new file mode 100755
index 0000000..b8f2e50
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/templates/XmlAuthorization.java
@@ -0,0 +1,614 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.templates;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.operations.ExecuteFunctionOperationContext;
+import com.gemstone.gemfire.cache.operations.OperationContext;
+import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
+import com.gemstone.gemfire.cache.operations.QueryOperationContext;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.security.AccessControl;
+import com.gemstone.gemfire.security.NotAuthorizedException;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * An implementation of the {@link AccessControl} interface that allows
+ * authorization using the permissions as specified in the given XML
+ * file.
+ * 
+ * The format of the XML file is specified in <a href="authz5_5.dtd"/>. It
+ * implements a role-based authorization at the operation level for each region.
+ * Each principal name may be associated with a set of roles. The name of the
+ * principal is obtained using the {@link Principal#getName()} method and no other
+ * information of the principal is utilized. Each role can be provided
+ * permissions to execute operations for each region.
+ * 
+ * The top-level element in the XML is "acl" tag that contains the "role" and
+ * "permission" tags. The "role" tag contains the list of users that have been
+ * given that role. The name of the role is specified in the "role" attribute
+ * and the users are contained in the "user" tags insided the "role" tag.
+ * 
+ * The "permissions" tag contains the list of operations allowed for a
+ * particular region. The role name is specified as the "role" attribute, the
+ * list of comma separated region names as the optional "regions" attribute and
+ * the operation names are contained in the "operation" tags inside the
+ * "permissions" tag. The allowed operation names are: GET, PUT, PUTALL,
+ * DESTROY, REGISTER_INTEREST, UNREGISTER_INTEREST, CONTAINS_KEY, KEY_SET,
+ * QUERY, EXECUTE_CQ, STOP_CQ, CLOSE_CQ, REGION_CLEAR, REGION_CREATE,
+ * REGION_DESTROY. These correspond to the operations in the
+ * {@link OperationCode} enumeration with the same name.
+ * 
+ * When no region name is specified then the operation is allowed for all
+ * regions in the cache. Any permissions specified for regions using the
+ * "regions" attribute override these permissions. This allows users to provide
+ * generic permissions without any region name, and override for specific
+ * regions specified using the "regions" attribute. A cache-level operation
+ * (e.g. {@link OperationCode#REGION_DESTROY}) specified for a particular region
+ * is ignored i.e. the cache-level operations are only applicable when no region
+ * name is specified. A {@link OperationCode#QUERY} operation is permitted when
+ * either the {@code QUERY} permission is provided at the cache-level for
+ * the user or when {@code QUERY} permission is provided for all the
+ * regions that are part of the query string.
+ * 
+ * Any roles specified in the "user" tag that do not have a specified permission
+ * set using the "permission" tags are ignored. When no {@link Principal} is
+ * associated with the current connection, then empty user name is used to
+ * search for the roles so an empty user name can be used to specify roles of
+ * unauthenticated clients (i.e. {@code Everyone}).
+ * 
+ * This sample implementation is useful only for pre-operation checks and should
+ * not be used for post-operation authorization since it does nothing useful for
+ * post-operation case.
+ * 
+ * @since 5.5
+ */
+public class XmlAuthorization implements AccessControl {
+
+  public static final String DOC_URI_PROP_NAME = "security-authz-xml-uri";
+
+  private static final Object sync = new Object();
+  private static final String EMPTY_VALUE = "";
+
+  private static final String TAG_ROLE = "role";
+  private static final String TAG_USER = "user";
+  private static final String TAG_PERMS = "permission";
+  private static final String TAG_OP = "operation";
+
+  private static final String ATTR_ROLENAME = "name";
+  private static final String ATTR_ROLE = "role";
+  private static final String ATTR_REGIONS = "regions";
+  private static final String ATTR_FUNCTION_IDS = "functionIds";
+  private static final String ATTR_FUNCTION_OPTIMIZE_FOR_WRITE = "optimizeForWrite";
+  private static final String ATTR_FUNCTION_KEY_SET = "keySet";
+
+  private static String currentDocUri = null;
+  private static Map<String, HashSet<String>> userRoles = null;
+  private static Map<String, Map<String, Map<OperationCode, FunctionSecurityPrmsHolder>>> rolePermissions = null;
+  private static NotAuthorizedException xmlLoadFailure = null;
+
+  private final Map<String, Map<OperationCode, FunctionSecurityPrmsHolder>> allowedOps;
+
+  protected LogWriter systemLogWriter;
+  protected LogWriter securityLogWriter;
+
+  /**
+   * Public static factory method to create an instance of
+   * {@code XmlAuthorization}. The fully qualified name of the class
+   * ({@code com.gemstone.gemfire.security.templates.XmlAuthorization.create})
+   * should be mentioned as the {@code security-client-accessor} system
+   * property to enable pre-operation authorization checks as implemented in
+   * this class.
+   *
+   * @return an object of {@code XmlAuthorization} class
+   */
+  public static AccessControl create() {
+    return new XmlAuthorization();
+  }
+
+  /**
+   * Clear all the statically cached information.
+   */
+  public static void clear() {
+    XmlAuthorization.currentDocUri = null;
+    if (XmlAuthorization.userRoles != null) {
+      XmlAuthorization.userRoles.clear();
+      XmlAuthorization.userRoles = null;
+    }
+    if (XmlAuthorization.rolePermissions != null) {
+      XmlAuthorization.rolePermissions.clear();
+      XmlAuthorization.rolePermissions = null;
+    }
+    XmlAuthorization.xmlLoadFailure = null;
+  }
+
+  /**
+   * Change the region name to a standard format having single '/' as separator
+   * and starting with a '/' as in standard POSIX paths
+   */
+  public static String normalizeRegionName(final String regionName) {
+    if (regionName == null || regionName.length() == 0) {
+      return EMPTY_VALUE;
+    }
+
+    char[] resultName = new char[regionName.length() + 1];
+    boolean changed = false;
+    boolean isPrevCharSlash = false;
+    int startIndex;
+
+    if (regionName.charAt(0) != '/') {
+      changed = true;
+      startIndex = 0;
+    } else {
+      isPrevCharSlash = true;
+      startIndex = 1;
+    }
+
+    resultName[0] = '/';
+    int resultLength = 1;
+
+    // Replace all more than one '/'s with a single '/'
+    for (int index = startIndex; index < regionName.length(); ++index) {
+      char currChar = regionName.charAt(index);
+      if (currChar == '/') {
+        if (isPrevCharSlash) {
+          changed = true;
+          continue;
+        }
+        isPrevCharSlash = true;
+      } else {
+        isPrevCharSlash = false;
+      }
+      resultName[resultLength++] = currChar;
+    }
+
+    // Remove any trailing slash
+    if (resultName[resultLength - 1] == '/') {
+      --resultLength;
+      changed = true;
+    }
+
+    if (changed) {
+      return new String(resultName, 0, resultLength);
+    } else {
+      return regionName;
+    }
+  }
+
+  private XmlAuthorization() {
+    this.allowedOps = new HashMap<String, Map<OperationCode, FunctionSecurityPrmsHolder>>();
+    this.systemLogWriter = null;
+    this.securityLogWriter = null;
+  }
+
+  /**
+   * Initialize the {@code XmlAuthorization} callback for a client having
+   * the given principal.
+   * 
+   * This method caches the full XML authorization file the first time it is
+   * invoked and caches all the permissions for the provided
+   * {@code principal} to speed up lookup the
+   * {@code authorizeOperation} calls. The permissions for the principal
+   * are maintained as a {@link Map} of region name to the {@link HashSet} of
+   * operations allowed for that region. A global entry with region name as
+   * empty string is also made for permissions provided for all the regions.
+   * 
+   * @param  principal
+   *         the principal associated with the authenticated client
+   * @param  cache
+   *         reference to the cache object
+   * @param  remoteMember
+   *         the {@link DistributedMember} object for the remote authenticated
+   *         client
+   * 
+   * @throws NotAuthorizedException
+   *         if some exception condition happens during the initialization
+   *         while reading the XML; in such a case all subsequent client
+   *         operations will throw {@code NotAuthorizedException}
+   */
+  @Override
+  public void init(final Principal principal, final DistributedMember remoteMember, final Cache cache) throws NotAuthorizedException {
+    synchronized (sync) {
+      XmlAuthorization.init(cache);
+    }
+
+    this.systemLogWriter = cache.getLogger();
+    this.securityLogWriter = cache.getSecurityLogger();
+
+    String name;
+    if (principal != null) {
+      name = principal.getName();
+    } else {
+      name = EMPTY_VALUE;
+    }
+
+    HashSet<String> roles = XmlAuthorization.userRoles.get(name);
+    if (roles != null) {
+      for (String roleName : roles) {
+        Map<String, Map<OperationCode, FunctionSecurityPrmsHolder>> regionOperationMap = XmlAuthorization.rolePermissions.get(roleName);
+        if (regionOperationMap != null) {
+          for (Map.Entry<String, Map<OperationCode, FunctionSecurityPrmsHolder>> regionEntry : regionOperationMap.entrySet()) {
+            String regionName = regionEntry.getKey();
+            Map<OperationCode, FunctionSecurityPrmsHolder> regionOperations = this.allowedOps.get(regionName);
+            if (regionOperations == null) {
+              regionOperations = new HashMap<OperationCode, FunctionSecurityPrmsHolder>();
+              this.allowedOps.put(regionName, regionOperations);
+            }
+            regionOperations.putAll(regionEntry.getValue());
+          }
+        }
+      }
+    }
+  }
+
+  /**
+   * Return true if the given operation is allowed for the cache/region.
+   * 
+   * This looks up the cached permissions of the principal in the map for the
+   * provided region name. If none are found then the global permissions with
+   * empty region name are looked up. The operation is allowed if it is found
+   * this permission list.
+   * 
+   * @param  regionName
+   *         When null then it indicates a cache-level operation, else the
+   *         name of the region for the operation.
+   * @param  context
+   *         the data required by the operation
+   * 
+   * @return true if the operation is authorized and false otherwise
+   */
+  @Override
+  public boolean authorizeOperation(String regionName, final OperationContext context) {
+    Map<OperationCode, FunctionSecurityPrmsHolder> operationMap;
+
+    // Check GET permissions for updates from server to client
+    if (context.isClientUpdate()) {
+      operationMap = this.allowedOps.get(regionName);
+      if (operationMap == null && regionName.length() > 0) {
+        operationMap = this.allowedOps.get(EMPTY_VALUE);
+      }
+      if (operationMap != null) {
+        return operationMap.containsKey(OperationCode.GET);
+      }
+      return false;
+    }
+
+    OperationCode opCode = context.getOperationCode();
+    if (opCode.isQuery() || opCode.isExecuteCQ() || opCode.isCloseCQ() || opCode.isStopCQ()) {
+      // First check if cache-level permission has been provided
+      operationMap = this.allowedOps.get(EMPTY_VALUE);
+      boolean globalPermission = (operationMap != null && operationMap .containsKey(opCode));
+      Set<String> regionNames = ((QueryOperationContext)context) .getRegionNames();
+      if (regionNames == null || regionNames.size() == 0) {
+        return globalPermission;
+      }
+
+      for (String r : regionNames) {
+        regionName = normalizeRegionName(r);
+        operationMap = this.allowedOps.get(regionName);
+        if (operationMap == null) {
+          if (!globalPermission) {
+            return false;
+          }
+        } else if (!operationMap.containsKey(opCode)) {
+          return false;
+        }
+      }
+      return true;
+    }
+
+    final String normalizedRegionName = normalizeRegionName(regionName);
+    operationMap = this.allowedOps.get(normalizedRegionName);
+    if (operationMap == null && normalizedRegionName.length() > 0) {
+      operationMap = this.allowedOps.get(EMPTY_VALUE);
+    }
+    if (operationMap != null) {
+      if (context.getOperationCode() != OperationCode.EXECUTE_FUNCTION) {
+        return operationMap.containsKey(context.getOperationCode());
+
+      } else {
+        if (!operationMap.containsKey(context.getOperationCode())) {
+          return false;
+
+        } else {
+          if (!context.isPostOperation()) {
+            FunctionSecurityPrmsHolder functionParameter = operationMap.get(context.getOperationCode());
+            ExecuteFunctionOperationContext functionContext = (ExecuteFunctionOperationContext) context;
+            // OnRegion execution
+            if (functionContext.getRegionName() != null) {
+              if (functionParameter.isOptimizeForWrite() != null && functionParameter.isOptimizeForWrite().booleanValue() != functionContext.isOptimizeForWrite()) {
+                return false;
+              }
+              if (functionParameter.getFunctionIds() != null && !functionParameter.getFunctionIds().contains( functionContext.getFunctionId())) {
+                return false;
+              }
+              if (functionParameter.getKeySet() != null && functionContext.getKeySet() != null) {
+                if (functionContext.getKeySet().containsAll( functionParameter.getKeySet())) {
+                  return false;
+                }
+              }
+              return true;
+
+            } else {// On Server execution
+              if (functionParameter.getFunctionIds() != null && !functionParameter.getFunctionIds().contains(functionContext.getFunctionId())) {
+                return false;
+              }
+              return true;
+            }
+
+          } else {
+            ExecuteFunctionOperationContext functionContext = (ExecuteFunctionOperationContext)context;
+            FunctionSecurityPrmsHolder functionParameter = operationMap.get(context.getOperationCode());
+            if (functionContext.getRegionName() != null) {
+              if (functionContext.getResult() instanceof ArrayList && functionParameter.getKeySet() != null) {
+                ArrayList<String> resultList = (ArrayList)functionContext.getResult();
+                Set<String> nonAllowedKeys = functionParameter.getKeySet();
+                if (resultList.containsAll(nonAllowedKeys)) {
+                  return false;
+                }
+              }
+              return true;
+
+            } else {
+              ArrayList<String> resultList = (ArrayList)functionContext.getResult();
+              final String inSecureItem = "Insecure item";
+              if (resultList.contains(inSecureItem)) {
+                return false;
+              }
+              return true;
+            }
+          }
+        }
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Clears the cached information for this principal.
+   */
+  @Override
+  public void close() {
+    this.allowedOps.clear();
+  }
+
+  /** Get the attribute value for a given attribute name of a node. */
+  private static String getAttributeValue(final Node node, final String attrName) {
+    NamedNodeMap attrMap = node.getAttributes();
+    Node attrNode;
+    if (attrMap != null && (attrNode = attrMap.getNamedItem(attrName)) != null) {
+      return ((Attr)attrNode).getValue();
+    }
+    return EMPTY_VALUE;
+  }
+
+  /** Get the string contained in the first text child of the node. */
+  private static String getNodeValue(final Node node) {
+    NodeList childNodes = node.getChildNodes();
+    for (int index = 0; index < childNodes.getLength(); index++) {
+      Node childNode = childNodes.item(index);
+      if (childNode.getNodeType() == Node.TEXT_NODE) {
+        return childNode.getNodeValue();
+      }
+    }
+    return EMPTY_VALUE;
+  }
+
+  /**
+   * Cache authorization information for all users statically. This method is
+   * not thread-safe and is should either be invoked only once, or the caller
+   * should take the appropriate locks.
+   *
+   * @param cache reference to the cache object for the distributed system
+   */
+  private static void init(final Cache cache) throws NotAuthorizedException {
+    final LogWriter systemLogWriter = cache.getLogger();
+    final String xmlDocumentUri = (String)cache.getDistributedSystem().getSecurityProperties().get(DOC_URI_PROP_NAME);
+
+    try {
+      if (xmlDocumentUri == null) {
+        throw new NotAuthorizedException("No ACL file defined using tag [" + DOC_URI_PROP_NAME + "] in system properties");
+      }
+      if (xmlDocumentUri.equals(XmlAuthorization.currentDocUri)) {
+        if (XmlAuthorization.xmlLoadFailure != null) {
+          throw XmlAuthorization.xmlLoadFailure;
+        }
+        return;
+      }
+
+      final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+      factory.setIgnoringComments(true);
+      factory.setIgnoringElementContentWhitespace(true);
+      factory.setValidating(true);
+
+      final DocumentBuilder builder = factory.newDocumentBuilder();
+      final XmlErrorHandler errorHandler = new XmlErrorHandler(systemLogWriter, xmlDocumentUri);
+      builder.setErrorHandler(errorHandler);
+      builder.setEntityResolver(new AuthzDtdResolver());
+
+      final Document xmlDocument = builder.parse(xmlDocumentUri);
+
+      XmlAuthorization.userRoles = new HashMap<String, HashSet<String>>();
+      XmlAuthorization.rolePermissions = new HashMap<String, Map<String, Map<OperationCode, FunctionSecurityPrmsHolder>>>();
+
+      final NodeList roleUserNodes = xmlDocument.getElementsByTagName(TAG_ROLE);
+
+      for (int roleIndex = 0; roleIndex < roleUserNodes.getLength(); roleIndex++) {
+        final Node roleUserNode = roleUserNodes.item(roleIndex);
+        final String roleName = getAttributeValue(roleUserNode, ATTR_ROLENAME);
+        final NodeList userNodes = roleUserNode.getChildNodes();
+
+        for (int userIndex = 0; userIndex < userNodes.getLength(); userIndex++) {
+          final Node userNode = userNodes.item(userIndex);
+
+          if (userNode.getNodeName() == TAG_USER) {
+            final String userName = getNodeValue(userNode);
+            HashSet<String> userRoleSet = XmlAuthorization.userRoles.get(userName);
+            if (userRoleSet == null) {
+              userRoleSet = new HashSet<String>();
+              XmlAuthorization.userRoles.put(userName, userRoleSet);
+            }
+            userRoleSet.add(roleName);
+
+          } else {
+            throw new SAXParseException("Unknown tag [" + userNode.getNodeName() + "] as child of tag [" + TAG_ROLE + ']', null);
+          }
+        }
+      }
+
+      final NodeList rolePermissionNodes = xmlDocument.getElementsByTagName(TAG_PERMS);
+
+      for (int permIndex = 0; permIndex < rolePermissionNodes.getLength(); permIndex++) {
+        final Node rolePermissionNode = rolePermissionNodes.item(permIndex);
+        final String roleName = getAttributeValue(rolePermissionNode, ATTR_ROLE);
+        Map<String, Map<OperationCode, FunctionSecurityPrmsHolder>> regionOperationMap = XmlAuthorization.rolePermissions.get(roleName);
+
+        if (regionOperationMap == null) {
+          regionOperationMap = new HashMap<String, Map<OperationCode, FunctionSecurityPrmsHolder>>();
+          XmlAuthorization.rolePermissions.put(roleName, regionOperationMap);
+        }
+
+        final NodeList operationNodes = rolePermissionNode.getChildNodes();
+        final HashMap<OperationCode, FunctionSecurityPrmsHolder> operationMap = new HashMap<OperationCode, FunctionSecurityPrmsHolder>();
+
+        for (int opIndex = 0; opIndex < operationNodes.getLength(); opIndex++) {
+          final Node operationNode = operationNodes.item(opIndex);
+
+          if (operationNode.getNodeName() == TAG_OP) {
+            final String operationName = getNodeValue(operationNode);
+            final OperationCode code = OperationCode.parse(operationName);
+
+            if (code == null) {
+              throw new SAXParseException("Unknown operation [" + operationName + ']', null);
+            }
+
+            if (code != OperationCode.EXECUTE_FUNCTION) {
+              operationMap.put(code, null);
+
+            } else {
+              final String optimizeForWrite = getAttributeValue(operationNode, ATTR_FUNCTION_OPTIMIZE_FOR_WRITE);
+              final String functionAttr = getAttributeValue(operationNode, ATTR_FUNCTION_IDS);
+              final String keysAttr = getAttributeValue(operationNode, ATTR_FUNCTION_KEY_SET);
+
+              Boolean isOptimizeForWrite;
+              HashSet<String> functionIds;
+              HashSet<String> keySet;
+
+              if (optimizeForWrite == null || optimizeForWrite.length() == 0) {
+                isOptimizeForWrite = null;
+              } else {
+                isOptimizeForWrite = Boolean.parseBoolean(optimizeForWrite);
+              }
+
+              if (functionAttr == null || functionAttr.length() == 0) {
+                functionIds = null;
+              } else {
+                final String[] functionArray = functionAttr.split(",");
+                functionIds = new HashSet<String>();
+                for (int strIndex = 0; strIndex < functionArray.length; ++strIndex) {
+                  functionIds.add((functionArray[strIndex]));
+                }
+              }
+
+              if (keysAttr == null || keysAttr.length() == 0) {
+                keySet = null;
+              } else {
+                final String[] keySetArray = keysAttr.split(",");
+                keySet = new HashSet<String>();
+                for (int strIndex = 0; strIndex < keySetArray.length; ++strIndex) {
+                  keySet.add((keySetArray[strIndex]));
+                }
+              }
+
+              final FunctionSecurityPrmsHolder functionContext = new FunctionSecurityPrmsHolder(isOptimizeForWrite, functionIds, keySet);
+              operationMap.put(code, functionContext);
+            }
+
+          } else {
+            throw new SAXParseException("Unknown tag [" + operationNode.getNodeName() + "] as child of tag [" + TAG_PERMS + ']', null);
+          }
+        }
+
+        final String regionNames = getAttributeValue(rolePermissionNode, ATTR_REGIONS);
+        if (regionNames == null || regionNames.length() == 0) {
+          regionOperationMap.put(EMPTY_VALUE, operationMap);
+        } else {
+          final String[] regionNamesSplit = regionNames.split(",");
+          for (int strIndex = 0; strIndex < regionNamesSplit.length; ++strIndex) {
+            regionOperationMap.put(normalizeRegionName(regionNamesSplit[strIndex]), operationMap);
+          }
+        }
+      }
+      XmlAuthorization.currentDocUri = xmlDocumentUri;
+
+    } catch (Exception ex) {
+      String message;
+      if (ex instanceof NotAuthorizedException) {
+        message = ex.getMessage();
+      }
+      else {
+        message = ex.getClass().getName() + ": " + ex.getMessage();
+      }
+      systemLogWriter.warning("XmlAuthorization.init: " + message);
+      XmlAuthorization.xmlLoadFailure = new NotAuthorizedException(message, ex);
+      throw XmlAuthorization.xmlLoadFailure;
+    }
+  }
+
+  private static class AuthzDtdResolver implements EntityResolver {
+    final Pattern authzPattern = Pattern.compile("authz.*\\.dtd");
+
+    @Override
+    public InputSource resolveEntity(final String publicId, final String systemId) throws SAXException, IOException {
+      try {
+        final Matcher matcher = authzPattern.matcher(systemId);
+        if (matcher.find()) {
+          final String dtdName = matcher.group(0);
+          final InputStream stream = XmlAuthorization.class.getResourceAsStream(dtdName);
+          return new InputSource(stream);
+        }
+
+      } catch(Exception e) {
+        //do nothing, use the default resolver
+      }
+      
+      return null;
+    }
+  }
+}



[19/54] [abbrv] incubator-geode git commit: GEODE-1099: NPE thrown from TXManagerImpl.isDistributed()

Posted by je...@apache.org.
GEODE-1099: NPE thrown from TXManagerImpl.isDistributed()

Use the existing reference to InternalDistributedSystem so as to prevent a NPE.
If the member is indeed being disconnected, a CacheClosed exception is thrown
while trying to send the message.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/5503de07
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/5503de07
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/5503de07

Branch: refs/heads/feature/GEODE-17-2
Commit: 5503de078aa0d45961dc143569651276948ff587
Parents: e22cd95
Author: Swapnil Bawaskar <sb...@pivotal.io>
Authored: Mon Mar 14 17:38:57 2016 -0700
Committer: Swapnil Bawaskar <sb...@pivotal.io>
Committed: Tue Mar 15 12:39:56 2016 -0700

----------------------------------------------------------------------
 .../com/gemstone/gemfire/internal/cache/TXManagerImpl.java    | 3 ++-
 .../gemfire/internal/cache/TXManagerImplJUnitTest.java        | 7 +++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5503de07/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java
index de49fea..7c270fe 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java
@@ -1502,7 +1502,8 @@ public final class TXManagerImpl implements CacheTransactionManager,
      Boolean value = isTXDistributed.get();
     // This can be null if not set in setDistributed().
     if (value == null) {
-      return InternalDistributedSystem.getAnyInstance().getOriginalConfig().getDistributedTransactions();
+      InternalDistributedSystem ids = (InternalDistributedSystem) cache.getDistributedSystem();
+      return ids.getOriginalConfig().getDistributedTransactions();
     } else {
       return value.booleanValue();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5503de07/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
index a92d4dc..0467f4f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
@@ -331,4 +331,11 @@ public class TXManagerImplJUnitTest {
     assertNull(region.get("key"));
     System.setProperty("gemfire.suspendedTxTimeout", "");
   }
+
+  @Test
+  public void testIsDistributedDoesNotThrowNPE() {
+    TXManagerImpl txMgr = (TXManagerImpl) cache.getCacheTransactionManager();
+    cache.getDistributedSystem().disconnect();
+    assertFalse(txMgr.isDistributed());
+  }
 }


[40/54] [abbrv] incubator-geode git commit: GEODE-1067: The dispatcher now handles IllegalStateException by retrying batch without the released event

Posted by je...@apache.org.
GEODE-1067: The dispatcher now handles IllegalStateException by retrying batch without the released event


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ff69aeae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ff69aeae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ff69aeae

Branch: refs/heads/feature/GEODE-17-2
Commit: ff69aeae9615d7263075079e8e5f5180bc350dce
Parents: 5b6a2cd
Author: Barry Oglesby <bo...@pivotal.io>
Authored: Wed Mar 16 12:27:39 2016 -0700
Committer: Barry Oglesby <bo...@pivotal.io>
Committed: Thu Mar 17 10:11:47 2016 -0700

----------------------------------------------------------------------
 .../wan/AbstractGatewaySenderEventProcessor.java     | 15 +++++++++++++++
 .../internal/cache/wan/GatewaySenderEventImpl.java   |  7 +++++++
 .../wan/GatewaySenderEventRemoteDispatcher.java      | 15 +++++++++++----
 3 files changed, 33 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff69aeae/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
index 51b125a..5020cf2 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
@@ -520,6 +520,21 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread {
           filteredList = new ArrayList<GatewaySenderEventImpl>();
           
           filteredList.addAll(events);
+
+          // If the exception has been set and its cause is an IllegalStateExcetption,
+          // remove all events whose serialized value is no longer available
+          if (this.exception != null && this.exception.getCause() != null
+              && this.exception.getCause() instanceof IllegalStateException) {
+            for (Iterator<GatewaySenderEventImpl> i = filteredList.iterator(); i.hasNext();) {
+              GatewaySenderEventImpl event = i.next();
+              if (event.isSerializedValueNotAvailable()) {
+                i.remove();
+              }
+            }
+            this.exception = null;
+          }
+
+          // Filter the events
           for (GatewayEventFilter filter : sender.getGatewayEventFilters()) {
             Iterator<GatewaySenderEventImpl> itr = filteredList.iterator();
             while (itr.hasNext()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff69aeae/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
index d8922f8..6f284b5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
@@ -131,6 +131,8 @@ public class GatewaySenderEventImpl implements
   protected transient Object valueObj;
   protected transient boolean valueObjReleased;
 
+  private transient boolean serializedValueNotAvailable;
+
   /**
    * Whether the value is a serialized object or just a byte[]
    */
@@ -662,6 +664,10 @@ public class GatewaySenderEventImpl implements
     }
   }
 
+  public boolean isSerializedValueNotAvailable() {
+    return this.serializedValueNotAvailable;
+  }
+
   /**
    * If the value owned of this event is just bytes return that byte array;
    * otherwise serialize the value object and return the serialized bytes.
@@ -698,6 +704,7 @@ public class GatewaySenderEventImpl implements
             this.value = result;
           } else if (result == null) {
             if (this.valueObjReleased) {
+              this.serializedValueNotAvailable = true;
               throw new IllegalStateException("Value is no longer available. getSerializedValue must be called before processEvents returns.");
             }
           }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff69aeae/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java b/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java
index 22dff3d..ad2be2b 100644
--- a/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java
+++ b/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventRemoteDispatcher.java
@@ -163,7 +163,8 @@ public class GatewaySenderEventRemoteDispatcher implements
       } else if (t instanceof IOException
           || t instanceof ServerConnectivityException
           || t instanceof ConnectionDestroyedException
-          || t instanceof MessageTooLargeException) {
+          || t instanceof MessageTooLargeException
+          || t instanceof IllegalStateException) {
         this.processor.handleException();
         // If the cause is an IOException or a ServerException, sleep and retry.
         // Sleep for a bit and recheck.
@@ -268,6 +269,12 @@ public class GatewaySenderEventRemoteDispatcher implements
           LocalizedStrings.GatewayEventRemoteDispatcher_0_EXCEPTION_DURING_PROCESSING_BATCH_1_ON_CONNECTION_2.toLocalizedString(
               new Object[] {this, Integer.valueOf(currentBatchId), connection}), ex);
     }
+    catch (IllegalStateException e) {
+      this.processor.setException(new GatewaySenderException(e));
+      throw new GatewaySenderException(
+          LocalizedStrings.GatewayEventRemoteDispatcher_0_EXCEPTION_DURING_PROCESSING_BATCH_1_ON_CONNECTION_2.toLocalizedString(
+              new Object[] {this, Integer.valueOf(currentBatchId), connection}), e);
+    }
     catch (Exception e) {
       // An Exception has occurred. Get its cause.
       Throwable t = e.getCause();
@@ -321,7 +328,7 @@ public class GatewaySenderEventRemoteDispatcher implements
     if (cache != null && !cache.isClosed()) {
       if (this.sender.isPrimary() && (this.connection != null)) {
         if (this.ackReaderThread == null || !this.ackReaderThread.isRunning()) {
-          this.ackReaderThread = new AckReaderThread(this.sender);
+          this.ackReaderThread = new AckReaderThread(this.sender, this.processor);
           this.ackReaderThread.start();
           this.ackReaderThread.waitForRunningAckReaderThreadRunningState();
         }
@@ -541,8 +548,8 @@ public class GatewaySenderEventRemoteDispatcher implements
 
     private volatile boolean ackReaderThreadRunning = false;
 
-    public AckReaderThread(GatewaySender sender) {
-      super("AckReaderThread for : " + sender.getId());
+    public AckReaderThread(GatewaySender sender, AbstractGatewaySenderEventProcessor processor) {
+      super("AckReaderThread for : " + processor.getName());
       this.setDaemon(true);
       this.cache = (GemFireCacheImpl)((AbstractGatewaySender)sender).getCache();
     }


[05/54] [abbrv] incubator-geode git commit: GEODE-573: Fix broken image links in javadocs

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/properties.html
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/properties.html b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/properties.html
deleted file mode 100755
index 1cd1b72..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/properties.html
+++ /dev/null
@@ -1,3937 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<html>
-<head>
-<title>GemFire System Properties</title>
-</head>
-<body>
-<h1>Introduction</h1>
-Please edit this file by hand in order to facilitate merges!
-<p>
-Please keep entries in this file in alphabetical order in order to
-facilitate merging!
-<h1>Java Methods Swept</h1>
-These are the methods that I have found that reference the system properties
-table.  If you can think of others I have missed, add them (alphabetically)
-to this list, perform the sweep using Eclipse and add your results.
-<p>
-<ul>
-<li><code>Boolean#getBoolean(String)</code></li>
-<li><code>Integer#getInteger(String)</code></li>
-<li><code>Integer#getInteger(String, Integer)</code></li>
-<li><code>Integer#getInteger(String, int)</code></li>
-<li><code>Long#getLong(String)</code></li>
-<li><code>Long#getLong(String, Long)</code></li>
-<li><code>Long#getLong(String, long)</code></li>
-<li><code>System#getProperties</code></li>
-<li><code>System#getProperty(String)</code></li>
-<li><code>System#getProperty(String, String)</code></li>
-</ul>
-
-<h1>Miscellaneous</h1>
-
-DistributionConfigImpl constructor prepends <code>gemfire.</code> to each
-valid attribute name, then looks for a System property with that value.  If
-such a property name exists, it overrides any read from a property file or
-any properties passed into the caller.
-<p>
-<code>com.gemstone.gemfire.internal.cache.Oplog</code> looks for properties
-of the form:
-<ul>
-
-<li>fullRegionName + <code>_UNIT_BUFF_SIZE</code></li> -- <em>Integer</em>;
-"Asif: The minimum unit size of the Pool created. The ByteBuffer pools
-present at different indexes will be multiple of this size. Default unit
-buffer size is 1024"
-
-<li>fullRegionName + <code>_MAX_POOL_SIZE</code></li> -- <em>Integer</em>;
-"The initial pool size . Default pool size is zero"
-
-<li>fullRegionName + <code>_WAIT_TIME</code></li> -- <em>Integer</em>;
-"Asif: MAX time in milliseconds for which a thread will wait for a buffer to
-get freed up. If not available in that duration a buffer will be created on
-the fly. The timeout has no meaning if the max pool size is -1( no upper
-bound)"
-</ul>
-<p>
-
-<h1>Properties, in Alphabetical Order</h1>
-
-
-<dl>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>AdminDistributedSystemImpl.TIMEOUT_MS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 60000)
-<p>
-See <code>com.gemstone.gemfire.admin.internal.AdminDistributedSystemImpl#TIMEOUT_MS</code>.
-<p>
-TBA
-</dd>
-
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>AvailablePort.fastRandom</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.AvailablePort</code>.
-<p>
-If true, an instance of <code>java.util.Random</code> is used instead of
-<code>java.security.SecureRandom</code> to randomly select a port.
-<p>
-This property is available in case there is a performance issue involved
-with random port selection.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>AvailablePort.timeout</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 2000)
-<p>
-See <code>com.gemstone.gemfire.internal.AvailablePort#isPortAvailable</code>.
-<p>
-When establishing a JGroups locator, this sets the <code>SO_TIMEOUT</code>
-characteristic on the UDP port that we attempt to test.
-<p>
-Units are in milliseconds.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>Bridge.VERBOSE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-See <code>com.gemstone.gemfire.internal.cache.BridgeServerImpl.#VERBOSE</code>.
-<p>
-Enable verbose logging in the BridgeServer
-<p>
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>BridgeServer.HANDSHAKE_POOL_SIZE</strong></dt>
-<dd>
-<em>Public:</em> yes
-<p>
-<em>Integer</em> (default is 4)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl#HANDSHAKE_POOL_SIZE</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>BridgeServer.MAXIMUM_CHUNK_SIZE</strong></dt>
-<dd>
-<em>Public:</em> yes
-<p>
-<em>Integer</em> (default is 100)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection#maximumChunkSize</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>BridgeServer.MAX_INCOMING_DATA</strong></dt>
-<dd>
-<em>Public:</em> yes?
-<p>
-<em>Integer</em> (default is -1)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection#MAX_INCOMING_DATA</code>.
-<p>
-<pre>
-   Maximum number of concurrent incoming client message bytes that a bridge server will allow.
-   Once a server is working on this number additional incoming client messages
-   will wait until one of them completes or fails.
-   The bytes are computed based in the size sent in the incoming msg header.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>BridgeServer.MAX_INCOMING_MSGS</strong></dt>
-<dd>
-<em>Public:</em> yes?
-<p>
-<em>Integer</em> (default is -1)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection#MAX_INCOMING_MSGS</code>.
-<p>
-<pre>
-   Maximum number of concurrent incoming client messages that a bridge server will allow.
-   Once a server is working on this number additional incoming client messages
-   will wait until one of them completes or fails.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>BridgeServer.SELECTOR</strong></dt>
-<dd>
-<em>Public:</em> jpmc-cbb
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl#DEPRECATED_SELECTOR</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>BridgeServer.SELECTOR_POOL_SIZE</strong></dt>
-<dd>
-<em>Public:</em> jpmc-cbb
-<p>
-<em>Integer</em> (default is 16)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl#DEPRECATED_SELECTOR_POOL_SIZE</code>.
-<p>
-<pre>
-   This system property is only used if max-threads == 0.
-   This is for 5.0.2 backwards compatibility.
-   @deprecated since 5.1 use cache-server max-threads instead
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>BridgeServer.SOCKET_BUFFER_SIZE</strong></dt>
-<dd>
-<em>Public:</em> yes
-<p>
-<em>Integer</em> (default is 32768)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier#socketBufferSize</code>.
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientUpdater#CacheClietnUpdater(String, EndpointImpl, List, LogWriter, boolean, DistributedSystem)</code>.
-<p>
-<pre>
-   The size of the server-to-client communication socket buffers. This can be
-   modified using the BridgeServer.SOCKET_BUFFER_SIZE system property.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>BridgeServer.acceptTimeout</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 2900)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl#acceptTimeout</code>.
-<p>
-Units are in milliseconds.
-<p>
-<pre>
-  Test value for accept timeout
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>BridgeServer.backlog</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 1000)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl</code>
-constructor.
-<p>
-This is the TCP accept backlog for the acceptor thread's listening socket.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>BridgeServer.handShakeTimeout</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 59000)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl#handShakeTimeout</code>.
-<p>
-<pre>
-  Test value for handshake timeout
-</pre>
-<p>
-Units are in milliseconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>CacheServerLauncher.PRINT_LAUNCH_COMMAND</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.CacheServerLauncher#PRINT_LAUNCH_COMMAND</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DataSerializer.DEBUG</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.DataSerializer#DEBUG</code>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DataSerializer.DUMP_SERIALIZED</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.DataSerializer#DUMP_SERIALIZED</code>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributedLockService.VERBOSE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.locks.DLockLogWriter#VERBOSE</code>.
-<p>
-Enables logging for this class.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.DEBUG_JAVAGROUPS</strong></dt>
-<dd>
-<em>Public:</em> yes (general debugging)
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager</code>.
-<p>
-See <code>com.gemstone.org.jgroups.stack.Protocol#trace/<code>.
-<p>
-Enables JGroups-package debug logging.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.DISCONNECT_WAIT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is 10 * 1000)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.InternalDistributedSystem#MAX_DISCONNECT_WAIT</code>.
-<p>
-<pre>
-   This is how much time, in milliseconds to allow a disconnect listener
-   to run before we interrupt it.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.INCOMING_QUEUE_LIMIT</strong></dt>
-<dd>
-<em>Public:</em> jpmc-cbb
-<p>
-<em>Integer</em> (default is 80000)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#INCOMING_QUEUE_LIMIT</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.INCOMING_QUEUE_THROTTLE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is INCOMING_QUEUE_LIMIT * .75)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#INCOMING_QUEUE_THROTTLE</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.JAVAGROUPS_CONFIG</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em>
-<p>
-If multicast is enabled, the default is com/gemstone/gemfire/distributed/internal/javagroups-mcast.txt.
-<p>
-If multicast is not enabled, the default is com/gemstone/gemfire/distributed/internal/javagroups-config.txt.
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
-<p>
-<pre>
-   The system property that specifies the name of a file from which to read
-   Jgroups configuration information
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.MAX_FE_THREADS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer:</em> (default is 16)
-<p>
-Maximum function execution threads.
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#MAX_FE_THREADS</code>.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.MAX_PR_THREADS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 1)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#MAX_PR_THREADS</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.MAX_SERIAL_QUEUE_THREAD</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 20)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#MAX_SERIAL_QUEUE_THREAD</code>.
-<p>
-<pre>
-  Max number of serial Queue executors, in case of multi-serial-queue executor
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.MAX_THREADS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 100)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#MAX_THREADS</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.MAX_WAITING_THREADS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is Integer.MAX_VALUE)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#MAX_WAITING_THREADS</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.OptimizedUpdateByteLimit</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 2000)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.SearchLoadAndWriteProcessor#SMALL_BLOB_SIZE</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.PUSHER_QUEUE_SIZE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 4096)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#PUSHER_QUEUE_SIZE</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.PUSHER_THREADS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 50)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#PUSHER_THREADS</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.SERIAL_QUEUE_BYTE_LIMIT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 40 * 1024 * 1024)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#SERIAL_QUEUE_BYTE_LIMIT</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.SERIAL_QUEUE_SIZE_LIMIT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 20000)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#SERIAL_QUEUE_SIZE_LIMIT</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.SERIAL_QUEUE_SIZE_THROTTLE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is SERIAL_QUEUE_SIZE_LIMIT * THROTTLE_PERCENT)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#SERIAL_QUEUE_THROTTLE</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.SERIAL_QUEUE_THROTTLE_PERCENT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 75)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#THROTTLE_PERCENT</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.STARTUP_TIMEOUT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 15000)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#STARTUP_TIMEOUT</code>.
-<p>
-Units are in milliseconds.  This is how long a Startup message waits before
-it declares the peer to be nonresponsive.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.TIMEOUT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is -1)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#TIMEOUT</code>.
-<p>
-<pre>
-  The number of milliseconds to wait for distribution-related
-  things to happen */
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.TOTAL_SERIAL_QUEUE_BYTE_LIMIT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 80 * 1024 * 1024)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#TOTAL_SERIAL_QUEUE_BYTE_LIMIT</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.TOTAL_SERIAL_QUEUE_THROTTLE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is SERIAL_QUEUE_BYTE_LIMIT * THROTTLE_PERCENT)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#TOTAL_SERIAL_QUEUE_THROTTLE</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.VERBOSE</strong></dt>
-<dd>
-<em>Public:</em> yes (general debugging)
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#VERBOSE</code>.
-<p>
-Enables certain additional (fine-level?) logging.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.VERBOSE_VIEWS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#VERBOSE_VIEWS</code>.
-<p>
-Enables additional info-level logging
-(see <code>#addShunnedMember</code> and <code>#addSurpriseMember</code>).
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.enqueueOrderedMessages</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#INLINE_PROCESS</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.requireAllStartupResponses</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#sendStartupMessage</code>.
-<p>
-Fail distributed system join unless a startup response is received from
-<em>all</em> peers.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.singleSerialExecutor</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#MULTI_SERIAL_EXECUTORS</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DistributionManager.syncEvents</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#SYNC_EVENTS</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DynamicRegionFactory.disablePersistence</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.cache.DynamicRegionFactory#DISABLE_PERSIST_BACKUP</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DynamicRegionFactory.disableRegisterInterest</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.cache.DynamicRegionFactory#DISABLE_REGISTER_INTEREST</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>DynamicRegionFactory.msDelay</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is 250)
-<p>
-See <code>com.gemstone.gemfire.cache.DynamicRegionFactory#regionCreateSleepMillis</code>.
-<p>
-<pre>
-   This controls the delay introduced to try and avoid any race conditions
-   between propagation of newly created Dynamic Regions
-   and the Entries put into them.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>Gateway.EVENT_TIMEOUT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 5 * 60 * 1000)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GatewayImpl.EventWrapper#EVENT_TIMEOUT</code>.
-<p>
-Units are in milliseconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>Gateway.MAXIMUM_SHUTDOWN_PEEKS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 20)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GatewayImpl.#MAXIMUM_SHUTDOWN_PEEKS</code>.
-<p>
-<pre>
-  The number of times to peek on shutdown before giving up and shutting down.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>Gateway.QUEUE_SIZE_THRESHOLD</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 5000)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GatewayImpl.#QUEUE_SIZE_THRESHOLD</code>.
-<p>
-<pre>
-  The queue size threshold used to warn the user. If the queue reaches this
-  size, log a warning.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>Gateway.TOKEN_TIMEOUT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 15000)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GatewayImpl.#TOKEN_TIMEOUT</code>.
-<p>
-<pre>
-  Timeout tokens in the unprocessedEvents map after this many milliseconds.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>GetInitialImage.chunkSize</strong></dt>
-<dd>
-<em>Public:</em> ml-rio
-<p>
-<em>Integer</em> (default is 500 * 1024)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.InitialImageOperation#CHUNK_SIZE_IN_BYTES</code>.
-<p>
-<pre>
-   maximum number of bytes to put in a single message
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>GrantorRequestProcessor.ELDER_CHANGE_SLEEP</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is 100)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.locks.GrantorRequestProcessor#ELDER_CHANGE_SLEEP</code>.
-<p>
-<pre>
-   The number of milliseconds to sleep for elder change if current elder
-   is departing (and already sent shutdown msg) but is still in the View.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>JGroups.SHUN_SUNSET</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 90)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#isShunned</code>.
-<p>
-This is the length of time during which incoming messages from a departed peer
-are regarded as out-of-order messages and are hence ignored (shunned).
-<p>
-Units are in seconds.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>Locator.forceAdminDMType</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.InternalLocator#FORCE_ADMIN_DM_TYPE</code>.
-<p>
-No longer exists as of 7.0.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>Locator.forceLocatorDMType</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-Used internally by the locator. It sets it to true to tell other code
-that the member type should be LOCATOR.
-As of 7.0.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>Locator.inhibitDMBanner</strong></dt>
-<dd>
-<em>Public:</em> ml-rio
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.InternalLocator#INHIBIT_DM_BANNER</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>MAX_WAIT_FOR_SPACE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 20)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.ComplexDiskRegion#MAX_WAIT_FOR_SPACE</code>.
-<p>
-Units are in seconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>StatArchiveReader.dump</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.StatArchiveReader(File[], ValueFilter[], boolean)</code>.
-<p>
-See <code>com.gemstone.gemfire.internal.StatArchiveReader#dump(PrintWriter)</code>.
-<p>
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>StatArchiveReader.dumpall</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.StatArchiveReader(File[], ValueFilter[], boolean)</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>StateFlushOperation.DEBUG</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-<em>Boolean</em>
-<p>
-See <code>com.gemstone.gemfire.internal.cache.StateFlushOperation#DEBUG</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>ack-threshold-exception</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.ReplyProcessor21#THROW_EXCEPTION_ON_TIMEOUT</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>bind.address</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em> (See <code>InetAddress.getByName</code>)
-<p>
-See <code>com.gemstone.org.jgroups.protocols.FD_SOCK#setProperties(Properties)</code>.
-<p>
-See <code>com.gemstone.org.jgroups.protocols.MPING#setProperties(Properties)</code>.
-<p>
-See <code>com.gemstone.org.jgroups.protocols.TP#setProperties(Properties)</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>java.util.concurrent.NanoTimerProvider</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em>
-<p>
-Default is <code>java.util.concurrent.NanoTimerProvider</code>.
-<p>
-See java.util.concurrent.Utils#providerProp</code>.
-<p>
-This is the name of a class that implements the
-<code>java.util.concurrent.helpers.NanoTimer</code>
-interface.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>com.gemstone.gemfire.internal.OSProcess.trace</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em>
-<p>
-See <code>com.gemstone.gemfire.internal.OSProcess#bgexec(String[], File, File, boolean)</code>.
-<p>
-If this property exists and has non-zero length, additional information about
-the executed command is printed to <code>System.out</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>com.gemstone.gemfire.internal.cache.PartitionedRegion-logging</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.PartitionedRegion#initPrInternals</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore-logging (constructor)</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore.PartitionedRegionDataStore(PartitionedRegion)</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>disable-intelligent-msg</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionAdvisor#disabled</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>enable_canonicalization</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.org.jgroups.Message#DISABLE_CANONICALIZATION</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>force.properties</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em>
-<p>
-See <code>com.gemstone.org.jgroups.conf.ConfiguratorFactory class init</code>.
-<p>
-A JGroups configuration string?
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>GemFire.ALWAYS_REPLICATE_UPDATES</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-If true then non-replicate regions will turn a remote update they receive
-on an entry they do not have into a local create.
-By default these updates would have been ignored.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.ALLOW_PERSISTENT_TRANSACTIONS</strong></dt>
-<dd>
-<em>Public:</em> true
-<p>
-<em>Boolean</em> (default is false)
-<p>
-If true then transactions on persistent regions are allowed.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.artificialGatewayDelay</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> -1
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GatewayEventRemoteDispatcher#ARTIFICIAL_DELAY</code>
-<p>
-Introduce artificial delay (in ms) before batch sending to simulate a real WAN link
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.ASCII_STRINGS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.tcp.MsgStreamer#ASCII_STRINGS</code>.
-<p>
-See <code>com.gemstone.gemfire.internal.HeapDataOutputStream#ASCII_STRINGS</code>.
-<p>
-Causes GemFire's implementation of writeUTF to only work for Strings that use the ASCII
-character set. So Strings that use the international characters will be serialized incorrectly.
-If you know your Strings only use ASCII setting this to true can improve your performance if
-you are using writeUTF frequently. Most Strings are serialized using DataSerializer.writeString
-which does not use writeUTF.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.AutoSerializer.SAFE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-If set to true forces the ReflectionBasedAutoSerializer to not use the
-sun.misc.Unsafe code. Using Unsafe optimizes performance but reduces
-portablity.
-By default ReflectionBasedAutoSerializer will attempt to use Unsafe but
-silently not use it if it is not available.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.AutoSerializer.UNSAFE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-If set to true then the ReflectionBasedAutoSerializer will throw
-an exception if it is not able to use the sun.misc.Unsafe code.
-Using Unsafe optimizes performance but reduces portablity.
-By default ReflectionBasedAutoSerializer will attempt to use Unsafe but
-silently not use it if it is not available.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.BUCKET_RECOVERY_DELAY</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is 2)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.PRHAFailureAndRecoveryPRovider#BUCKET_RECOVERY_DELAY</code>.
-<p>
-Mean amount of time, in seconds, to delay before starting to
-recover a bucket.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.BUCKET_RECOVERY_JITTER</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is 200)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.PRHAFailureAndRecoveryPRovider#BUCKET_RECOVERY_JITTER</code>.
-<p>
-<pre>
-   Maximum additional amount of time, in milliseconds, to skew bucket creation, 
-   to stagger recovery and creation in a starting system. 
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.BucketAdvisor.getPrimaryTimeout</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is 1000 * 60)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.BucketAdvisor#GET_PRIMARY_TIMEOUT</code>.
-<p>
-<pre>
-   Specifies the timeout to wait for a primary when calling {@link 
-   #getPrimary()} 
-</pre>
-<p>
-Units are in milliseconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.Cache.ASYNC_EVENT_LISTENERS</strong></dt>
-<dd>
-<em>Public:</em> yes
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GemFireCache#ASYNC_EVENT_LISTENERS</code>.
-<p>
-If true then cache event listeners will be invoked by a background thread.
-By default they are invoked by the same thread that is doing the cache operation.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.Cache.EVENT_QUEUE_LIMIT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 4096)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GemFireCache#EVENT_QUEUE_LIMIT</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.Cache.defaultLockLease</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 120)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GemFireCache#DEFAULT_LOCK_LEASE</code>.
-<p>
-<pre>
-  The default duration (in seconds) of a lease on a distributed lock
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.Cache.defaultLockTimeout</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 60)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GemFireCache#DEFAULT_LOCK_TIMEOUT</code>.
-<p>
-<pre>
-  The default number of seconds to wait for a distributed lock
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.Cache.defaultSearchTimeout</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 300)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GemFireCache#DEFAULT_SEARCH_TIMEOUT</code>.
-<p>
-<pre>
-  The default amount of time to wait for a <code>netSearch</code> to
-  complete
-</pre>
-<p>
-Units are in seconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.Cache.startSerialNumber</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is Integer.MAX_VALUE - 10)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GemFireCache#START_SERIAL_NUMBER</code>.
-<p>
-<pre>
-  Specifies the starting serial number for the {@link #serialNumberSequencer
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.CacheServerLauncher.assignBucketsToPartitions</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.CacheServerLauncher.ASSIGN_BUCKETS</code>.
-<p>
-If a cache server is started using that CacheServerLauncher and this property is set to true, the cache
-server will create all of the buckets when it is started.
-<p>
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.CacheDistributionAdvisor.rolloverThreshold</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 1000)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.CacheDistributionAdvisor#ROLLOVER_THRESHOLD</code>.
-<p>
-<pre>
-  Used to compare profile versioning numbers against 
-  {@link Integer#MAX_VALUE} and {@link Integer#MIN_VALUE} to determine
-  if a rollover has occurred.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.Capacity</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 230000)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.ha.HARegionQueueAttributes#BLOCKING_QUEUE_CAPACITY</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DEBUG_EXPIRATION</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.ExpirationScheduler#DEBUG</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DEFAULT_MAX_OPLOG_SIZE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is 1024 * 1024 * 1024)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.DiskWriteAttributesImpl#DEFAULT_MAX_OPLOG_SIZE</code>.
-<p>
-<pre>
-  default max in bytes
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DLockService.automateFreeResources</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See com.gemstone.gemfire.distributed.internal.locks.DLockService.DLockService(String, DistributedSystem, boolean, boolean, boolean).
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DLockService.LockGrantorId.rolloverMargin</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 10000)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.locks.LockGrantorId#ROLLOVER_MARGIN</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DLockService.debug.disallowLockRequestLoop</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#DEBUG_LOCK_REQUEST_LOOP</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DLockService.debug.disallowLockRequestLoopCount</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 20)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#DEBUG_LOCK_REQUEST_LOOP_COUNT</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DLockService.debug.disallowNotHolder</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#DEBUG_DISALLOW_NOT_HOLDER</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DLockService.debug.enforceSafeExit</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#DEBUG_ENFORCE_SAFE_EXIT</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DLockService.debug.nonGrantorDestroyLoop</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#DEBUG_NONGRANTOR_DESTROY_LOOP</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DLockService.debug.nonGrantorDestroyLoopCount</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 20)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#DEBUG_NONGRANTOR_DESTROY_LOOP_COUNT</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DLockService.notGrantorSleep</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is 2000)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#NOT_GRANTOR_SLEEP</code>.
-<p>
-Units are in milliseconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DistributedLockService.startSerialNumber</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is Integer.MAX_VALUE - 10)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#START_SERIAL_NUMBER</code>.
-<p>
-<pre>
-  Specifies the starting serial number for the {@link #serialNumberSequencer}
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DO_EXPENSIVE_VALIDATIONS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.LocalRegion#DO_EXPENSIVE_VALIDATIONS</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DistributionAdvisor.startVersionNumber</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is Integer.MAX_VALUE - 10)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionAdvisor#START_VERSION_NUMBER</code>.
-<p>
-<pre>
-   Specifies the starting version number for the {@link 
-   #profileVersionSequencer}.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.EXPIRY_THREADS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 0)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.ExpiryTask class init</code>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.EXPIRY_UNITS_MS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.LocalRegion#EXPIRY_UNITS_MS</code>.
-<p>
-<pre>
-   Used by unit tests to set expiry to milliseconds instead of the default
-   seconds. Used in ExpiryTask.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.FD_TIMEOUT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is 0)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
-<p>
-If <code>gemfire.useFD</code> is true or this property's value is non-zero,
-the <code>FD</code> protocol is inserted on the JGroups stack.
-<p>
-Furthermore, the <code>MEMBER_TIMEOUT</code> string is substituted with this
-value in the JGroups default config, which in turn sets the
-<code>timeout</code> property in the <code>VERIFY_SUSPECT</code> protocol,
-which otherwise defaults to 2000 milliseconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.IDLE_THREAD_TIMEOUT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 15000)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.PooledExecutorWithDMStats#PooledExecutorWithDMStats(BlockingQueue, int, PoolStatHelper, ThreadFactory)</code>.
-<p>
-Units are in milliseconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.isDedicatedServer</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.CacheServerLauncher.#isDedicatedCacheServer</code>
-<p>
-Tell admin API whether the member is a dedicated cache server
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.memoryEventTolerance</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default for Sun/Oracle is 1 and for others 5)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.control.InternalResourceManager.#MEMORY_EVENT_TOLERANCE</code>
-<p>
-Number of memory events that ResourceManager will tolerate before throwing a LME. Useful with JVM 1.7
-</dd>
-
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.MAX_PENDING_CANCELS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 10000)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.ExpirationScheduler#MAX_PENDING_CANCELS</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.MIN_BUCKET_SIZE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 1)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.partitioned.SizedBasedLoadProbe.#MIN_BUCKET_SIZE</code>
-<p>
-Allows setting the minimum bucket size to be used during rebalance
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.DISABLE_MOVE_PRIMARIES_ON_STARTUP</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-If true then pr primary buckets will not be balanced when a new member is started.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.MessageTimeToLive</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 180)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.ha.HARegionQueue#REGION_ENTRY_EXPIRY_TIME</code>.
-<p>
-<pre>
-   Constant used to set region entry expiry time using system property.
-</pre>
-<p>
-Units are in seconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.ON_DISCONNECT_CLEAR_PDXTYPEIDS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.cache.client.internal.PoolImpl</code>
-<p>
-Clear pdxType ids when client disconnects from servers
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.PRDebug</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.admin.GemFireMonitorService#processGetValCommand</code>.
-<p>
-See <code>com.gemstone.gemfire.admin.remote.RemoteCacheInfo.RemoteCacheInfo(GemFireCache)</code>.
-<p>
-See <code>com.gemstone.gemfire.admin.remote.RootRegionResponse#create(DistributionManager, InternalDistributedMember)</code>.
-<p>
-See <code>com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore#createBucketRegion(int)</code>.
-<p>
-See <code>com.gemstone.gemfire.internal.cache.PartitionedRegionHelper#getPRConfigRegion(Region, Cache)</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.PREFER_DESERIALIZED</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.CachedDeserializableFactory#PREFER_DESERIALIZED</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.PREFER_SERIALIZED</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<P>
-See <code>com.gemstone.gemfire.internal.cache.CachedDeserializableFactory.#PREFER_DESERIALIZED</code>
-<p>
-Enable storing the values in serialized form
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.PRSanityCheckDisabled</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.partitioned.PRSanityCheckMessage#schedule</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.PRSanityCheckInterval</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 5000)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.partitioned.PRSanityCheckMessage#schedule</code>.
-<p>
-Units are in milliseconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.PartitionedRegionRandomSeed</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (defaults to NanoTimer.getTime())
-<p>
-See <code>com.gemstone.gemfire.internal.cache.PartitionedRegion#rand</code>.
-<p>
-Seed for the random number generator in this class.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.Query.COMPILED_QUERY_CLEAR_TIME</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (defaults to 10 * 60 * 1000)
-<p>
-See <code>com.gemstone.gemfire.cache.query.internal.DefaultQuery.#COMPILED_QUERY_CLEAR_TIME</code>
-<p>
-Frequency of clean up compiled queries
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.Query.VERBOSE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<p>
-See <code>com.gemstone.gemfire.cache.query.internal.DefaultQuery.#QUERY_VERBOSE</code><em>Boolean</em> (defaults to false)
-<p>
-Enable verbose logging in the query execution
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.QueryService.QueryHeterogeneousObjects</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (defaults to true)
-<p>
-See <code>com.gemstone.gemfire.cache.query.internal.DefaultQueryService.#QUERY_HETEROGENEOUS_OBJECTS</code>
-<p>
-Allow query on region with heterogeneous objects
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.randomizeOnMember</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (defaults to false)
-<p>
-See <code>com.gemstone.gemfire.cache.execute.internal.FunctionServiceManager.#RANDOM_onMember</code>
-<p>
-When set, onMember execution will be executed on a random member.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.RegionAdvisor.volunteeringThreadCount</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 1)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.partitioned.RegionAdvisor#VOLUNTERING_THREAD_COUNT</code>.
-<p>
-<pre>
-  Number of threads allowed to concurrently volunteer for bucket primary.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.VIEW_BUNDLING_WAIT_TIME</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 150)
-<p>
-See <code>com.gemstone.org.jgroups.protocols.pbcast.GMS#BUNDLE_WAITTIME</code>.
-<p>
-<pre>
-     GemStoneAddition - amount of time to wait for additional join/leave
-     requests before processing.  Set gemfire.VIEW_BUNDLING_WAIT_TIME to
-     the number of milliseconds.  Defaults to 150ms.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.VM_OWNERSHIP_WAIT_TIME</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is Long.MAX_VALUE)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.PartitionedRegion#VM_OWNERSHIP_WAIT_TIME</code>
-<p>
-<pre>
-  Time to wait for for acquiring distributed lock ownership
-</pre>
-<p>
-Time is specified in milliseconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.asynchronous-gateway-distribution-enabled</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GatewayHubImpl#USE_ASYNCHRONOUS_DISTRIBUTION</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.bridge.disableShufflingOfEndpoints</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.ConnectionProxyImpl#disableShufflingOfEndpoints</code>.
-<p>
-<pre>
-   A debug flag, which can be toggled by tests to disable/enable shuffling of
-   the endpoints list
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.bridge.suppressIOExceptionLogging</strong></dt>
-<dd>
-<em>Public:</em> jpmc-jets
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>ConnectionProxyImpl</code>,
-<code>ServerConnection</code>, and
-<code>ServerMonitor</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.BridgeServer.FORCE_LOAD_UPDATE_FREQUENCY</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> 10
-<p>
-See <code>com.gemstone.gemfire.internal.cache.BridgeServerImpl.#FORCE_LOAD_UPDATE_FREQUENCY</code>
-<p>
-How often to force a BridgeServer load message to be sent
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.BucketRegion.alwaysFireLocalListeners</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> default is false
-<p>
-See <code>com.gemstone.gemfire.internal.cache.BucketRegion.#FORCE_LOCAL_LISTENERS_INVOCATION</code>
-<p>
-Enable invocation of listeners in both primary and secondary buckets
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.Cache.MAX_QUERY_EXECUTION_TIME</strong></dt>
-<dd>
-<em>Public:</em> true
-<p>
-<em>Integer</em> default is -1
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GemFireCacheImpl.#MAX_QUERY_EXECUTION_TIME</code>
-<p>
-Limit the max query execution time (ms)
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.CLIENT_FUNCTION_TIMEOUT</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> default is 0
-<p>
-See <code>com.gemstone.gemfire.cache.client.internal.ConnectioImpl.#CLIENT_FUNCTION_TIMEOUT</code>
-<p>
-Timeout to set for client function execution
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.clientMonitorLogFile</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em> (default is unset, to use System.out)
-<p>
-See <code>com.gemstone.gemfire.admin.GemFireClientAdminTool#logFileName</code>.
-<p>
-This is a file name.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.clientSocketFactory</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em>
-<p>
-See <code>com.gemstone.gemfire.internal.SocketCreator</code>
-<p>
-Non-standard Socket creator
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.cq.EXECUTE_QUERY_DURING_INIT</strong></dt>
-<dd>
-<em>Public:</em> true
-<p>
-<em>Boolean</em> true
-<p>
-See <code>com.gemstone.gemfire.cache.query.internal.CqService.#EXECUTE_QUERY_DURING_INIT</code>
-<p>
-When set to false, avoid query execution during CQ when initial results are not required
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.debug</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.SharedLibrary#getName</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.debug-frag2</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.org.jgroups.protocols.FRAG2#DEBUG_FRAG2</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.disableAccessTimeUpdateOnPut</strong></dt>
-<dd>
-<em>Public:</em> true
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.AbstractRegionEntry.#DISABLE_ACCESS_TIME_UPDATE_ON_PUT</code>
-<p>
-Disable access time updates on put event
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.disable-event-old-value</strong></dt>
-<dd>
-<em>Public:</em> jpmc-cbb
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.EntryEventImpl#EVENT_OLD_VALUE</code>.
-<p>
-Discussing EVENT_OLD_VALUE = !Boolean.getBoolean():
-<pre>
-   If true (the default) then preserve old values in events.
-   If false then mark non-null values as being NOT_AVAILABLE.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.disablePartitionedRegionBucketAck</strong></dt>
-<dd>
-<em>Public:</em> true
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.PartitionedRegion.#DISABLE_SECONDARY_BUCKET_ACK</code>
-<p>
-Enable no-ack replication in bucket regions
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.disable-udp-direct-ack</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.DistributedCacheOperation#UDP_DISABLE_DIRECT_ACK</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.disableNotificationWarnings</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy#LOG_DROPPED_MSGS</code>.
-<p>
-Discussing LOG_DROPPED_MSGS = !Boolean.getBoolean():
-<pre>
-   Defaults to true; meaning do some logging of dropped client notification
-   messages. Set the system property to true to cause dropped messages to NOT
-   be logged.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.disableShutdownHook</strong></dt>
-<dd>
-<em>Public:</em> true
-<p>
-<em>Boolean</em> (default is false)
-<p>
-If true then the shutdown hooks of the DistributedSystem, Locator, and Agent
-are not run on shutdown. This was added for bug 38407.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.disallowMcastDefaults</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-Used by unit tests to make sure the GemFire mcast-port has been configured
-to a non-default value.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.disk.recoverValues</strong></dt>
-<dd>
-<em>Public:</em> jpmc-cbb
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.SimpleDiskRegion</code>.
-<p>
-<pre>
-  Whether to get the values from disk to memory on recovery
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.EXPIRATIONS_CAUSE_CONFLICTS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.LocalRegion.#EXPIRATIONS_CAUSE_CONFLICTS</code>
-<p>
-Allow expirations to be done by multiple threads, avoiding the 
-pendingExpires list (set in conjunction with gemfire.EXPIRY_THREADS)
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.enableCpuTime</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-This property causes the per thread stats to also measure cpu time.
-This property is ignored unless "gemfire.enableThreadStats" is also set to true.
-See java.lang.management.ThreadMXBean.setThreadCpuTimeEnabled(boolean)
-for more information.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.enableContentionTime</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-This property causes the per thread stats to also measure contention.
-This property is ignored unless "gemfire.enableThreadStats" is also set to true.
-See java.lang.management.ThreadMXBean.setThreadContentionMonitoringEnabled(boolean)
-for more information.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.enableThreadStats</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-This property causes the per thread stats to be collected.
-See java.lang.management.ThreadMXBean
-for more information.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.fast-member-timeout</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 1000)
-<p>
-See <code>com.gemstone.org.jgroups.protocols.VERIFY_SUSPECT#suspect</code>.
-<p>
-<pre>
-  artificially age the entry for faster processing
-</pre>
-<p>
-Units are in milliseconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.gateway-conserve-sockets-allowed</strong></dt>
-<dd>
-<em>Public:</em> yes
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.GatewayHubImpl#ALLOW_CONSERVE_SOCKETS</code>.
-<p>
-<pre>
-   A boolean that defines whether the value of the conserve-sockets property
-   in the gemfire.properties file is preserved. By default, the value in
-   gemfire.properties is overridden so that queue ordering is preserved. If
-   ALLOW_CONSERVE_SOCKETS=true, then the conserve-sockets property is
-   used and queue ordering may not be preserved. This property can be set
-   using the System property called 'gemfire.gateway-conserve-sockets-allowed'.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.gateway-queue-no-ack</strong></dt>
-<dd>
-<em>Public:</em> yes
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.SingleWriteSingleReadRegionQueue#NO_ACK</code>.
-<p>
-<pre>
-   Whether the <code>Gateway</code> queue should be no-ack instead of ack.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.GatewayReceiver.ApplyRestries</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-If true causes the GatewayReceiver will apply batches it has already received.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.gateway.ApplyRetries</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection#APPLY_RETRIES</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.GetInitialImage.CHUNK_PERMITS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 16)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.InitialImageOperation.#CHUNK_PERMITS</code>
-<p>
-Allowed number of in-flight initial image chunks. This property controls how many requests for GII chunks can be handled simultaneously.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.GetInitialImage.MAX_PARALLEL_GIIS</strong></dt>
-<dd>
-<em>Public:</em> true
-<p>
-<em>Integer</em> (default is 5)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.InitialImageOperation.#MAX_PARALLEL_GIIS </code>
-<p>
-Allowed number of GIIs in parallel. This property controls how many regions can do GII simultaneously. Each replicated region and partitioned region bucket counts against this number.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.haltOnAssertFailure</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.Assert#debug</code>.
-<p>
-Causes VM to hang on assertion failure (to allow a debugger to be attached)
-instead of exiting the process.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.jg-can_bind_to_mcast_addr</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-On OSes that support it bind to the mcast_addr to prevent traffic on 
-different addresses, but on the same port.
-Setting to true can avoid cross address chatter.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.launcher.registerSignalHandlers</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-Causes the code used by gfsh to launch a server or locator to install
-signal handlers using sun.misc.Signal.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.lightLocators</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.gui.RemoteCommandManager#getLocatorStart</code>.
-<p>
-Adds the "-lightweight" argument when creating the locator.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.loadLibrary.debug</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.PureJavaMode#debug</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.locatorXms</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em>
-<p>
-See <code>com.gemstone.gemfire.internal.gui.RemoteCommandManager#getLocatorStart</code>.
-<p>
-See <code>com.gemstone.gemfire.internal.gui.StartStopManager#startLocalLocator</code>.
-<p>
-A JVM property, esp. "-Xms150m".
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.locatorXmx</strong></dt>
-<em>String</em>
-<p>
-<dd>
-<em>Public:</em> false
-<p>
-See <code>com.gemstone.gemfire.internal.gui.RemoteCommandManager#getLocatorStart</code>.
-<p>
-See <code>com.gemstone.gemfire.internal.gui.StartStopManager#startLocalLocator</code>.
-<p>
-A JVM property, esp. "-Xmx400m"
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.locators</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em>
-<p>
-See the constructor for <code>com.gemstone.gemfire.distributed.internal.InternalLocator</code>.
-<p>
-If this property is not found in gemfire.properties, the system property
-of the same name is used.
-</dd>
-
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.lru.maxSearchEntries</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is -1)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.lru.NewLRUClockHand#maxEntries</code>.
-<p>
-This is the maximum number of "good enough" entries to pass over for eviction
-before settling on the next acceptable entry.  This prevents excessive cache
-processing to find a candidate for eviction.
-<p>
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.order-pr-gets</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.partitioned.GetMessage#ORDER_PR_GETS</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.partitionedRegionRetryTimeout</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 60 * 60 * 1000)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.PartitionedRegion#retryTimeout</code>
-<p>
-<pre>
-  The maximum milliseconds for retrying operations
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.PRQueryProcessor.numThreads</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> 1+ (default is 2)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.PRQueryProcessor#executeQuery</code>
-<p>
-<pre>
-  The number of concurrent threads to use within a single VM to execute queries
-  on a Partitioned Region. If set to 1 (or less) then queries are run
-  sequentially with a single thread.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.pureJavaMode</strong></dt>
-<dd>
-<em>Public:</em> true
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.PureJavaMode class init</code>.
-<p>
-Force use of "pure" Java mode (native libraries will not be loaded)
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.SPECIAL_DURABLE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.cache.client.internal.PoolImpl.#SPECIAL_DURABLE</code>
-<p>
-Makes multiple durable subscriptions from same client unique. on java client ensures only a single server proxy is created but will limit the client to a single active client pool at a time
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.statsDisabled</strong></dt>
-<dd>
-<em>Public:</em> true
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.InternalDistributedSystem#statsDisabled</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.statusPollingDelay</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is 5000)
-<p>
-See <code>com.gemstone.gemfire.admin.GemFireClientAdminTool#_statusPollingDelay</code>.
-<p>
-Units are in milliseconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.syncWrites</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em>
-<p>
-See <code>com.gemstone.gemfire.internal.cache.Oplog#SYNC_WRITES</code>.
-<p>
-<pre>
-   This system property instructs that writes be synchronously written to disk
-   and not to file system. (Use rwd instead of rw - RandomAccessFile property)
-</pre>
-<p>
-TBA
-</dd>
-	
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.TcpServer.MAX_POOL_SIZE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em>
-<p>
-<pre>
-   This property limits the number of threads that the locator will
-	use for processing gossip messages and server location
-	requests.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.useFD</strong></dt>
-<dd>
-<em>Public:</em> true
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.validateMessageSize</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionConfig#VALIDATE</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfire.validateMessageSizeCeiling</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 8 * 1024 * 1024)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.DistributionConfig#VALIDATE_CEILING</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemfirePropertyFile</strong></dt>
-<dd>
-<em>Public:</em> yes
-<p>
-<em>String</em>
-<p>
-See <code>com.gemstone.gemfire.distributed.DistributedSystem#PROPERTY_FILE</code>.
-<p>
-<pre>
-     The <code>PROPERTY_FILE</code> is the name of the
-     property file that the connect method will check for when
-     it looks for a property file.
-     The file will be searched for, in order, in the following directories:
-     <ol>
-     <li> the current directory
-     <li> the home directory
-     <li> the class path
-     </ol>
-     Only the first file found will be used.
-     <p>
-     The default value of PROPERTY_FILE is
-     <code>"gemfire.properties"</code>.  However if the
-     "gemfirePropertyFile" system property is set then its value is
-     the value of PROPERTY_FILE. If this value is a relative file
-     system path then the above search is done.  If it is an absolute
-     file system path then that file must exist; no search for it is
-     done.
-     @since 5.0
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gemstone.MAX_BUCKET_GRAB_ATTEMPTS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 20)
-<p>
-See <code>com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore.BucketRecoverer#grabBuckets</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gfAgentDebug</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em>
-<p>
-See <code>com.gemstone.gemfire.admin.jmx.internal.AgentImpl#checkDebug</code>.
-<p>
-<pre>
-  Enables mx4j tracing if Agent debugging is enabled.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gfAgentPropertyFile</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em>
-<p>
-See <code>com.gemstone.gemfire.admin.jmx.internal.AgentConfigImpl#retrievePropertyFile</code>.
-<p>
-<pre>
-   The <code>propertyFile</code> is the name of the property file that will 
-   be loaded on startup of the Agent.
-   <p>
-   The file will be searched for, in order, in the following directories:
-   <ol>
-   <li> the current directory
-   <li> the home directory
-   <li> the class path
-   </ol>
-   Only the first file found will be used.
-   <p>
-   The default value of propertyFile is <code>"agent.properties"</code>. However 
-   if the "gfAgentPropertyFile" system property is set then its value is the 
-   value of propertyFile. If this value is a relative file system path then 
-   the above search is done. If its an absolute file system path then that 
-   file must exist; no search for it is done.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gfc.propertyfile.init</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em>
-<p>
-See <code>com.gemstone.gemfire.internal.gui.Service#initProps()</code>.
-<p>
-This is name of a <code>Properties</code> file read at startup.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>gfc.propertyfile.onclose</strong></dt>
-<em>String</em>
-<p>
-See <code>com.gemstone.gemfire.internal.gui.Service#saveProps</code>.
-<dd>
-<em>Public:</em> false
-<p>
-This is the name of a <code>Properties</code> file to which some properties
-are saved a close.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>ignore.bind.address</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.org.jgroups.protocols.MPING#setProperties(Properties)</code>.
-<p>
-See <code>com.gemstone.org.jgroups.util.Util#isBindAddressPropertyIgnored</code>.
-<p>
-If <code>true</code>, the value of the
-<code>bind.address</code> property is ignored.
-<p>
-This is used in MPING, FD_SOCK, and TP.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>install</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.gui.NavigationPane#NavigationPane()</code>.
-<p>
-See <code>com.gemstone.gemfire.internal.gui.Service#Service()</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>java.net.preferIPv6Addresses</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.org.jgroups.util.Util#getFirstNonLoopbackAddress</code>.
-<p>
-TBA
-<p>
-Is this a standard Java property?
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>jboss.partition.udpGroup</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em> (See <code>InetAddress.getByName</code>)
-<p>
-See <code>com.gemstone.org.jgroups.protocols.UDP#setProperties</code>.
-<p>
-<pre>
-  The multicast address used for sending and receiving packets 
-</pre>
-If you manage to get here without setting mcast_addr_name, the default
-is 228.8.8.8.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>jboss.partition.udpPort</strong></dt>
-<em>Integer</em>
-<p>
-See <code>com.gemstone.org.jgroups.protocols.UDP#setProperties</code>.
-<dd>
-<em>Public:</em> false
-<p>
-<p>
-<pre>
-  The multicast port used for sending and receiving packets
-</pre>
-<p>
-If you manage to get here without setting mcast_port, the default value is 7600.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>jta.VERBOSE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em>
-<p>
-See <code>com.gemstone.gemfire.internal.jta.GlobalTransaction#VERBOSE</code>.
-<p>
-See <code>com.gemstone.gemfire.internal.jta.TransactionManagerImpl#VERBOSE</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>jta.defaultTimeout</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 600)
-<p>
-See <code>com.gemstone.gemfire.internal.jta.TransactionManagerImpl#DEFAULT_TRANSACTION_TIMEOUT</code>.
-<p>
-Units are in seconds.
-<p>
-TBA Is this a standard JTA property?
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>local_addr.timeout</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is 30000)
-<p>
-See <code>com.gemstone.org.jgroups.JChannel#LOCAL_ADDR_TIMEOUT</code>.
-<p>
-Units are in milliseconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>mergelogs.TRIM_TIMESTAMPS</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.LogFileParser#TRIM_TIMESTAMPS</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>org.apache.commons.logging.log</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em> (default is org.apache.commons.logging.impl.SimpleLog)
-<p>
-See <code>com.gemstone.gemfire.admin.jmx.internal.AgentImpl class init</code>.
-<p>
-This is the name of a class.
-<p>
-This property is also used by commons-logging.jar (and
-discussed below).  It is called out here
-because of its explicit use in the JMX Agent.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>osStatsDisabled</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.GemFireStatSampler#osStatsDisabled</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.DEBUG</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.tcp.TCPConduit#DEBUG</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.DEBUG_FAIL_FIRST</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.org.jgroups.protocols.pbcast.ClientGmsImpl#join(Address)</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.VERBOSE</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.tcp.TCPConduit#QUIET</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.ackSenderThread</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.org.jgroups.protocols.UNICAST#start</code>.
-<p>
-Creates an <code>AckSender</code> thread.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.backlog</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 50)
-<p>
-See <code>com.gemstone.gemfire.internal.tcp.TCPConduit#BACKLOG</code>.
-<p>
-<pre>
-  backlog is the "accept" backlog configuration parameter all
-  conduits server socket */
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.batchBufferSize</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 1024 * 1024)
-<p>
-See <code>com.gemstone.gemfire.internal.tcp.Connection#BATCH_BUFFER_SIZE</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.batchFlushTime</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> in JGroups, <em>Integer</em> in Connection.
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code> (default is 20).
-<p>
-See <code>com.gemstone.gemfire.internal.tcp.Connection#BATCH_FLUSH_MS</code>.
-(Default is 50)
-<p>
-Replaces <code>BUNDLING_TIMEOUT</code> in the JGroups config template.
-This in turn sets the <code>max_bundle_timeout</code> property in the
-<code>TP</code> JGroups protocol:
-<p>
-<pre>
-    Max number of milliseconds until queued messages are sent. Messages are
-    sent when max_bundle_size or
-    max_bundle_timeout has been exceeded (whichever occurs faster)
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.batchSends</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.internal.tcp.Connection#BATCH_SENDS</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.debugConnect</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.defaultConcurrencyLevel</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is the number of processors on current machine,
-but no less than 2)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.direct.DirectChannel#DEFAULT_CONCURRENCY_LEVEL</code>.
-<p>
-<pre>
-   Return how many concurrent operations should be allowed by default.
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.defaultLogLevel</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>String</em> (one of "config", "fine", "finer", or "finest")
-<p>
-See <code>com.gemstone.gemfire.internal.tcp.TCPConduit#getLogger</code>.
-<p>
-Used only if this class needs to create a logger.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.directAckTimeout</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 15000)
-<p>
-See <code>com.gemstone.org.jgroups.protocols.DirAck#DIRACK_TIMEOUT</code>.
-<p>
-<pre>
-  warning timer period for log message while waiting for acks
-</pre>
-<p>
-Units are in milliseconds.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.disableBatching</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (default is false)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
-<p>
-If true, sets <code>ENABLE_BUNDLING</code> to false and
-<code>BUNDLING_TIMEOUT</code> to 30 in the JGroups config template; otherwise
-it sets <code>ENABLE_BUNDLING</code> to true and <code>BUNDLING_TIMEOUT</code>
-to <code>p2p.batchFlushTime</code> (30 if not set).
-<p>
-<code>ENABLE_BUNDLING</code> maps to the <code>enable_bundling</code> property
-in <code>UDP</code>, and <code>BUNDLING_TIMEOUT</code> maps to the 
-<code>max_bundle_timeout</code> property in <code>UDP</code>.
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.disableDirAckBypass</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (defaults to false)
-<p>
-See <code>com.gemstone.org.jgroups.protocols.DirAck#DIRACK_BYPASS</code>.
-<p>
-See <code>com.gemstone.org.jgroups.protocols.TP#dirackBypass</code>.
-<p>
-<pre>
-   set -Dp2p.disableDirAckBypass=true to disengage bypassing most of the stack
-   on outgoing messages
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.disableSocketWrite</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Boolean</em> (defaults to false)
-<p>
-See <code>com.gemstone.gemfire.internal.tcp.Connection#SOCKET_WRITE_DISABLED</code>.
-<p>
-<pre>
-  use to test message prep overhead (no socket write).
-  WARNING: turning this on completely disables distribution of batched sends
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.disconnectDelay</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 3000)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#destroyMember</code>.
-<p>
-TBA Workaround for bug 34010: small pause inserted before closing
-reader threads for a departed member.
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.discoveryProbes</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Integer</em> (default is 2)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
-<p>
-This substitutes the <code>NUM_PING_REQUESTS</code> field in the JGroups
-config template, which in turn sets the <code>num_ping_requests</code> property
-in the <code>Discovery</code> protocol.
-<p>
-<pre>
-Number of GET_MBRS_REQ messages to be sent (min=1), distributed over timeout ms
-</pre>
-<p>
-TBA
-</dd>
-
-<!-- -------------------------------------------------------  -->
-<dt><strong>p2p.discoveryTimeout</strong></dt>
-<dd>
-<em>Public:</em> false
-<p>
-<em>Long</em> (default is 1000)
-<p>
-See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
-<p>
-Sets the <code>DISCOVERY_TIMEOUT</code> field in the JGroups template, which
-in turn sets the <code>time

<TRUNCATED>


[37/54] [abbrv] incubator-geode git commit: GEODE-1017: change off-memory from compaction to defragmentation

Posted by je...@apache.org.
GEODE-1017: change off-memory from compaction to defragmentation

 Replaced references of compaction with `defragmentation`, to better
 convey the intent behind the operation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/155f87d5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/155f87d5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/155f87d5

Branch: refs/heads/feature/GEODE-17-2
Commit: 155f87d5ff3b8b5936376c0dce7aba4e214b3672
Parents: 67f0e2c
Author: Sai Boorlagadda <sb...@pivotal.io>
Authored: Wed Mar 16 13:07:49 2016 -0700
Committer: Sai Boorlagadda <sb...@pivotal.io>
Committed: Thu Mar 17 10:07:21 2016 -0700

----------------------------------------------------------------------
 .../gemfire/internal/offheap/Fragment.java      |  2 +-
 .../internal/offheap/FreeListManager.java       | 36 +++++------
 .../internal/offheap/MemoryAllocatorImpl.java   |  2 +-
 .../internal/offheap/OffHeapMemoryStats.java    |  8 +--
 .../internal/offheap/OffHeapStorage.java        | 58 ++++++++---------
 .../internal/beans/MemberMBeanBridge.java       |  2 +-
 .../internal/offheap/FreeListManagerTest.java   | 66 ++++++++++----------
 .../MemoryAllocatorFillPatternJUnitTest.java    | 24 +++----
 .../offheap/MemoryAllocatorJUnitTest.java       |  4 +-
 .../offheap/NullOffHeapMemoryStats.java         |  8 +--
 .../internal/offheap/OffHeapRegionBase.java     |  4 +-
 .../offheap/OffHeapStorageJUnitTest.java        | 18 +++---
 12 files changed, 116 insertions(+), 116 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/155f87d5/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
index 0ea6cf8..b4f827b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
@@ -24,7 +24,7 @@ import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
  * at the end. The freeIdx keeps track of the first byte of free memory in
  * the fragment.
  * The base memory address and the total size of a fragment never change.
- * During compaction fragments go away and are recreated.
+ * During defragmentation fragments go away and are recreated.
  * 
  * @author darrel
  *

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/155f87d5/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
index c943a7e..6de7be9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
@@ -223,7 +223,7 @@ public class FreeListManager {
           return result;
         }
       }
-    } while (compact(chunkSize));
+    } while (defragment(chunkSize));
     // We tried all the fragments and didn't find any free memory.
     logOffHeapState(chunkSize);
     final OutOfOffHeapMemoryException failure = new OutOfOffHeapMemoryException("Out of off-heap memory. Could not allocate size of " + chunkSize);
@@ -240,7 +240,7 @@ public class FreeListManager {
 
   void logOffHeapState(Logger lw, int chunkSize) {
     OffHeapMemoryStats stats = this.ma.getStats();
-    lw.info("OutOfOffHeapMemory allocating size of " + chunkSize + ". allocated=" + this.allocatedSize.get() + " compactions=" + this.compactCount.get() + " objects=" + stats.getObjects() + " free=" + stats.getFreeMemory() + " fragments=" + stats.getFragments() + " largestFragment=" + stats.getLargestFragment() + " fragmentation=" + stats.getFragmentation());
+    lw.info("OutOfOffHeapMemory allocating size of " + chunkSize + ". allocated=" + this.allocatedSize.get() + " defragmentations=" + this.defragmentationCount.get() + " objects=" + stats.getObjects() + " free=" + stats.getFreeMemory() + " fragments=" + stats.getFragments() + " largestFragment=" + stats.getLargestFragment() + " fragmentation=" + stats.getFragmentation());
     logFragmentState(lw);
     logTinyState(lw);
     logHugeState(lw);
@@ -268,7 +268,7 @@ public class FreeListManager {
     }
   }
 
-  protected final AtomicInteger compactCount = new AtomicInteger();
+  protected final AtomicInteger defragmentationCount = new AtomicInteger();
   /*
    * Set this to "true" to perform data integrity checks on allocated and reused Chunks.  This may clobber 
    * performance so turn on only when necessary.
@@ -302,24 +302,24 @@ public class FreeListManager {
   }
   public final static int MAX_TINY = TINY_MULTIPLE*TINY_FREE_LIST_COUNT;
   /**
-   * Compacts memory and returns true if enough memory to allocate chunkSize
+   * Defragments memory and returns true if enough memory to allocate chunkSize
    * is freed. Otherwise returns false;
    * TODO OFFHEAP: what should be done about contiguous chunks that end up being bigger than 2G?
    * Currently if we are given slabs bigger than 2G or that just happen to be contiguous and add
-   * up to 2G then the compactor may unify them together into a single Chunk and our 32-bit chunkSize
+   * up to 2G then the FreeListManager may unify them together into a single Chunk and our 32-bit chunkSize
    * field will overflow. This code needs to detect this and just create a chunk of 2G and then start
    * a new one.
    * Or to prevent it from happening we could just check the incoming slabs and throw away a few bytes
    * to keep them from being contiguous.
    */
-  boolean compact(int chunkSize) {
-    final long startCompactionTime = this.ma.getStats().startCompaction();
-    final int countPreSync = this.compactCount.get();
-    afterCompactCountFetched();
+  boolean defragment(int chunkSize) {
+    final long startDefragmentationTime = this.ma.getStats().startDefragmentation();
+    final int countPreSync = this.defragmentationCount.get();
+    afterDefragmentationCountFetched();
     try {
       synchronized (this) {
-        if (this.compactCount.get() != countPreSync) {
-          // someone else did a compaction while we waited on the sync.
+        if (this.defragmentationCount.get() != countPreSync) {
+          // someone else did a defragmentation while we waited on the sync.
           // So just return true causing the caller to retry the allocation.
           return true;
         }
@@ -432,8 +432,8 @@ public class FreeListManager {
 
         fillFragments();
 
-        // Signal any waiters that a compaction happened.
-        this.compactCount.incrementAndGet();
+        // Signal any waiters that a defragmentation happened.
+        this.defragmentationCount.incrementAndGet();
 
         this.ma.getStats().setLargestFragment(largestFragment);
         this.ma.getStats().setFragments(tmp.size());        
@@ -442,14 +442,14 @@ public class FreeListManager {
         return result;
       } // sync
     } finally {
-      this.ma.getStats().endCompaction(startCompactionTime);
+      this.ma.getStats().endDefragmentation(startDefragmentationTime);
     }
   }
 
   /**
    * Unit tests override this method to get better test coverage
    */
-  protected void afterCompactCountFetched() {
+  protected void afterDefragmentationCountFetched() {
   }
   
   static void verifyOffHeapAlignment(int tinyMultiple) {
@@ -519,7 +519,7 @@ public class FreeListManager {
         diff = f.getSize() - offset;
       } while (diff >= OffHeapStoredObject.MIN_CHUNK_SIZE && !f.allocate(offset, offset+diff));
       if (diff < OffHeapStoredObject.MIN_CHUNK_SIZE) {
-        // If diff > 0 then that memory will be lost during compaction.
+        // If diff > 0 then that memory will be lost during defragmentation.
         // This should never happen since we keep the sizes rounded
         // based on MIN_CHUNK_SIZE.
         assert diff == 0;
@@ -531,7 +531,7 @@ public class FreeListManager {
       result.offer(chunkAddr);
     }
     // All the fragments have been turned in to chunks so now clear them
-    // The compaction will create new fragments.
+    // The defragmentation will create new fragments.
     this.fragmentList.clear();
     if (!result.isEmpty()) {
       l.add(result);
@@ -567,7 +567,7 @@ public class FreeListManager {
     try {
       fragment = this.fragmentList.get(fragIdx);
     } catch (IndexOutOfBoundsException ignore) {
-      // A concurrent compaction can cause this.
+      // A concurrent defragmentation can cause this.
       return null;
     }
     boolean retryFragment;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/155f87d5/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java
index 2050dd4..9135efd 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java
@@ -47,7 +47,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
  * We also keep lists of any chunk that have been allocated and freed.
  * An allocation will always try to find a chunk in a free list that is a close fit to the requested size.
  * If no close fits exist then it allocates the next slice from the front of one the original large chunks.
- * If we can not find enough free memory then all the existing free memory is compacted.
+ * If we can not find enough free memory then all the existing free memory is defragmented.
  * If we still do not have enough to make the allocation an exception is thrown.
  * 
  * @author darrel

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/155f87d5/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapMemoryStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapMemoryStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapMemoryStats.java
index 790e43d..f19d509 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapMemoryStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapMemoryStats.java
@@ -33,8 +33,8 @@ public interface OffHeapMemoryStats {
   public void incReads();
   public void setFragments(long value);
   public void setLargestFragment(int value);
-  public long startCompaction();
-  public void endCompaction(long start);
+  public long startDefragmentation();
+  public void endDefragmentation(long start);
   public void setFragmentation(int value);
   
   public long getFreeMemory();
@@ -42,11 +42,11 @@ public interface OffHeapMemoryStats {
   public long getUsedMemory();
   public long getReads();
   public int getObjects();
-  public int getCompactions();
+  public int getDefragmentations();
   public long getFragments();
   public int getLargestFragment();
   public int getFragmentation();
-  public long getCompactionTime();
+  public long getDefragmentationTime();
   
   public Statistics getStats();
   public void close();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/155f87d5/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
index 2bdcfba..0976259 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
@@ -56,10 +56,10 @@ public class OffHeapStorage implements OffHeapMemoryStats {
   private static final int usedMemoryId;
   private static final int objectsId;
   private static final int readsId;
-  private static final int compactionsId;
+  private static final int defragmentationId;
   private static final int fragmentsId;
   private static final int largestFragmentId;
-  private static final int compactionTimeId;
+  private static final int defragmentationTimeId;
   private static final int fragmentationId;
   // NOTE!!!! When adding new stats make sure and update the initialize method on this class
   
@@ -68,19 +68,19 @@ public class OffHeapStorage implements OffHeapMemoryStats {
     final StatisticsTypeFactory f = StatisticsTypeFactoryImpl.singleton();
     
     final String usedMemoryDesc = "The amount of off-heap memory, in bytes, that is being used to store data.";
-    final String compactionsDesc = "The total number of times off-heap memory has been compacted.";
-    final String compactionTimeDesc = "The total time spent compacting off-heap memory.";
-    final String fragmentationDesc = "The percentage of off-heap free memory that is fragmented.  Updated every time a compaction is performed.";
-    final String fragmentsDesc = "The number of fragments of free off-heap memory. Updated every time a compaction is done.";
+    final String defragmentationDesc = "The total number of times off-heap memory has been defragmented.";
+    final String defragmentationTimeDesc = "The total time spent defragmenting off-heap memory.";
+    final String fragmentationDesc = "The percentage of off-heap free memory that is fragmented.  Updated every time a defragmentation is performed.";
+    final String fragmentsDesc = "The number of fragments of free off-heap memory. Updated every time a defragmentation is done.";
     final String freeMemoryDesc = "The amount of off-heap memory, in bytes, that is not being used.";
-    final String largestFragmentDesc = "The largest fragment of memory found by the last compaction of off heap memory. Updated every time a compaction is done.";
+    final String largestFragmentDesc = "The largest fragment of memory found by the last defragmentation of off heap memory. Updated every time a defragmentation is done.";
     final String objectsDesc = "The number of objects stored in off-heap memory.";
     final String readsDesc = "The total number of reads of off-heap memory. Only reads of a full object increment this statistic. If only a part of the object is read this statistic is not incremented.";
     final String maxMemoryDesc = "The maximum amount of off-heap memory, in bytes. This is the amount of memory allocated at startup and does not change.";
 
     final String usedMemory = "usedMemory";
-    final String compactions = "compactions";
-    final String compactionTime = "compactionTime";
+    final String defragmentations = "defragmentations";
+    final String defragmentationTime = "defragmentationTime";
     final String fragmentation = "fragmentation";
     final String fragments = "fragments";
     final String freeMemory = "freeMemory";
@@ -94,8 +94,8 @@ public class OffHeapStorage implements OffHeapMemoryStats {
         statsTypeDescription,
         new StatisticDescriptor[] {
             f.createLongGauge(usedMemory, usedMemoryDesc, "bytes"),
-            f.createIntCounter(compactions, compactionsDesc, "compactions"),
-            f.createLongCounter(compactionTime, compactionTimeDesc, "nanoseconds", false),
+            f.createIntCounter(defragmentations, defragmentationDesc, "defragmentations"),
+            f.createLongCounter(defragmentationTime, defragmentationTimeDesc, "nanoseconds", false),
             f.createIntGauge(fragmentation, fragmentationDesc, "percentage"),
             f.createLongGauge(fragments, fragmentsDesc, "fragments"),
             f.createLongGauge(freeMemory, freeMemoryDesc, "bytes"),
@@ -107,8 +107,8 @@ public class OffHeapStorage implements OffHeapMemoryStats {
     );
     
     usedMemoryId = statsType.nameToId(usedMemory);
-    compactionsId = statsType.nameToId(compactions);
-    compactionTimeId = statsType.nameToId(compactionTime);
+    defragmentationId = statsType.nameToId(defragmentations);
+    defragmentationTimeId = statsType.nameToId(defragmentationTime);
     fragmentationId = statsType.nameToId(fragmentation);
     fragmentsId = statsType.nameToId(fragments);
     freeMemoryId = statsType.nameToId(freeMemory);
@@ -281,13 +281,13 @@ public class OffHeapStorage implements OffHeapMemoryStats {
     return this.stats.getLong(readsId);
   }
 
-  private void incCompactions() {
-    this.stats.incInt(compactionsId, 1);
+  private void incDefragmentations() {
+    this.stats.incInt(defragmentationId, 1);
   }
 
   @Override
-  public int getCompactions() {
-    return this.stats.getInt(compactionsId);
+  public int getDefragmentations() {
+    return this.stats.getInt(defragmentationId);
   }
 
   @Override
@@ -311,21 +311,21 @@ public class OffHeapStorage implements OffHeapMemoryStats {
   }
   
   @Override
-  public long startCompaction() {
+  public long startDefragmentation() {
     return DistributionStats.getStatTime();
   }
   
   @Override
-  public void endCompaction(long start) {
-    incCompactions();
+  public void endDefragmentation(long start) {
+    incDefragmentations();
     if (DistributionStats.enableClockStats) {
-      stats.incLong(compactionTimeId, DistributionStats.getStatTime()-start);
+      stats.incLong(defragmentationTimeId, DistributionStats.getStatTime()-start);
     }
   }  
   
   @Override
-  public long getCompactionTime() {
-    return stats.getLong(compactionTimeId);
+  public long getDefragmentationTime() {
+    return stats.getLong(defragmentationTimeId);
   }
 
   @Override
@@ -354,21 +354,21 @@ public class OffHeapStorage implements OffHeapMemoryStats {
     setUsedMemory(oldStats.getUsedMemory());
     setObjects(oldStats.getObjects());
     setReads(oldStats.getReads());
-    setCompactions(oldStats.getCompactions());
+    setDefragmentations(oldStats.getDefragmentations());
     setFragments(oldStats.getFragments());
     setLargestFragment(oldStats.getLargestFragment());
-    setCompactionTime(oldStats.getCompactionTime());
+    setDefragmentationTime(oldStats.getDefragmentationTime());
     setFragmentation(oldStats.getFragmentation());
     
     oldStats.close();
   }
 
-  private void setCompactionTime(long value) {
-    stats.setLong(compactionTimeId, value);
+  private void setDefragmentationTime(long value) {
+    stats.setLong(defragmentationTimeId, value);
   }
 
-  private void setCompactions(int value) {
-    this.stats.setInt(compactionsId, value);
+  private void setDefragmentations(int value) {
+    this.stats.setInt(defragmentationId, value);
   }
 
   private void setReads(long value) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/155f87d5/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
index 61e328d..6c7a44f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
@@ -1919,7 +1919,7 @@ public class MemberMBeanBridge {
     OffHeapMemoryStats stats = getOffHeapStats();
     
     if(null != stats) {
-      compactionTime = stats.getCompactionTime();
+      compactionTime = stats.getDefragmentationTime();
     }
     
     return compactionTime;            

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/155f87d5/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
index 950d90b..28ff3ac 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
@@ -278,7 +278,7 @@ public class FreeListManagerTest {
   }
   
   @Test
-  public void compactWithLargeChunkSizeReturnsFalse() {
+  public void defragmentWithLargeChunkSizeReturnsFalse() {
     int SMALL_SLAB = 16;
     int MEDIUM_SLAB = 128;
     Slab slab = new SlabImpl(DEFAULT_SLAB_SIZE);
@@ -295,12 +295,12 @@ public class FreeListManagerTest {
     for (OffHeapStoredObject c: chunks) {
       OffHeapStoredObject.release(c.getAddress(), this.freeListManager);
     }
-    this.freeListManager.firstCompact = false;
-    assertThat(this.freeListManager.compact(DEFAULT_SLAB_SIZE+1)).isFalse();
+    this.freeListManager.firstDefragmentation = false;
+    assertThat(this.freeListManager.defragment(DEFAULT_SLAB_SIZE+1)).isFalse();
   }
   
   @Test
-  public void compactWithChunkSizeOfMaxSlabReturnsTrue() {
+  public void defragmentWithChunkSizeOfMaxSlabReturnsTrue() {
     int SMALL_SLAB = 16;
     int MEDIUM_SLAB = 128;
     Slab slab = new SlabImpl(DEFAULT_SLAB_SIZE);
@@ -318,12 +318,12 @@ public class FreeListManagerTest {
       OffHeapStoredObject.release(c.getAddress(), this.freeListManager);
     }
     
-    assertThat(this.freeListManager.compact(DEFAULT_SLAB_SIZE)).isTrue();
+    assertThat(this.freeListManager.defragment(DEFAULT_SLAB_SIZE)).isTrue();
     //assertThat(this.freeListManager.getFragmentList()).hasSize(4); // TODO intermittently fails because Fragments may be merged
   }
   
   @Test
-  public void compactWithLiveChunks() {
+  public void defragmentWithLiveChunks() {
     int SMALL_SLAB = 16;
     int MEDIUM_SLAB = 128;
     Slab slab = new SlabImpl(DEFAULT_SLAB_SIZE);
@@ -341,22 +341,22 @@ public class FreeListManagerTest {
       OffHeapStoredObject.release(c.getAddress(), this.freeListManager);
     }
     
-    assertThat(this.freeListManager.compact(DEFAULT_SLAB_SIZE/2)).isTrue();
+    assertThat(this.freeListManager.defragment(DEFAULT_SLAB_SIZE/2)).isTrue();
   }
   
   @Test
-  public void compactAfterAllocatingAll() {
+  public void defragmentAfterAllocatingAll() {
     setUpSingleSlabManager();
     OffHeapStoredObject c = freeListManager.allocate(DEFAULT_SLAB_SIZE-8);
-    this.freeListManager.firstCompact = false;
-    assertThat(this.freeListManager.compact(1)).isFalse();
-    // call compact twice for extra code coverage
-    assertThat(this.freeListManager.compact(1)).isFalse();
+    this.freeListManager.firstDefragmentation = false;
+    assertThat(this.freeListManager.defragment(1)).isFalse();
+    // call defragmen twice for extra code coverage
+    assertThat(this.freeListManager.defragment(1)).isFalse();
     assertThat(this.freeListManager.getFragmentList()).isEmpty();
   }
   
   @Test
-  public void afterAllocatingAllOneSizeCompactToAllocateDifferentSize() {
+  public void afterAllocatingAllOneSizeDefragmentToAllocateDifferentSize() {
     setUpSingleSlabManager();
     ArrayList<OffHeapStoredObject> chunksToFree = new ArrayList<>();
     ArrayList<OffHeapStoredObject> chunksToFreeLater = new ArrayList<>();
@@ -394,42 +394,42 @@ public class FreeListManagerTest {
     OffHeapStoredObject.release(c4.getAddress(), freeListManager);
     OffHeapStoredObject.release(mediumChunk1.getAddress(), freeListManager);
     OffHeapStoredObject.release(mediumChunk2.getAddress(), freeListManager);
-    this.freeListManager.firstCompact = false;
-    assertThat(freeListManager.compact(DEFAULT_SLAB_SIZE-(ALLOCATE_COUNT*32))).isFalse();
+    this.freeListManager.firstDefragmentation = false;
+    assertThat(freeListManager.defragment(DEFAULT_SLAB_SIZE-(ALLOCATE_COUNT*32))).isFalse();
     for (int i=0; i < ((256*2)/96); i++) {
       OffHeapStoredObject.release(chunksToFreeLater.get(i).getAddress(), freeListManager);
     }
-    assertThat(freeListManager.compact(DEFAULT_SLAB_SIZE-(ALLOCATE_COUNT*32))).isTrue();
+    assertThat(freeListManager.defragment(DEFAULT_SLAB_SIZE-(ALLOCATE_COUNT*32))).isTrue();
   }
   
   @Test
-  public void afterAllocatingAndFreeingCompact() {
+  public void afterAllocatingAndFreeingDefragment() {
     int slabSize = 1024*3;
     setUpSingleSlabManager(slabSize);
     OffHeapStoredObject bigChunk1 = freeListManager.allocate(slabSize/3-8);
     OffHeapStoredObject bigChunk2 = freeListManager.allocate(slabSize/3-8);
     OffHeapStoredObject bigChunk3 = freeListManager.allocate(slabSize/3-8);
-    this.freeListManager.firstCompact = false;
-    assertThat(freeListManager.compact(1)).isFalse();
+    this.freeListManager.firstDefragmentation = false;
+    assertThat(freeListManager.defragment(1)).isFalse();
     OffHeapStoredObject.release(bigChunk3.getAddress(), freeListManager);
     OffHeapStoredObject.release(bigChunk2.getAddress(), freeListManager);
     OffHeapStoredObject.release(bigChunk1.getAddress(), freeListManager);
-    assertThat(freeListManager.compact(slabSize)).isTrue();
+    assertThat(freeListManager.defragment(slabSize)).isTrue();
   }
   
   @Test
-  public void compactWithEmptyTinyFreeList() {
+  public void defragmentWithEmptyTinyFreeList() {
     setUpSingleSlabManager();
     Fragment originalFragment = this.freeListManager.getFragmentList().get(0);
     OffHeapStoredObject c = freeListManager.allocate(16);
     OffHeapStoredObject.release(c.getAddress(), this.freeListManager);
     c = freeListManager.allocate(16);
-    this.freeListManager.firstCompact = false;
-    assertThat(this.freeListManager.compact(1)).isTrue();
+    this.freeListManager.firstDefragmentation = false;
+    assertThat(this.freeListManager.defragment(1)).isTrue();
     assertThat(this.freeListManager.getFragmentList()).hasSize(1);
-    Fragment compactedFragment = this.freeListManager.getFragmentList().get(0);
-    assertThat(compactedFragment.getSize()).isEqualTo(originalFragment.getSize()-(16+8));
-    assertThat(compactedFragment.getAddress()).isEqualTo(originalFragment.getAddress()+(16+8));
+    Fragment defragmentedFragment = this.freeListManager.getFragmentList().get(0);
+    assertThat(defragmentedFragment.getSize()).isEqualTo(originalFragment.getSize()-(16+8));
+    assertThat(defragmentedFragment.getAddress()).isEqualTo(originalFragment.getAddress()+(16+8));
   }
   
   @Test
@@ -445,7 +445,7 @@ public class FreeListManagerTest {
     this.freeListManager.allocate(DEFAULT_SLAB_SIZE-8-(OffHeapStoredObject.MIN_CHUNK_SIZE-1));
     this.freeListManager.allocate(MEDIUM_SLAB-8-(OffHeapStoredObject.MIN_CHUNK_SIZE-1));
     
-    assertThat(this.freeListManager.compact(SMALL_SLAB)).isTrue();
+    assertThat(this.freeListManager.defragment(SMALL_SLAB)).isTrue();
   }
  @Test
   public void maxAllocationUsesAllMemory() {
@@ -861,13 +861,13 @@ public class FreeListManagerTest {
       return super.createFreeListForEmptySlot(freeLists, idx);
     }
 
-    public boolean firstCompact = true;
+    public boolean firstDefragmentation = true;
     @Override
-    protected void afterCompactCountFetched() {
-      if (this.firstCompact) {
-        this.firstCompact = false;
-        // Force compact into thinking a concurrent compaction happened.
-        this.compactCount.incrementAndGet();
+    protected void afterDefragmentationCountFetched() {
+      if (this.firstDefragmentation) {
+        this.firstDefragmentation = false;
+        // Force defragmentation into thinking a concurrent defragmentation happened.
+        this.defragmentationCount.incrementAndGet();
       }
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/155f87d5/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
index f1d223d..7036187 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
@@ -44,14 +44,14 @@ public class MemoryAllocatorFillPatternJUnitTest {
   /** Chunk size for basic huge allocation test. */
   private static final int HUGE_CHUNK_SIZE = 1024 * 200;
   
-  /** The number of chunks to allocate in order to force compaction. */
-  private static final int COMPACTION_CHUNKS = 3;
+  /** The number of chunks to allocate in order to force defragmentation. */
+  private static final int DEFRAGMENTATION_CHUNKS = 3;
   
   /** Our slab size divided in three (with some padding for safety). */
-  private static final int COMPACTION_CHUNK_SIZE = (SLAB_SIZE / COMPACTION_CHUNKS) - 1024;
+  private static final int DEFRAGMENTATION_CHUNK_SIZE = (SLAB_SIZE / DEFRAGMENTATION_CHUNKS) - 1024;
   
-  /** This should force compaction when allocated. */
-  private static final int FORCE_COMPACTION_CHUNK_SIZE = COMPACTION_CHUNK_SIZE * 2;
+  /** This should force defragmentation when allocated. */
+  private static final int FORCE_DEFRAGMENTATION_CHUNK_SIZE = DEFRAGMENTATION_CHUNK_SIZE * 2;
 
   /** Our test victim. */
   private MemoryAllocatorImpl allocator = null;
@@ -141,22 +141,22 @@ public class MemoryAllocatorFillPatternJUnitTest {
 
   /**
    * This tests that fill validation is working properly on newly created fragments after
-   * a compaction.
+   * a defragmentation.
    * @throws Exception
    */
   @Test
-  public void testFillPatternAfterCompaction() throws Exception {
+  public void testFillPatternAfterDefragmentation() throws Exception {
     /*
      * Stores our allocated memory.
      */
-    OffHeapStoredObject[] allocatedChunks = new OffHeapStoredObject[COMPACTION_CHUNKS];
+    OffHeapStoredObject[] allocatedChunks = new OffHeapStoredObject[DEFRAGMENTATION_CHUNKS];
     
     /*
      * Use up most of our memory
      * Our memory looks like [      ][      ][      ]
      */
     for(int i =0;i < allocatedChunks.length;++i) {
-      allocatedChunks[i] = (OffHeapStoredObject) this.allocator.allocate(COMPACTION_CHUNK_SIZE);
+      allocatedChunks[i] = (OffHeapStoredObject) this.allocator.allocate(DEFRAGMENTATION_CHUNK_SIZE);
       allocatedChunks[i].validateFill();
     }
 
@@ -170,13 +170,13 @@ public class MemoryAllocatorFillPatternJUnitTest {
     
     /*
      * Now, allocate another chunk that is slightly larger than one of
-     * our initial chunks.  This should force a compaction causing our
+     * our initial chunks.  This should force a defragmentation causing our
      * memory to look like [            ][      ].
      */
-    OffHeapStoredObject slightlyLargerChunk = (OffHeapStoredObject) this.allocator.allocate(FORCE_COMPACTION_CHUNK_SIZE);
+    OffHeapStoredObject slightlyLargerChunk = (OffHeapStoredObject) this.allocator.allocate(FORCE_DEFRAGMENTATION_CHUNK_SIZE);
     
     /*
-     * Make sure the compacted memory has the fill validation.
+     * Make sure the defragmented memory has the fill validation.
      */
     slightlyLargerChunk.validateFill();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/155f87d5/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java
index 7639f8d..582e8b9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java
@@ -219,7 +219,7 @@ public class MemoryAllocatorJUnitTest {
       }
       hugemc.release();
       assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*BATCH_SIZE, ma.freeList.getFreeHugeMemory());
-      // now that we do compaction the following allocate works.
+      // now that we do defragmentation the following allocate works.
       hugemc = ma.allocate(minHuge + HUGE_MULTIPLE + HUGE_MULTIPLE-1);
     } finally {
       MemoryAllocatorImpl.freeOffHeapMemory();
@@ -389,7 +389,7 @@ public class MemoryAllocatorJUnitTest {
   }
   
   @Test
-  public void testCompaction() {
+  public void testDefragmentation() {
     final int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
     final int BIG_ALLOC_SIZE = 150000;
     final int SMALL_ALLOC_SIZE = BIG_ALLOC_SIZE/2;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/155f87d5/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOffHeapMemoryStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOffHeapMemoryStats.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOffHeapMemoryStats.java
index 88bab77..d5ce58a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOffHeapMemoryStats.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOffHeapMemoryStats.java
@@ -60,7 +60,7 @@ public class NullOffHeapMemoryStats implements OffHeapMemoryStats {
     return 0;
   }
   @Override
-  public int getCompactions() {
+  public int getDefragmentations() {
     return 0;
   }
   @Override
@@ -78,11 +78,11 @@ public class NullOffHeapMemoryStats implements OffHeapMemoryStats {
     return 0;
   }
   @Override
-  public long startCompaction() {
+  public long startDefragmentation() {
     return 0;
   }
   @Override
-  public void endCompaction(long start) {
+  public void endDefragmentation(long start) {
   }
   @Override
   public void setFragmentation(int value) {
@@ -96,7 +96,7 @@ public class NullOffHeapMemoryStats implements OffHeapMemoryStats {
     return null;
   }
   @Override
-  public long getCompactionTime() {
+  public long getDefragmentationTime() {
     return 0;
   }
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/155f87d5/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
index fb1aa41..02673a2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
@@ -99,8 +99,8 @@ public abstract class OffHeapRegionBase {
       assertEquals(offHeapSize, ma.getFreeMemory());
       assertEquals(0, ma.getUsedMemory());
       // do an allocation larger than the slab size
-      // TODO: currently the compact will product slabs bigger than the max slab size
-      // (see the todo comment on compact() in FreeListManager).
+      // TODO: currently the defragment will produce slabs bigger than the max slab size
+      // (see the todo comment on defragment() in FreeListManager).
       // So we request 20m here since that it the total size.
       try {
         ma.allocate(1024*1024*20);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/155f87d5/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
index d30d4c4..77b1d8d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
@@ -167,8 +167,8 @@ public class OffHeapStorageJUnitTest {
       assertEquals(1024*1024, stats.getFreeMemory());
       assertEquals(1024*1024, stats.getMaxMemory());
       assertEquals(0, stats.getUsedMemory());
-      assertEquals(0, stats.getCompactions());
-      assertEquals(0, stats.getCompactionTime());
+      assertEquals(0, stats.getDefragmentations());
+      assertEquals(0, stats.getDefragmentationTime());
       assertEquals(0, stats.getFragmentation());
       assertEquals(1, stats.getFragments());
       assertEquals(1024*1024, stats.getLargestFragment());
@@ -216,13 +216,13 @@ public class OffHeapStorageJUnitTest {
       boolean originalEnableClockStats = DistributionStats.enableClockStats;
       DistributionStats.enableClockStats = true;
       try {
-        long start = stats.startCompaction();
-        while (stats.startCompaction() == start) {
+        long start = stats.startDefragmentation();
+        while (stats.startDefragmentation() == start) {
           Thread.yield();
         }
-        stats.endCompaction(start);
-        assertEquals(1, stats.getCompactions());
-        assertTrue(stats.getCompactionTime() > 0);
+        stats.endDefragmentation(start);
+        assertEquals(1, stats.getDefragmentations());
+        assertTrue(stats.getDefragmentationTime() > 0);
       } finally {
         DistributionStats.enableClockStats = originalEnableClockStats;
       }
@@ -235,8 +235,8 @@ public class OffHeapStorageJUnitTest {
       assertEquals(0, stats.getFreeMemory());
       assertEquals(0, stats.getMaxMemory());
       assertEquals(0, stats.getUsedMemory());
-      assertEquals(0, stats.getCompactions());
-      assertEquals(0, stats.getCompactionTime());
+      assertEquals(0, stats.getDefragmentations());
+      assertEquals(0, stats.getDefragmentationTime());
       assertEquals(0, stats.getFragmentation());
       assertEquals(0, stats.getFragments());
       assertEquals(0, stats.getLargestFragment());



[49/54] [abbrv] incubator-geode git commit: GEODE-1111 Connection Pooling needs more tests

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4ed2fd37/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java
new file mode 100755
index 0000000..41d48aa
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolDUnitTest.java
@@ -0,0 +1,5871 @@
+/*=========================================================================
+ * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.gemstone.gemfire.cache;
+
+import static org.junit.runners.MethodSorters.NAME_ASCENDING;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import junit.framework.AssertionFailedError;
+
+import org.junit.FixMethodOrder;
+
+import com.gemstone.gemfire.CancelException;
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.cache.client.NoAvailableServersException;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.internal.Endpoint;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
+import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.cache30.CertifiableTestCacheListener;
+import com.gemstone.gemfire.cache30.TestCacheLoader;
+import com.gemstone.gemfire.cache30.TestCacheWriter;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.Assert;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.internal.cache.EntryExpiryTask;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.cache.PoolStats;
+import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
+import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifierStats;
+import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
+import com.gemstone.gemfire.internal.logging.InternalLogWriter;
+import com.gemstone.gemfire.internal.logging.LocalLogWriter;
+import com.gemstone.gemfire.test.dunit.AsyncInvocation;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
+import com.gemstone.gemfire.test.dunit.NetworkUtils;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
+
+/**
+ * This class tests the client connection pool in GemFire.
+ * It does so by creating a cache server with a cache and a pre-defined region and
+ * a data loader. The client creates the same region with a pool
+ * (this happens in the controller VM). the client then spins up
+ * 10 different threads and issues gets on keys. The server data loader returns the
+ * data to the client.
+ * Test uses Groboutils TestRunnable objects to achieve multi threading behavior
+ * in the test.
+ *
+ */
+@FixMethodOrder(NAME_ASCENDING)
+public class ConnectionPoolDUnitTest extends CacheTestCase {
+
+  private static final long serialVersionUID = 1L;
+
+  /** The port on which the bridge server was started in this VM */
+  private static int bridgeServerPort;
+
+  protected static int port = 0;
+  protected static int port2 = 0;
+
+  protected static int numberOfAfterInvalidates;
+  protected static int numberOfAfterCreates;
+  protected static int numberOfAfterUpdates;
+
+  protected final static int TYPE_CREATE = 0;
+  protected final static int TYPE_UPDATE = 1;
+  protected final static int TYPE_INVALIDATE = 2;
+  protected final static int TYPE_DESTROY = 3;
+
+  public ConnectionPoolDUnitTest(String name) {
+    super(name);
+  }
+
+  public void setUp() throws Exception {
+    super.setUp();
+    // avoid IllegalStateException from HandShake by connecting all vms to
+    // system before creating pool
+    getSystem();
+    Invoke.invokeInEveryVM(new SerializableRunnable("getSystem") {
+      public void run() {
+        getSystem();
+      }
+    });
+  }
+  
+  @Override
+  protected final void postTearDownCacheTestCase() throws Exception {
+    Invoke.invokeInEveryVM(new SerializableRunnable() {
+      public void run() {
+        Map pools = PoolManager.getAll();
+        if (!pools.isEmpty()) {
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().warning("found pools remaining after teardown: " + pools);
+          assertEquals(0, pools.size());
+        }
+      }
+    });
+    postTearDownConnectionPoolDUnitTest();
+  }
+  
+  protected void postTearDownConnectionPoolDUnitTest() throws Exception {
+  }
+
+  protected/*GemStoneAddition*/ static PoolImpl getPool(Region r) {
+    PoolImpl result = null;
+    String poolName = r.getAttributes().getPoolName();
+    if (poolName != null) {
+      result = (PoolImpl)PoolManager.find(poolName);
+    }
+    return result;
+  }
+  protected static TestCacheWriter getTestWriter(Region r) {
+    return (TestCacheWriter)r.getAttributes().getCacheWriter();
+  }
+  /**
+   * Create a bridge server on the given port without starting it.
+   *
+   * @since 5.0.2
+   */
+  protected void createBridgeServer(int port) throws IOException {
+    CacheServer bridge = getCache().addCacheServer();
+    bridge.setPort(port);
+    bridge.setMaxThreads(getMaxThreads());
+    bridgeServerPort = bridge.getPort();
+  }
+
+  /**
+   * Starts a bridge server on the given port, using the given
+   * deserializeValues and notifyBySubscription to serve up the
+   * given region.
+   *
+   * @since 4.0
+   */
+  protected void startBridgeServer(int port)
+    throws IOException {
+    startBridgeServer(port, -1);
+  }
+  
+  protected void startBridgeServer(int port, int socketBufferSize) throws IOException {
+    startBridgeServer(port, socketBufferSize, CacheServer.DEFAULT_LOAD_POLL_INTERVAL);
+  }
+
+  protected void startBridgeServer(int port, int socketBufferSize, long loadPollInterval)
+    throws IOException {
+
+    Cache cache = getCache();
+    CacheServer bridge = cache.addCacheServer();
+    bridge.setPort(port);
+    if (socketBufferSize != -1) {
+      bridge.setSocketBufferSize(socketBufferSize);
+    }
+    bridge.setMaxThreads(getMaxThreads());
+    bridge.setLoadPollInterval(loadPollInterval);
+    bridge.start();
+    bridgeServerPort = bridge.getPort();
+  }
+
+  /**
+   * By default return 0 which turns off selector and gives thread per cnx.
+   * Test subclasses can override to run with selector.
+   * @since 5.1
+   */
+  protected int getMaxThreads() {
+    return 0;
+  }
+
+  /**
+   * Stops the bridge server that serves up the given cache.
+   *
+   * @since 4.0
+   */
+  void stopBridgeServer(Cache cache) {
+    CacheServer bridge =
+        cache.getCacheServers().iterator().next();
+    bridge.stop();
+    assertFalse(bridge.isRunning());
+  }
+
+  void stopBridgeServers(Cache cache) {
+    CacheServer bridge = null;
+    for (Iterator bsI = cache.getCacheServers().iterator();bsI.hasNext(); ) {
+      bridge = (CacheServer) bsI.next();
+      bridge.stop();
+      assertFalse(bridge.isRunning());
+    }
+  }
+
+  private void restartBridgeServers(Cache cache) throws IOException
+  {
+    CacheServer bridge = null;
+    for (Iterator bsI = cache.getCacheServers().iterator();bsI.hasNext(); ) {
+      bridge = (CacheServer) bsI.next();
+      bridge.start();
+      assertTrue(bridge.isRunning());
+    }
+  }
+
+  protected InternalDistributedSystem createLonerDS() {
+    disconnectFromDS();
+    InternalDistributedSystem ds = getLonerSystem();
+    assertEquals(0, ds.getDistributionManager().getOtherDistributionManagerIds().size());
+    return ds;
+  }
+
+  
+  
+  /**
+   * Returns region attributes for a <code>LOCAL</code> region
+   */
+  protected RegionAttributes getRegionAttributes() {
+    AttributesFactory factory = new AttributesFactory();
+    factory.setScope(Scope.LOCAL);
+    factory.setConcurrencyChecksEnabled(false); // test validation expects this behavior
+    return factory.create();
+  }
+
+  private static String createBridgeClientConnection(String host, int[] ports) {
+    StringBuffer sb = new StringBuffer();
+    for (int i = 0; i < ports.length; i++) {
+      if (i > 0) sb.append(",");
+      sb.append("name" + i + "=");
+      sb.append(host + ":" + ports[i]);
+    }
+    return sb.toString();
+  }
+
+  private class EventWrapper {
+    public final EntryEvent event;
+    public final Object key;
+    public final Object val;
+    public final Object arg;
+    public final  int type;
+    public EventWrapper(EntryEvent ee, int type) {
+      this.event = ee;
+      this.key = ee.getKey();
+      this.val = ee.getNewValue();
+      this.arg = ee.getCallbackArgument();
+      this.type = type;
+    }
+    public String toString() {
+      return "EventWrapper: event=" + event + ", type=" + type;
+    }
+  }
+
+  protected class ControlListener extends CacheListenerAdapter {
+    public final LinkedList events = new LinkedList();
+    public final Object CONTROL_LOCK = new Object();
+
+    public boolean waitWhileNotEnoughEvents(long sleepMs, int eventCount) {
+      long maxMillis = System.currentTimeMillis() + sleepMs;
+      synchronized (this.CONTROL_LOCK) {
+        try {
+          while (this.events.size() < eventCount) {
+            long waitMillis = maxMillis - System.currentTimeMillis();
+            if (waitMillis < 10) {
+              break;
+            }
+            this.CONTROL_LOCK.wait(waitMillis);
+          }
+        } catch (InterruptedException abort) {
+          fail("interrupted");
+        }
+        return !this.events.isEmpty();
+      }
+    }
+
+    public void afterCreate(EntryEvent e) {
+      //System.out.println("afterCreate: " + e);
+      synchronized(this.CONTROL_LOCK) {
+        this.events.add(new EventWrapper(e, TYPE_CREATE));
+        this.CONTROL_LOCK.notifyAll();
+      }
+    }
+
+    public void afterUpdate(EntryEvent e) {
+      //System.out.println("afterUpdate: " + e);
+      synchronized(this.CONTROL_LOCK) {
+        this.events.add(new EventWrapper(e, TYPE_UPDATE));
+        this.CONTROL_LOCK.notifyAll();
+      }
+    }
+
+    public void afterInvalidate(EntryEvent e) {
+      //System.out.println("afterInvalidate: " + e);
+      synchronized(this.CONTROL_LOCK) {
+        this.events.add(new EventWrapper(e, TYPE_INVALIDATE));
+        this.CONTROL_LOCK.notifyAll();
+      }
+    }
+
+    public void afterDestroy(EntryEvent e) {
+      //System.out.println("afterDestroy: " + e);
+      synchronized(this.CONTROL_LOCK) {
+        this.events.add(new EventWrapper(e, TYPE_DESTROY));
+        this.CONTROL_LOCK.notifyAll();
+      }
+    }
+  }
+
+  
+
+
+  /**
+   * Create a fake EntryEvent that returns the provided region for {@link CacheEvent#getRegion()}
+   * and returns {@link com.gemstone.gemfire.cache.Operation#LOCAL_LOAD_CREATE} for {@link CacheEvent#getOperation()}
+   * @param r
+   * @return fake entry event
+   */
+  protected static EntryEvent createFakeyEntryEvent(final Region r) {
+    return new EntryEvent() {
+      public Operation getOperation()
+      {
+        return Operation.LOCAL_LOAD_CREATE; // fake out pool to exit early
+      }
+      public Region getRegion()
+      {
+        return r;
+      }
+      public Object getKey() { return null; }
+      public Object getOldValue() { return null;}
+      public boolean isOldValueAvailable() {return true;}
+      public Object getNewValue() { return null;}
+      public boolean isLocalLoad() { return false;}
+      public boolean isNetLoad() {return false;}
+      public boolean isLoad() {return true; }
+      public boolean isNetSearch() {return false;}
+      public TransactionId getTransactionId() {return null;}
+      public Object getCallbackArgument() {return null;}
+      public boolean isCallbackArgumentAvailable() {return true;}
+      public boolean isOriginRemote() {return false;}
+      public DistributedMember getDistributedMember() {return null;}
+      public boolean isExpiration() { return false;}
+      public boolean isDistributed() { return false;}
+      public boolean isBridgeEvent() {
+        return hasClientOrigin();
+      }
+      public boolean hasClientOrigin() {
+        return false;
+      }
+      public ClientProxyMembershipID getContext() {
+        return null;
+      }
+      public SerializedCacheValue getSerializedOldValue() {return null;}
+      public SerializedCacheValue getSerializedNewValue() {return null;}
+    };
+  }
+
+  public void verifyBalanced(final PoolImpl pool, int expectedServer, 
+      final int expectedConsPerServer) {
+    verifyServerCount(pool, expectedServer);
+    WaitCriterion ev = new WaitCriterion() {
+      public boolean done() {
+        return balanced(pool, expectedConsPerServer);
+      }
+      public String description() {
+        return "expected " + expectedConsPerServer
+            + " but endpoints=" + outOfBalanceReport(pool);
+      }
+    };
+    Wait.waitForCriterion(ev, 2 * 60 * 1000, 200, true);
+    assertEquals("expected " + expectedConsPerServer
+                 + " but endpoints=" + outOfBalanceReport(pool),
+                 true, balanced(pool, expectedConsPerServer));
+  }
+  protected boolean balanced(PoolImpl pool, int expectedConsPerServer) {
+    Iterator it = pool.getEndpointMap().values().iterator();
+    while (it.hasNext()) {
+      Endpoint ep = (Endpoint)it.next();
+      if (ep.getStats().getConnections() != expectedConsPerServer) {
+        return false;
+      }
+    }
+    return true;
+  }
+  
+  protected String outOfBalanceReport(PoolImpl pool) {
+    StringBuffer result = new StringBuffer();
+    Iterator it = pool.getEndpointMap().values().iterator();
+    result.append("<");
+    while (it.hasNext()) {
+      Endpoint ep = (Endpoint)it.next();
+      result.append("ep=" + ep);
+      result.append(" conCount=" + ep.getStats().getConnections());
+      if (it.hasNext()) {
+        result.append(", ");
+      }
+    }
+    result.append(">");
+    return result.toString();
+  }
+  
+  public void waitForBlacklistToClear(final PoolImpl pool) {
+    WaitCriterion ev = new WaitCriterion() {
+      public boolean done() {
+        return pool.getBlacklistedServers().size() == 0;
+      }
+      public String description() {
+        return null;
+      }
+    };
+    Wait.waitForCriterion(ev, 30 * 1000, 200, true);
+    assertEquals("unexpected blacklistedServers=" + pool.getBlacklistedServers(),
+                 0, pool.getBlacklistedServers().size());
+  }
+  
+  public void verifyServerCount(final PoolImpl pool, final int expectedCount) {
+    getCache().getLogger().info("verifyServerCount expects=" + expectedCount);
+    WaitCriterion ev = new WaitCriterion() {
+      String excuse;
+      public boolean done() {
+        int actual = pool.getConnectedServerCount();
+        if (actual == expectedCount) {
+          return true;
+        }
+        excuse = "Found only " + actual + " servers, expected " + expectedCount;
+        return false;
+      }
+      public String description() {
+        return excuse;
+      }
+    };
+    Wait.waitForCriterion(ev, 5 * 60 * 1000, 200, true);
+  }
+
+  /**
+   * Tests that the callback argument is sent to the server
+   */
+  public void test001CallbackArg() throws CacheException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+
+    final Object createCallbackArg = "CREATE CALLBACK ARG";
+    final Object updateCallbackArg = "PUT CALLBACK ARG";
+
+    vm0.invoke(new CacheSerializableRunnable("Create Cache Server") {
+        public void run2() throws CacheException {
+
+          CacheWriter cw = new TestCacheWriter() {
+              public final void beforeUpdate2(EntryEvent event)
+                throws CacheWriterException {
+                Object beca = event.getCallbackArgument();
+                assertEquals(updateCallbackArg, beca);
+              }
+
+              public void beforeCreate2(EntryEvent event)
+                throws CacheWriterException {
+                Object beca =  event.getCallbackArgument();
+                assertEquals(createCallbackArg, beca);
+              }
+            };
+            AttributesFactory factory = getBridgeServerRegionAttributes(null, cw);
+          createRegion(name, factory.create());
+          //pause(1000);
+          try {
+            startBridgeServer(0);
+
+          } catch (Exception ex) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+          }
+
+        }
+      });
+    final int port =
+      vm0.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+    final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
+
+    
+    SerializableRunnable create =
+      new CacheSerializableRunnable("Create region") {
+          public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+
+            ClientServerTestCase.configureConnectionPool(factory,NetworkUtils.getServerHostName(host),port,-1,true,-1,-1, null);
+            createRegion(name, factory.create());
+          }
+        };
+
+    vm1.invoke(create);
+    vm1.invoke(new CacheSerializableRunnable("Add entries") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            region.create(new Integer(i), "old" + i, createCallbackArg);
+          }
+          for (int i = 0; i < 10; i++) {
+            region.put(new Integer(i), "new" + i, updateCallbackArg);
+        }
+        }
+      });
+
+    vm0.invoke(new CacheSerializableRunnable("Check cache writer") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          TestCacheWriter writer = getTestWriter(region);
+          assertTrue(writer.wasInvoked());
+        }
+      });
+
+  SerializableRunnable close =
+    new CacheSerializableRunnable("Close Pool") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          region.localDestroyRegion();
+        }
+    };
+
+    vm1.invoke(close);
+
+    vm0.invoke(new SerializableRunnable("Stop CacheServer") {
+        public void run() {
+          stopBridgeServer(getCache());
+        }
+    });
+
+  }
+
+  /**
+   * Tests that consecutive puts have the callback assigned
+   * appropriately.
+   */
+  public void test002CallbackArg2() throws CacheException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+
+    final Object createCallbackArg = "CREATE CALLBACK ARG";
+//    final Object updateCallbackArg = "PUT CALLBACK ARG";
+
+    vm0.invoke(new CacheSerializableRunnable("Create Cache Server") {
+        public void run2() throws CacheException {
+          CacheWriter cw = new TestCacheWriter() {
+              public void beforeCreate2(EntryEvent event)
+                throws CacheWriterException {
+                Integer key = (Integer) event.getKey();
+                if (key.intValue() % 2 == 0) {
+                  Object beca =  event.getCallbackArgument();
+                  assertEquals(createCallbackArg, beca);
+                } else {
+                  Object beca =  event.getCallbackArgument();
+                  assertNull(beca);
+                }
+              }
+            };
+            AttributesFactory factory = getBridgeServerRegionAttributes(null, cw);
+          createRegion(name, factory.create());
+          //pause(1000);
+          try {
+            startBridgeServer(0);
+
+          } catch (Exception ex) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+          }
+
+        }
+      });
+    final int port =
+      vm0.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+    final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
+
+    SerializableRunnable create =
+      new CacheSerializableRunnable("Create region") {
+          public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+            ClientServerTestCase.configureConnectionPool(factory,host0,port,-1,true,-1,-1, null);
+            createRegion(name, factory.create());
+          }
+        };
+
+    vm1.invoke(create);
+    vm1.invoke(new CacheSerializableRunnable("Add entries") {
+        public void run2() throws CacheException {
+        Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            if (i % 2 == 0) {
+              region.create(new Integer(i), "old" + i, createCallbackArg);
+
+            } else {
+              region.create(new Integer(i), "old" + i);
+            }
+          }
+        }
+      });
+
+  SerializableRunnable close =
+    new CacheSerializableRunnable("Close Pool") {
+      public void run2() throws CacheException {
+        Region region = getRootRegion().getSubregion(name);
+        region.localDestroyRegion();
+      }
+    };
+
+    vm1.invoke(close);
+
+    vm0.invoke(new CacheSerializableRunnable("Check cache writer") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          TestCacheWriter writer = getTestWriter(region);
+          assertTrue(writer.wasInvoked());
+        }
+      });
+
+    vm0.invoke(new SerializableRunnable("Stop CacheServer") {
+        public void run() {
+          stopBridgeServer(getCache());
+        }
+    });
+  }
+
+  
+  /**
+   * Tests for bug 36684 by having two bridge servers with cacheloaders that should always return
+   * a value and one client connected to each server reading values. If the bug exists, the
+   * clients will get null sometimes. 
+   * @throws InterruptedException 
+   */
+  public void test003Bug36684() throws CacheException, InterruptedException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    VM vm2 = host.getVM(2);
+    VM vm3 = host.getVM(3);
+
+    // Create the cache servers with distributed, mirrored region
+    SerializableRunnable createServer =
+      new CacheSerializableRunnable("Create Cache Server") {
+        public void run2() throws CacheException {
+          CacheLoader cl = new CacheLoader() {
+            public Object load(LoaderHelper helper) {
+              return helper.getKey();
+            }
+            public void close() {
+
+            }
+          };
+          AttributesFactory factory = getBridgeServerMirroredAckRegionAttributes(cl, null);
+          createRegion(name, factory.create());
+          //pause(1000);
+          try {
+            startBridgeServer(0);
+          } catch (Exception ex) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+          }
+
+        }
+      };
+    getSystem().getLogWriter().info("before create server");
+    vm0.invoke(createServer);
+    vm1.invoke(createServer);
+
+    // Create cache server clients
+    final int numberOfKeys = 1000;
+    final String host0 = NetworkUtils.getServerHostName(host);
+    final int vm0Port = vm0.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+    final int vm1Port = vm1.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+    SerializableRunnable createClient =
+      new CacheSerializableRunnable("Create Cache Server Client") {
+        public void run2() throws CacheException {
+          // reset all static listener variables in case this is being rerun in a subclass
+          numberOfAfterInvalidates = 0;
+          numberOfAfterCreates  = 0;
+          numberOfAfterUpdates = 0;
+          // create the region
+          getLonerSystem();
+          AttributesFactory factory = new AttributesFactory();
+          factory.setScope(Scope.LOCAL);
+          factory.setConcurrencyChecksEnabled(false); // test validation expects this behavior
+          // create bridge writer
+          ClientServerTestCase.configureConnectionPool(factory,host0,vm0Port,vm1Port,true,-1,-1, null);
+         createRegion(name, factory.create());
+        }
+      };
+    getSystem().getLogWriter().info("before create client");
+    vm2.invoke(createClient);
+    vm3.invoke(createClient);
+
+    // Initialize each client with entries (so that afterInvalidate is called)
+    SerializableRunnable initializeClient =
+      new CacheSerializableRunnable("Initialize Client") {
+      public void run2() throws CacheException {
+//        StringBuffer errors = new StringBuffer();
+          numberOfAfterInvalidates = 0;
+          numberOfAfterCreates = 0;
+          numberOfAfterUpdates = 0;
+          LocalRegion region = (LocalRegion) getRootRegion().getSubregion(name);
+          for (int i=0; i<numberOfKeys; i++) {
+            String expected = "key-"+i;
+            String actual = (String) region.get("key-"+i);
+            assertEquals(expected, actual);
+          }
+      }
+    };
+    
+    getSystem().getLogWriter().info("before initialize client");
+    AsyncInvocation inv2 = vm2.invokeAsync(initializeClient);
+    AsyncInvocation inv3 = vm3.invokeAsync(initializeClient);
+    
+    ThreadUtils.join(inv2, 30 * 1000);
+    ThreadUtils.join(inv3, 30 * 1000);
+    
+    if (inv2.exceptionOccurred()) { 
+      com.gemstone.gemfire.test.dunit.Assert.fail("Error occured in vm2", inv2.getException());
+    }
+    if(inv3.exceptionOccurred()) {
+      com.gemstone.gemfire.test.dunit.Assert.fail("Error occured in vm3", inv3.getException());
+    }
+  }
+  
+
+  /**
+   * Test for client connection loss with CacheLoader Exception on the server.
+   */
+  public void test004ForCacheLoaderException() throws CacheException, InterruptedException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM server = host.getVM(0);
+    VM client = host.getVM(1);
+
+    // Create the cache servers with distributed, mirrored region
+    SerializableRunnable createServer =
+      new CacheSerializableRunnable("Create Cache Server") {
+        public void run2() throws CacheException {
+          CacheLoader cl = new CacheLoader() {
+            public Object load(LoaderHelper helper) {
+              System.out.println("### CALLING CACHE LOADER....");
+              throw new CacheLoaderException("Test for CahceLoaderException causing Client connection to disconnect.");
+            }
+            public void close() {
+            }
+          };
+          AttributesFactory factory = getBridgeServerMirroredAckRegionAttributes(cl, null);
+          createRegion(name, factory.create());
+          //pause(1000);
+          try {
+            startBridgeServer(0);
+          } catch (Exception ex) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+          }
+
+        }
+      };
+    getSystem().getLogWriter().info("before create server");
+
+    server.invoke(createServer);
+
+    // Create cache server clients
+    final int numberOfKeys = 10;
+    final String host0 = NetworkUtils.getServerHostName(host);
+    final int[] port = new int[] {server.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort())};
+    final String poolName = "myPool";
+
+    SerializableRunnable createClient =
+      new CacheSerializableRunnable("Create Cache Server Client") {
+        public void run2() throws CacheException {
+          getLonerSystem();
+          AttributesFactory factory = new AttributesFactory();
+          factory.setScope(Scope.LOCAL);
+          factory.setConcurrencyChecksEnabled(false);
+          // create bridge writer
+          ClientServerTestCase.configureConnectionPoolWithName(factory,host0,port,true,-1, -1, null, poolName);
+         createRegion(name, factory.create());
+        }
+      };
+    getSystem().getLogWriter().info("before create client");
+    client.invoke(createClient);
+
+    // Initialize each client with entries (so that afterInvalidate is called)
+    SerializableRunnable invokeServerCacheLaoder =
+      new CacheSerializableRunnable("Initialize Client") {
+      public void run2() throws CacheException {
+          LocalRegion region = (LocalRegion) getRootRegion().getSubregion(name);
+          PoolStats stats = ((PoolImpl)PoolManager.find(poolName)).getStats();
+          int oldConnects = stats.getConnects();
+          int oldDisConnects = stats.getDisConnects();
+          try {
+          for (int i=0; i<numberOfKeys; i++) {
+            String actual = (String) region.get("key-"+i);
+          }
+          } catch (Exception ex){
+            if (!(ex.getCause() instanceof CacheLoaderException)) {
+              fail ("UnExpected Exception, expected to receive CacheLoaderException from server, instead found: " + ex.getCause().getClass());
+            }
+          }
+          int newConnects = stats.getConnects();
+          int newDisConnects = stats.getDisConnects();
+          //System.out.println("#### new connects/disconnects :" + newConnects + ":" + newDisConnects);
+          if (newConnects != oldConnects && newDisConnects != oldDisConnects) {
+            fail ("New connection has created for Server side CacheLoaderException.");
+          }
+      }
+    };
+
+    getSystem().getLogWriter().info("before initialize client");
+    AsyncInvocation inv2 = client.invokeAsync(invokeServerCacheLaoder);
+    
+    ThreadUtils.join(inv2, 30 * 1000);
+    SerializableRunnable stopServer = new SerializableRunnable("stop CacheServer") {
+      public void run() {
+        stopBridgeServer(getCache());
+      }
+    };
+    server.invoke(stopServer);
+    
+  }
+
+
+  protected void validateDS() {
+    List l = InternalDistributedSystem.getExistingSystems();
+    if (l.size() > 1) {
+      getSystem().getLogWriter().info("validateDS: size="
+                                      + l.size()
+                                      + " isDedicatedAdminVM="
+                                      + DistributionManager.isDedicatedAdminVM
+                                      + " l=" + l);
+    }
+    assertFalse(DistributionManager.isDedicatedAdminVM);
+    assertEquals(1, l.size());
+  }
+  
+
+  /**
+   * Tests the basic operations of the {@link Pool}
+   *
+   * @since 3.5
+   */
+  public void test006Pool() throws CacheException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    VM vm2 = Host.getHost(0).getVM(2);
+
+    vm0.invoke(new CacheSerializableRunnable("Create Cache Server") {
+        public void run2() throws CacheException {
+          AttributesFactory factory = new AttributesFactory();
+          factory.setScope(Scope.DISTRIBUTED_ACK);
+          factory.setConcurrencyChecksEnabled(false);
+          factory.setCacheLoader(new CacheLoader() {
+              public Object load(LoaderHelper helper) {
+                //System.err.println("CacheServer data loader called");
+                return helper.getKey().toString();
+              }
+              public void close() {
+
+              }
+            });
+          createRegion(name, factory.create());
+          //pause(1000);
+          try {
+            startBridgeServer(0);
+          } catch (Exception ex) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+          }
+
+        }
+      });
+    final int port =
+      vm0.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+    final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
+    SerializableRunnable create =
+      new CacheSerializableRunnable("Create region") {
+          public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            validateDS();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+            ClientServerTestCase.configureConnectionPool(factory,host0,port,-1,true,-1,-1, null);
+            createRegion(name, factory.create());
+          }
+        };
+    vm1.invoke(create);
+
+    vm1.invoke(new CacheSerializableRunnable("Get values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object value = region.get(new Integer(i));
+            assertEquals(String.valueOf(i), value);
+          }
+        }
+      });
+
+    vm1.invoke(new CacheSerializableRunnable("Update values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+
+          for (int i = 0; i < 10; i++) {
+            region.put(new Integer(i), new Integer(i));
+          }
+        }
+      });
+
+    vm2.invoke(create);
+    vm2.invoke(new CacheSerializableRunnable("Validate values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object value = region.get(new Integer(i));
+            assertNotNull(value);
+            assertTrue(value instanceof Integer);
+            assertEquals(i, ((Integer) value).intValue());
+          }
+        }
+      });
+
+    vm1.invoke(new CacheSerializableRunnable("Close Pool") {
+        // do some special close validation here
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          String pName = region.getAttributes().getPoolName();
+          PoolImpl p = (PoolImpl)PoolManager.find(pName);
+          assertEquals(false, p.isDestroyed());
+          assertEquals(1, p.getAttachCount());
+          try {
+            p.destroy();
+            fail("expected IllegalStateException");
+          } catch (IllegalStateException expected) {
+          }
+          region.localDestroyRegion();
+          assertEquals(false, p.isDestroyed());
+          assertEquals(0, p.getAttachCount());
+        }
+      });
+
+    vm0.invoke(new SerializableRunnable("Stop CacheServer") {
+        public void run() {
+          stopBridgeServer(getCache());
+        }
+    });
+  }
+  
+  
+    
+  
+  /**
+   * Tests the BridgeServer failover (bug 31832).
+   */
+  public void test007BridgeServerFailoverCnx1() throws CacheException {
+    disconnectAllFromDS();
+    basicTestBridgeServerFailover(1);
+  }
+  /**
+   * Test BridgeServer failover with connectionsPerServer set to 0
+   */
+  public void test008BridgeServerFailoverCnx0() throws CacheException {
+    basicTestBridgeServerFailover(0);
+  }
+  private void basicTestBridgeServerFailover(final int cnxCount) throws CacheException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    VM vm2 = host.getVM(2);
+
+    // Create two bridge servers
+    SerializableRunnable createCacheServer =
+      new CacheSerializableRunnable("Create Cache Server") {
+        public void run2() throws CacheException {
+          AttributesFactory factory = getBridgeServerRegionAttributes(null, null);
+          createRegion(name, factory.create());
+          //pause(1000);
+          try {
+            startBridgeServer(0);
+
+          } catch (Exception ex) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+        }
+
+        }
+      };
+
+    vm0.invoke(createCacheServer);
+    vm1.invoke(createCacheServer);
+
+    final int port0 =
+      vm0.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+    final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
+
+    final int port1 =
+      vm1.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+//    final String host1 = getServerHostName(vm1.getHost());
+
+    // Create one bridge client in this VM
+    SerializableRunnable create =
+      new CacheSerializableRunnable("Create region") {
+        public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+            ClientServerTestCase.configureConnectionPool(factory,host0,port0,port1,true,-1,cnxCount, null, 100);
+
+            Region region = createRegion(name, factory.create());
+
+            // force connections to form
+            region.put("keyInit", new Integer(0));
+            region.put("keyInit2", new Integer(0));
+        }
+        };
+
+    vm2.invoke(create);
+
+    // Launch async thread that puts objects into cache. This thread will execute until
+    // the test has ended (which is why the RegionDestroyedException and CacheClosedException
+    // are caught and ignored. If any other exception occurs, the test will fail. See
+    // the putAI.exceptionOccurred() assertion below.
+    AsyncInvocation putAI = vm2.invokeAsync(new CacheSerializableRunnable("Put objects") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          try {
+            for (int i=0; i<100000; i++) {
+              region.put("keyAI", new Integer(i));
+              try {Thread.sleep(100);} catch (InterruptedException ie) {
+                fail("interrupted");
+              }
+            }
+          } catch (NoAvailableServersException ignore) {
+            /*ignore*/
+          } catch (RegionDestroyedException e) { //will be thrown when the test ends
+            /*ignore*/
+          } 
+          catch (CancelException e) { //will be thrown when the test ends
+            /*ignore*/
+          }
+        }
+      });
+
+
+    SerializableRunnable verify1Server =
+      new CacheSerializableRunnable("verify1Server") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          PoolImpl pool = getPool(region);
+          verifyServerCount(pool, 1);
+        }
+        };
+    SerializableRunnable verify2Servers =
+      new CacheSerializableRunnable("verify2Servers") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          PoolImpl pool = getPool(region);
+          verifyServerCount(pool, 2);
+        }
+      };
+
+    vm2.invoke(verify2Servers);
+
+    SerializableRunnable stopCacheServer =
+      new SerializableRunnable("Stop CacheServer") {
+          public void run() {
+            stopBridgeServer(getCache());
+          }
+      };
+
+    final String expected = "java.io.IOException";
+    final String addExpected =
+      "<ExpectedException action=add>" + expected + "</ExpectedException>";
+    final String removeExpected =
+      "<ExpectedException action=remove>" + expected + "</ExpectedException>";
+
+    vm2.invoke(new SerializableRunnable() {
+      public void run() {
+        LogWriter bgexecLogger =
+              new LocalLogWriter(InternalLogWriter.ALL_LEVEL, System.out);
+        bgexecLogger.info(addExpected);
+      }
+    });
+    try { // make sure we removeExpected
+
+    // Bounce the non-current server (I know that VM1 contains the non-current server
+    // because ...
+    vm1.invoke(stopCacheServer);
+
+    vm2.invoke(verify1Server);
+
+    final int restartPort = port1;
+    vm1.invoke(
+      new SerializableRunnable("Restart CacheServer") {
+      public void run() {
+        try {
+          Region region = getRootRegion().getSubregion(name);
+          assertNotNull(region);
+          startBridgeServer(restartPort);
+        }
+        catch(Exception e) {
+          getSystem().getLogWriter().fine(new Exception(e));
+          com.gemstone.gemfire.test.dunit.Assert.fail("Failed to start CacheServer", e);
+        }
+      }
+    });
+
+    // Pause long enough for the monitor to realize the server has been bounced
+    // and reconnect to it.
+    vm2.invoke(verify2Servers);
+
+    } finally {
+      vm2.invoke(new SerializableRunnable() {
+        public void run() {
+          LogWriter bgexecLogger =
+                new LocalLogWriter(InternalLogWriter.ALL_LEVEL, System.out);
+          bgexecLogger.info(removeExpected);
+        }
+      });
+    }
+
+    // Stop the other cache server
+    vm0.invoke(stopCacheServer);
+
+    // Run awhile
+    vm2.invoke(verify1Server);
+
+    com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("FIXME: this thread does not terminate"); // FIXME
+//    // Verify that no exception has occurred in the putter thread
+//    DistributedTestCase.join(putAI, 5 * 60 * 1000, getLogWriter());
+//    //assertTrue("Exception occurred while invoking " + putAI, !putAI.exceptionOccurred());
+//    if (putAI.exceptionOccurred()) {
+//      fail("While putting entries: ", putAI.getException());
+//    }
+
+    // Close Pool
+    vm2.invoke(new CacheSerializableRunnable("Close Pool") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          region.localDestroyRegion();
+        }
+      });
+
+    // Stop the last cache server
+    vm1.invoke(stopCacheServer);
+  }
+  
+
+  /**
+   * Make sure cnx lifetime expiration working on thread local cnxs.
+   * @author darrel
+   */
+  public void test009LifetimeExpireOnTL() throws CacheException {
+    basicTestLifetimeExpire(true);
+  }
+
+  /**
+   * Make sure cnx lifetime expiration working on thread local cnxs.
+   * @author darrel
+   */
+  public void test010LifetimeExpireOnPoolCnx() throws CacheException {
+    basicTestLifetimeExpire(false);
+  }
+
+  protected static volatile boolean stopTestLifetimeExpire = false;
+
+  protected static volatile int baselineLifetimeCheck;
+  protected static volatile int baselineLifetimeExtensions;
+  protected static volatile int baselineLifetimeConnect;
+  protected static volatile int baselineLifetimeDisconnect;
+
+  private void basicTestLifetimeExpire(final boolean threadLocal) throws CacheException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    VM vm2 = host.getVM(2);
+
+    AsyncInvocation putAI = null;
+    AsyncInvocation putAI2 = null;
+
+    try {
+
+      // Create two bridge servers
+      SerializableRunnable createCacheServer =
+        new CacheSerializableRunnable("Create Cache Server") {
+          public void run2() throws CacheException {
+            AttributesFactory factory = getBridgeServerRegionAttributes(null, null);
+            factory.setCacheListener(new DelayListener(25));
+            createRegion(name, factory.create());
+            try {
+              startBridgeServer(0);
+
+            } catch (Exception ex) {
+              com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+            }
+
+          }
+        };
+
+      vm0.invoke(createCacheServer);
+
+      final int port0 =
+        vm0.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+      final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
+      vm1.invoke(createCacheServer);
+      final int port1 =
+        vm1.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+      SerializableRunnable stopCacheServer =
+        new SerializableRunnable("Stop CacheServer") {
+          public void run() {
+            stopBridgeServer(getCache());
+          }
+        };
+      // we only had to stop it to reserve a port
+      vm1.invoke(stopCacheServer);
+
+
+      // Create one bridge client in this VM
+      SerializableRunnable create =
+        new CacheSerializableRunnable("Create region") {
+          public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+            ClientServerTestCase.configureConnectionPool(factory,host0,port0,port1,false/*queue*/,-1,0, null, 100, 500, threadLocal, 500);
+
+            Region region = createRegion(name, factory.create());
+
+            // force connections to form
+            region.put("keyInit", new Integer(0));
+            region.put("keyInit2", new Integer(0));
+          }
+        };
+
+      vm2.invoke(create);
+
+      // Launch async thread that puts objects into cache. This thread will execute until
+      // the test has ended.
+      SerializableRunnable putter1 = 
+        new CacheSerializableRunnable("Put objects") {
+          public void run2() throws CacheException {
+            Region region = getRootRegion().getSubregion(name);
+            PoolImpl pool = getPool(region);
+            PoolStats stats = pool.getStats();
+            baselineLifetimeCheck = stats.getLoadConditioningCheck();
+            baselineLifetimeExtensions = stats.getLoadConditioningExtensions();
+            baselineLifetimeConnect = stats.getLoadConditioningConnect();
+            baselineLifetimeDisconnect = stats.getLoadConditioningDisconnect();
+            try {
+              int count = 0;
+              while (!stopTestLifetimeExpire) {
+                count++;
+                region.put("keyAI1", new Integer(count));
+              }
+            } catch (NoAvailableServersException ex) {
+              if (stopTestLifetimeExpire) {
+                return;
+              } else {
+                throw ex;
+              }
+              //           } catch (RegionDestroyedException e) { //will be thrown when the test ends
+              //             /*ignore*/
+              //           } catch (CancelException e) { //will be thrown when the test ends
+              //             /*ignore*/
+            }
+          }
+        };
+      SerializableRunnable putter2 = 
+        new CacheSerializableRunnable("Put objects") {
+          public void run2() throws CacheException {
+            Region region = getRootRegion().getSubregion(name);
+            try {
+              int count = 0;
+              while (!stopTestLifetimeExpire) {
+                count++;
+                region.put("keyAI2", new Integer(count));
+              }
+            } catch (NoAvailableServersException ex) {
+              if (stopTestLifetimeExpire) {
+                return;
+              } else {
+                throw ex;
+              }
+              //           } catch (RegionDestroyedException e) { //will be thrown when the test ends
+              //             /*ignore*/
+              //           } catch (CancelException e) { //will be thrown when the test ends
+              //             /*ignore*/
+            }
+          }
+        };
+      putAI = vm2.invokeAsync(putter1);
+      putAI2 = vm2.invokeAsync(putter2);
+
+      SerializableRunnable verify1Server =
+        new CacheSerializableRunnable("verify1Server") {
+          public void run2() throws CacheException {
+            Region region = getRootRegion().getSubregion(name);
+            PoolImpl pool = getPool(region);
+            final PoolStats stats = pool.getStats();
+            verifyServerCount(pool, 1);
+            WaitCriterion ev = new WaitCriterion() {
+              public boolean done() {
+                return stats.getLoadConditioningCheck() >= (10 + baselineLifetimeCheck);
+              }
+              public String description() {
+                return null;
+              }
+            };
+            Wait.waitForCriterion(ev, 30 * 1000, 200, true);
+            
+            // make sure no replacements are happening.
+            // since we have 2 threads and 2 cnxs and 1 server
+            // when lifetimes are up we should only want to connect back to the
+            // server we are already connected to and thus just extend our lifetime
+            assertTrue("baselineLifetimeCheck=" + baselineLifetimeCheck
+                       + " but stats.getLoadConditioningCheck()=" + stats.getLoadConditioningCheck(),
+                       stats.getLoadConditioningCheck() >= (10+baselineLifetimeCheck));
+            baselineLifetimeCheck = stats.getLoadConditioningCheck();
+            assertTrue(stats.getLoadConditioningExtensions() > baselineLifetimeExtensions);
+            assertTrue(stats.getLoadConditioningConnect() == baselineLifetimeConnect);
+            assertTrue(stats.getLoadConditioningDisconnect() == baselineLifetimeDisconnect);
+          }
+        };
+      SerializableRunnable verify2Servers =
+        new CacheSerializableRunnable("verify2Servers") {
+          public void run2() throws CacheException {
+            Region region = getRootRegion().getSubregion(name);
+            PoolImpl pool = getPool(region);
+            final PoolStats stats = pool.getStats();
+            verifyServerCount(pool, 2);
+            // make sure some replacements are happening.
+            // since we have 2 threads and 2 cnxs and 2 servers
+            // when lifetimes are up we should connect to the other server sometimes.
+//            int retry = 300;
+//            while ((retry-- > 0)
+//                   && (stats.getLoadConditioningCheck() < (10+baselineLifetimeCheck))) {
+//              pause(100);
+//            }
+//            assertTrue("Bug 39209 expected "
+//                       + stats.getLoadConditioningCheck()
+//                       + " to be >= "
+//                       + (10+baselineLifetimeCheck),
+//                       stats.getLoadConditioningCheck() >= (10+baselineLifetimeCheck));
+            
+            // TODO: does this WaitCriterion actually help?
+            WaitCriterion wc = new WaitCriterion() {
+              String excuse;
+              public boolean done() {
+                int actual = stats.getLoadConditioningCheck();
+                int expected = 10 + baselineLifetimeCheck;
+                if (actual >= expected) {
+                  return true;
+                }
+                excuse = "Bug 39209 expected " + actual + " to be >= " + expected;
+                return false;
+              }
+              public String description() {
+                return excuse;
+              }
+            };
+            try {
+              Wait.waitForCriterion(wc, 60 * 1000, 1000, true);
+            } catch (AssertionFailedError e) {
+//              dumpStack();
+              throw e;
+            }
+            
+            assertTrue(stats.getLoadConditioningConnect() > baselineLifetimeConnect);
+            assertTrue(stats.getLoadConditioningDisconnect() > baselineLifetimeDisconnect);
+          }
+        };
+
+      vm2.invoke(verify1Server);
+      assertEquals(true, putAI.isAlive());
+      assertEquals(true, putAI2.isAlive());
+
+      {
+        final int restartPort = port1;
+        vm1.invoke(new SerializableRunnable("Restart CacheServer") {
+            public void run() {
+              try {
+                Region region = getRootRegion().getSubregion(name);
+                assertNotNull(region);
+                startBridgeServer(restartPort);
+              }
+              catch(Exception e) {
+                getSystem().getLogWriter().fine(new Exception(e));
+                com.gemstone.gemfire.test.dunit.Assert.fail("Failed to start CacheServer", e);
+              }
+            }
+          });
+      }
+
+      vm2.invoke(verify2Servers);
+      assertEquals(true, putAI.isAlive());
+      assertEquals(true, putAI2.isAlive());
+    } finally {
+      vm2.invoke(new SerializableRunnable("Stop Putters") {
+          public void run() {
+            stopTestLifetimeExpire = true;
+          }
+        });
+
+      try {
+        if (putAI != null) {
+          // Verify that no exception has occurred in the putter thread
+          ThreadUtils.join(putAI, 30 * 1000);
+          if (putAI.exceptionOccurred()) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While putting entries: ", putAI.getException());
+          }
+        }
+        
+        if (putAI2 != null) {
+          // Verify that no exception has occurred in the putter thread
+          ThreadUtils.join(putAI, 30 * 1000);
+          // FIXME this thread does not terminate
+//          if (putAI2.exceptionOccurred()) {
+//            fail("While putting entries: ", putAI.getException());
+//          }
+        }
+
+      } finally {
+        vm2.invoke(new SerializableRunnable("Stop Putters") {
+            public void run() {
+              stopTestLifetimeExpire = false;
+            }
+          });
+        // Close Pool
+        vm2.invoke(new CacheSerializableRunnable("Close Pool") {
+            public void run2() throws CacheException {
+              Region region = getRootRegion().getSubregion(name);
+              String poolName = region.getAttributes().getPoolName();
+              region.localDestroyRegion();
+              PoolManager.find(poolName).destroy();
+            }
+          });
+
+        SerializableRunnable stopCacheServer =
+          new SerializableRunnable("Stop CacheServer") {
+            public void run() {
+              stopBridgeServer(getCache());
+            }
+          };
+        vm1.invoke(stopCacheServer);
+        vm0.invoke(stopCacheServer);
+      }
+    }
+  }
+
+  /**
+   * Tests the create operation of the {@link Pool}
+   *
+   * @since 3.5
+   */
+  public void test011PoolCreate() throws CacheException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    VM vm2 = Host.getHost(0).getVM(2);
+
+    vm0.invoke(new CacheSerializableRunnable("Create Cache Server") {
+        public void run2() throws CacheException {
+          AttributesFactory factory = getBridgeServerRegionAttributes(null, null);
+          createRegion(name, factory.create());
+          //pause(1000);
+          try {
+            startBridgeServer(0);
+          } catch (Exception ex) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+          }
+
+        }
+      });
+    final int port =
+      vm0.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+    final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
+    SerializableRunnable create =
+      new CacheSerializableRunnable("Create region") {
+          public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+            ClientServerTestCase.configureConnectionPool(factory,host0,port,-1,false,-1,-1, null);
+           createRegion(name, factory.create());
+          }
+        };
+
+    vm1.invoke(create);
+    vm1.invoke(new CacheSerializableRunnable("Create values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            region.create(new Integer(i), new Integer(i));
+          }
+        }
+      });
+
+    vm2.invoke(create);
+    vm2.invoke(new CacheSerializableRunnable("Validate values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object value = region.get(new Integer(i));
+            assertNotNull(value);
+            assertTrue(value instanceof Integer);
+            assertEquals(i, ((Integer) value).intValue());
+          }
+        }
+      });
+
+  SerializableRunnable close =
+    new CacheSerializableRunnable("Close Pool") {
+      public void run2() throws CacheException {
+        Region region = getRootRegion().getSubregion(name);
+        region.localDestroyRegion();
+      }
+    };
+
+    vm1.invoke(close);
+    vm2.invoke(close);
+
+    vm0.invoke(new SerializableRunnable("Stop CacheServer") {
+        public void run() {
+          stopBridgeServer(getCache());
+        }
+    });
+  }
+
+  /**
+   * Tests the put operation of the {@link Pool}
+   *
+   * @since 3.5
+   */
+  public void test012PoolPut() throws CacheException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    VM vm2 = Host.getHost(0).getVM(2);
+
+    vm0.invoke(new CacheSerializableRunnable("Create Cache Server") {
+        public void run2() throws CacheException {
+          AttributesFactory factory = getBridgeServerRegionAttributes(null, null);
+          createRegion(name, factory.create());
+          //pause(1000);
+          try {
+            startBridgeServer(0);
+
+          } catch (Exception ex) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+          }
+
+        }
+      });
+
+    final int port =
+      vm0.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+    final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
+    SerializableRunnable createPool =
+      new CacheSerializableRunnable("Create region") {
+          public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+            // create bridge writer
+            ClientServerTestCase.configureConnectionPool(factory,host0,port,-1,false,-1,-1, null);
+           createRegion(name, factory.create());
+          }
+        };
+
+    vm1.invoke(createPool);
+
+    vm1.invoke(new CacheSerializableRunnable("Put values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            // put string values
+            region.put("key-string-"+i, "value-"+i);
+
+            // put object values
+            Order order = new Order();
+            order.init(i);
+            region.put("key-object-"+i, order);
+
+            // put byte[] values
+            region.put("key-bytes-"+i, ("value-"+i).getBytes());
+          }
+        }
+      });
+
+    vm2.invoke(createPool);
+
+    vm2.invoke(new CacheSerializableRunnable("Get / validate string values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object value = region.get("key-string-"+i);
+            assertNotNull(value);
+            assertTrue(value instanceof String);
+            assertEquals("value-"+i, value);
+          }
+        }
+      });
+
+    vm2.invoke(new CacheSerializableRunnable("Get / validate object values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object value = region.get("key-object-"+i);
+            assertNotNull(value);
+            assertTrue(value instanceof Order);
+            assertEquals(i, ((Order) value).getIndex());
+          }
+        }
+      });
+
+    vm2.invoke(new CacheSerializableRunnable("Get / validate byte[] values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object value = region.get("key-bytes-"+i);
+            assertNotNull(value);
+            assertTrue(value instanceof byte[]);
+            assertEquals("value-"+i, new String((byte[]) value));
+          }
+        }
+      });
+
+  SerializableRunnable closePool =
+    new CacheSerializableRunnable("Close Pool") {
+      public void run2() throws CacheException {
+        Region region = getRootRegion().getSubregion(name);
+        region.localDestroyRegion();
+      }
+    };
+
+    vm1.invoke(closePool);
+    vm2.invoke(closePool);
+
+    vm0.invoke(new SerializableRunnable("Stop CacheServer") {
+        public void run() {
+          stopBridgeServer(getCache());
+        }
+    });
+  }
+    /**
+   * Tests the put operation of the {@link Pool}
+   *
+   * @since 3.5
+   */
+  public void test013PoolPutNoDeserialize() throws CacheException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    VM vm2 = Host.getHost(0).getVM(2);
+
+    vm0.invoke(new CacheSerializableRunnable("Create Cache Server") {
+        public void run2() throws CacheException {
+          AttributesFactory factory = getBridgeServerRegionAttributes(null,null);
+          createRegion(name, factory.create());
+          //pause(1000);
+          try {
+            startBridgeServer(0);
+          } catch (Exception ex) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+          }
+
+        }
+      });
+
+    final int port =
+      vm0.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+    final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
+
+    SerializableRunnable createPool =
+      new CacheSerializableRunnable("Create region") {
+          public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+            ClientServerTestCase.configureConnectionPool(factory,host0,port,-1,false,-1,-1, null);
+           createRegion(name, factory.create());
+          }
+        };
+
+    vm1.invoke(createPool);
+
+    vm1.invoke(new CacheSerializableRunnable("Put values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            // put string values
+            region.put("key-string-"+i, "value-"+i);
+
+            // put object values
+            Order order = new Order();
+            order.init(i);
+            region.put("key-object-"+i, order);
+
+            // put byte[] values
+            region.put("key-bytes-"+i, ("value-"+i).getBytes());
+          }
+        }
+      });
+
+    vm2.invoke(createPool);
+
+    vm2.invoke(new CacheSerializableRunnable("Get / validate string values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object value = region.get("key-string-"+i);
+            assertNotNull(value);
+            assertTrue(value instanceof String);
+            assertEquals("value-"+i, value);
+          }
+        }
+      });
+
+    vm2.invoke(new CacheSerializableRunnable("Get / validate object values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object value = region.get("key-object-"+i);
+            assertNotNull(value);
+            assertTrue(value instanceof Order);
+            assertEquals(i, ((Order) value).getIndex());
+          }
+        }
+      });
+
+    vm2.invoke(new CacheSerializableRunnable("Get / validate byte[] values") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object value = region.get("key-bytes-"+i);
+            assertNotNull(value);
+            assertTrue(value instanceof byte[]);
+            assertEquals("value-"+i, new String((byte[]) value));
+          }
+        }
+      });
+
+  SerializableRunnable closePool =
+    new CacheSerializableRunnable("Close Pool") {
+      public void run2() throws CacheException {
+        Region region = getRootRegion().getSubregion(name);
+        region.localDestroyRegion();
+      }
+    };
+
+    vm1.invoke(closePool);
+    vm2.invoke(closePool);
+
+    vm0.invoke(new SerializableRunnable("Stop CacheServer") {
+        public void run() {
+          stopBridgeServer(getCache());
+        }
+    });
+    Wait.pause(5 * 1000);
+  }
+
+  /**
+   * Tests that invalidates and destroys are propagated to {@link Pool}s.
+   *
+   * @since 3.5
+   */
+  public void test014InvalidateAndDestroyPropagation() throws CacheException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    VM vm2 = host.getVM(2);
+
+    vm0.invoke(new CacheSerializableRunnable("Create Cache Server") {
+        public void run2() throws CacheException {
+          AttributesFactory factory = getBridgeServerRegionAttributes(null, null);
+          createRegion(name, factory.create());
+          //pause(1000);
+          try {
+            startBridgeServer(0);
+
+          } catch (Exception ex) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+          }
+
+        }
+
+      });
+    final int port =
+      vm0.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+    final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
+
+    SerializableRunnable create =
+      new CacheSerializableRunnable("Create region") {
+          public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+            ClientServerTestCase.configureConnectionPool(factory,host0,port,-1,true,-1,-1, null);
+            CertifiableTestCacheListener l = new CertifiableTestCacheListener(com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter());
+            factory.setCacheListener(l);
+            Region rgn = createRegion(name, factory.create());
+            rgn.registerInterestRegex(".*", false, false);
+          }
+        };
+
+    vm1.invoke(create);
+    vm1.invoke(new CacheSerializableRunnable("Populate region") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            region.put(new Integer(i), "old" + i);
+          }
+        }
+      });
+    vm2.invoke(create);
+    Wait.pause(5 * 1000);
+    
+    vm1.invoke(new CacheSerializableRunnable("Turn on history") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          CertifiableTestCacheListener ctl = (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
+          ctl.enableEventHistory();
+        }
+      });
+    vm2.invoke(new CacheSerializableRunnable("Update region") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            region.put(new Integer(i), "new" + i, "callbackArg" + i);
+          }
+        }
+      });
+    Wait.pause(5 * 1000);
+
+    vm1.invoke(new CacheSerializableRunnable("Verify invalidates") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          CertifiableTestCacheListener ctl = (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            ctl.waitForInvalidated(key);
+            Region.Entry entry = region.getEntry(key);
+            assertNotNull(entry);
+            assertNull(entry.getValue());
+          }
+          {
+            List l = ctl.getEventHistory();
+            assertEquals(10, l.size());
+            for (int i = 0; i < 10; i++) {
+              Object key = new Integer(i);
+              EntryEvent ee = (EntryEvent)l.get(i);
+              assertEquals(key, ee.getKey());
+              assertEquals("old" + i, ee.getOldValue());
+              assertEquals(Operation.INVALIDATE, ee.getOperation());
+              assertEquals("callbackArg" + i, ee.getCallbackArgument());
+              assertEquals(true, ee.isOriginRemote());
+            }
+          }
+        }
+      });
+
+
+    vm2.invoke(new CacheSerializableRunnable("Validate original and destroy") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            assertEquals("new" + i, region.getEntry(key).getValue());
+            region.destroy(key, "destroyCB"+i);
+          }
+        }
+      });
+    Wait.pause(5 * 1000);
+
+    vm1.invoke(new CacheSerializableRunnable("Verify destroys") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          CertifiableTestCacheListener ctl = (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            ctl.waitForDestroyed(key);
+            Region.Entry entry = region.getEntry(key);
+            assertNull(entry);
+          }
+          {
+            List l = ctl.getEventHistory();
+            assertEquals(10, l.size());
+            for (int i = 0; i < 10; i++) {
+              Object key = new Integer(i);
+              EntryEvent ee = (EntryEvent)l.get(i);
+              assertEquals(key, ee.getKey());
+              assertEquals(null, ee.getOldValue());
+              assertEquals(Operation.DESTROY, ee.getOperation());
+              assertEquals("destroyCB"+i, ee.getCallbackArgument());
+              assertEquals(true, ee.isOriginRemote());
+            }
+          }
+        }
+      });
+    vm2.invoke(new CacheSerializableRunnable("recreate") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            region.create(key, "create" + i);
+          }
+        }
+      });
+    Wait.pause(5 * 1000);
+    
+    vm1.invoke(new CacheSerializableRunnable("Verify creates") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          CertifiableTestCacheListener ctl = (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
+          List l = ctl.getEventHistory();
+          com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("history (should be empty): " + l);
+          assertEquals(0, l.size());
+          // now see if we can get it from the server
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            assertEquals("create"+i, region.get(key, "loadCB"+i));
+          }
+          l = ctl.getEventHistory();
+          assertEquals(10, l.size());
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            EntryEvent ee = (EntryEvent)l.get(i);
+            com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("processing " + ee);
+            assertEquals(key, ee.getKey());
+            assertEquals(null, ee.getOldValue());
+            assertEquals("create"+i, ee.getNewValue());
+            assertEquals(Operation.LOCAL_LOAD_CREATE, ee.getOperation());
+            assertEquals("loadCB"+i, ee.getCallbackArgument());
+            assertEquals(false, ee.isOriginRemote());
+          }
+        }
+      });
+
+  SerializableRunnable close =
+    new CacheSerializableRunnable("Close Pool") {
+      public void run2() throws CacheException {
+        Region region = getRootRegion().getSubregion(name);
+        region.localDestroyRegion();
+      }
+    };
+
+    vm1.invoke(close);
+    vm2.invoke(close);
+
+    vm0.invoke(new SerializableRunnable("Stop CacheServer") {
+        public void run() {
+          stopBridgeServer(getCache());
+        }
+    });
+  }
+  /**
+   * Tests that invalidates and destroys are propagated to {@link Pool}s
+   * correctly to DataPolicy.EMPTY + InterestPolicy.ALL
+   *
+   * @since 5.0
+   */
+  public void test015InvalidateAndDestroyToEmptyAllPropagation() throws CacheException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    VM vm2 = host.getVM(2);
+
+    vm0.invoke(new CacheSerializableRunnable("Create Cache Server") {
+        public void run2() throws CacheException {
+          AttributesFactory factory = getBridgeServerRegionAttributes(null, null);
+          createRegion(name, factory.create());
+          //pause(1000);
+          try {
+            startBridgeServer(0);
+
+          } catch (Exception ex) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+          }
+
+        }
+      });
+    final int port =
+       vm0.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+    final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
+
+    SerializableRunnable createEmpty =
+      new CacheSerializableRunnable("Create region") {
+          public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+            ClientServerTestCase.configureConnectionPool(factory,host0,port,-1,true,-1,-1, null);
+            CertifiableTestCacheListener l = new CertifiableTestCacheListener(com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter());
+            factory.setCacheListener(l);
+            factory.setDataPolicy(DataPolicy.EMPTY);
+            factory.setSubscriptionAttributes(new SubscriptionAttributes(InterestPolicy.ALL));
+            Region rgn = createRegion(name, factory.create());
+            rgn.registerInterestRegex(".*", false, false);
+          }
+        };
+    SerializableRunnable createNormal =
+      new CacheSerializableRunnable("Create region") {
+          public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+            ClientServerTestCase.configureConnectionPool(factory,host0,port,-1,true,-1,-1, null);
+            CertifiableTestCacheListener l = new CertifiableTestCacheListener(com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter());
+            factory.setCacheListener(l);
+            Region rgn = createRegion(name, factory.create());
+            rgn.registerInterestRegex(".*", false, false);
+          }
+        };
+
+    vm1.invoke(createEmpty);
+    vm1.invoke(new CacheSerializableRunnable("Populate region") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            region.put(new Integer(i), "old" + i);
+          }
+        }
+      });
+
+    vm2.invoke(createNormal);
+    vm1.invoke(new CacheSerializableRunnable("Turn on history") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          CertifiableTestCacheListener ctl = (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
+          ctl.enableEventHistory();
+        }
+      });
+    vm2.invoke(new CacheSerializableRunnable("Update region") {
+      public void run2() throws CacheException {
+        Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            region.put(new Integer(i), "new" + i, "callbackArg" + i);
+      }
+        }
+    });
+    Wait.pause(5 * 1000);
+
+    vm1.invoke(new CacheSerializableRunnable("Verify invalidates") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          CertifiableTestCacheListener ctl = (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            ctl.waitForInvalidated(key);
+            Region.Entry entry = region.getEntry(key);
+            assertNull(entry); // we are empty!
+                }
+          {
+            List l = ctl.getEventHistory();
+            assertEquals(10, l.size());
+            for (int i = 0; i < 10; i++) {
+              Object key = new Integer(i);
+              EntryEvent ee = (EntryEvent)l.get(i);
+              assertEquals(key, ee.getKey());
+              assertEquals(null, ee.getOldValue());
+              assertEquals(false, ee.isOldValueAvailable()); // failure
+              assertEquals(Operation.INVALIDATE, ee.getOperation());
+              assertEquals("callbackArg" + i, ee.getCallbackArgument());
+              assertEquals(true, ee.isOriginRemote());
+              }
+          }
+
+        }
+      });
+
+
+    vm2.invoke(new CacheSerializableRunnable("Validate original and destroy") {
+          public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            assertEquals("new" + i, region.getEntry(key).getValue());
+            region.destroy(key, "destroyCB"+i);
+          }
+        }
+      });
+    Wait.pause(5 * 1000);
+
+    vm1.invoke(new CacheSerializableRunnable("Verify destroys") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          CertifiableTestCacheListener ctl = (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            ctl.waitForDestroyed(key);
+            Region.Entry entry = region.getEntry(key);
+            assertNull(entry);
+          }
+          {
+            List l = ctl.getEventHistory();
+            assertEquals(10, l.size());
+            for (int i = 0; i < 10; i++) {
+              Object key = new Integer(i);
+              EntryEvent ee = (EntryEvent)l.get(i);
+              assertEquals(key, ee.getKey());
+              assertEquals(null, ee.getOldValue());
+              assertEquals(false, ee.isOldValueAvailable());
+              assertEquals(Operation.DESTROY, ee.getOperation());
+              assertEquals("destroyCB"+i, ee.getCallbackArgument());
+              assertEquals(true, ee.isOriginRemote());
+            }
+          }
+        }
+      });
+    vm2.invoke(new CacheSerializableRunnable("recreate") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            region.create(key, "create" + i, "createCB"+i);
+          }
+        }
+      });
+    Wait.pause(5 * 1000);
+    
+    vm1.invoke(new CacheSerializableRunnable("Verify creates") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          CertifiableTestCacheListener ctl = (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            ctl.waitForInvalidated(key);
+            Region.Entry entry = region.getEntry(key);
+            assertNull(entry);
+          }
+          List l = ctl.getEventHistory();
+          assertEquals(10, l.size());
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            EntryEvent ee = (EntryEvent)l.get(i);
+            assertEquals(key, ee.getKey());
+            assertEquals(null, ee.getOldValue());
+            assertEquals(false, ee.isOldValueAvailable());
+            assertEquals(Operation.INVALIDATE, ee.getOperation());
+            assertEquals("createCB"+i, ee.getCallbackArgument());
+            assertEquals(true, ee.isOriginRemote());
+          }
+          // now see if we can get it from the server
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            assertEquals("create"+i, region.get(key, "loadCB"+i));
+          }
+          l = ctl.getEventHistory();
+          assertEquals(10, l.size());
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            EntryEvent ee = (EntryEvent)l.get(i);
+            assertEquals(key, ee.getKey());
+            assertEquals(null, ee.getOldValue());
+            assertEquals("create"+i, ee.getNewValue());
+            assertEquals(Operation.LOCAL_LOAD_CREATE, ee.getOperation());
+            assertEquals("loadCB"+i, ee.getCallbackArgument());
+            assertEquals(false, ee.isOriginRemote());
+          }
+        }
+      });
+
+  SerializableRunnable close =
+    new CacheSerializableRunnable("Close Pool") {
+      public void run2() throws CacheException {
+        Region region = getRootRegion().getSubregion(name);
+        region.localDestroyRegion();
+      }
+    };
+
+    vm1.invoke(close);
+    vm2.invoke(close);
+
+    vm0.invoke(new SerializableRunnable("Stop CacheServer") {
+        public void run() {
+          stopBridgeServer(getCache());
+        }
+    });
+  }
+
+  /**
+   * Tests that invalidates and destroys are propagated to {@link Pool}s
+   * correctly to DataPolicy.EMPTY + InterestPolicy.CACHE_CONTENT
+   *
+   * @since 5.0
+   */
+  public void test016InvalidateAndDestroyToEmptyCCPropagation() throws CacheException {
+    final String name = this.getName();
+    final Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    VM vm2 = host.getVM(2);
+
+    vm0.invoke(new CacheSerializableRunnable("Create Cache Server") {
+        public void run2() throws CacheException {
+          AttributesFactory factory = getBridgeServerRegionAttributes(null, null);
+          createRegion(name, factory.create());
+          try {
+            startBridgeServer(0);
+
+          } catch (Exception ex) {
+            com.gemstone.gemfire.test.dunit.Assert.fail("While starting CacheServer", ex);
+          }
+
+        }
+      });
+    final int port =
+      vm0.invoke(() -> ConnectionPoolDUnitTest.getCacheServerPort());
+    final String host0 = NetworkUtils.getServerHostName(vm0.getHost());
+
+    SerializableRunnable createEmpty =
+      new CacheSerializableRunnable("Create region") {
+          public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+            ClientServerTestCase.configureConnectionPool(factory,host0,port,-1,true,-1,-1, null);
+            CertifiableTestCacheListener l = new CertifiableTestCacheListener(com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter());
+            factory.setCacheListener(l);
+            factory.setDataPolicy(DataPolicy.EMPTY);
+            factory.setSubscriptionAttributes(new SubscriptionAttributes(InterestPolicy.CACHE_CONTENT));
+            Region rgn = createRegion(name, factory.create());
+            rgn.registerInterestRegex(".*", false, false);
+         }
+        };
+    SerializableRunnable createNormal =
+      new CacheSerializableRunnable("Create region") {
+          public void run2() throws CacheException {
+            getLonerSystem();
+            getCache();
+            AttributesFactory factory = new AttributesFactory();
+            factory.setScope(Scope.LOCAL);
+            factory.setConcurrencyChecksEnabled(false);
+            ClientServerTestCase.configureConnectionPool(factory,host0,port,-1,true,-1,-1, null);
+            CertifiableTestCacheListener l = new CertifiableTestCacheListener(com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter());
+            factory.setCacheListener(l);
+            Region rgn = createRegion(name, factory.create());
+            rgn.registerInterestRegex(".*", false, false);
+          }
+        };
+
+    vm1.invoke(createEmpty);
+    vm1.invoke(new CacheSerializableRunnable("Populate region") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            region.put(new Integer(i), "old" + i);
+          }
+        }
+      });
+
+    vm2.invoke(createNormal);
+    vm1.invoke(new CacheSerializableRunnable("Turn on history") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          CertifiableTestCacheListener ctl = (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
+          ctl.enableEventHistory();
+        }
+      });
+    vm2.invoke(new CacheSerializableRunnable("Update region") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            region.put(new Integer(i), "new" + i, "callbackArg" + i);
+          }
+        }
+      });
+    Wait.pause(5 * 1000);
+
+    vm1.invoke(new CacheSerializableRunnable("Verify invalidates") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          CertifiableTestCacheListener ctl = (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
+          List l = ctl.getEventHistory();
+          assertEquals(0, l.size());
+        }
+      });
+
+
+    vm2.invoke(new CacheSerializableRunnable("Validate original and destroy") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            assertEquals("new" + i, region.getEntry(key).getValue());
+            region.destroy(key, "destroyCB"+i);
+          }
+        }
+      });
+
+    vm1.invoke(new CacheSerializableRunnable("Verify destroys") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          CertifiableTestCacheListener ctl = (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
+          List l = ctl.getEventHistory();
+          assertEquals(0, l.size());
+        }
+      });
+    vm2.invoke(new CacheSerializableRunnable("recreate") {
+        public void run2() throws CacheException {
+          Region region = getRootRegion().getSubregion(name);
+          for (int i = 0; i < 10; i++) {
+            Object key = new Integer(i);
+            region.create(key, "create" + i, "createCB"+i);
+          }
+        }
+

<TRUNCATED>


[06/54] [abbrv] incubator-geode git commit: GEODE-573: Fix broken image links in javadocs

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/doc-files/data-serialization-exceptions.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/doc-files/data-serialization-exceptions.fig b/geode-core/src/main/java/com/gemstone/gemfire/doc-files/data-serialization-exceptions.fig
deleted file mode 100644
index 8d5eb70..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/doc-files/data-serialization-exceptions.fig
+++ /dev/null
@@ -1,135 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 675 2250 3600 5025
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 1575 4275 168 168 1575 4275 1650 4125
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 2700 4275 168 168 2700 4275 2775 4125
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 900 3375 168 168 900 3375 975 3225
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 2700 4275 168 168 2700 4275 2625 4125
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 3375 3375 168 168 3375 3375 3300 3225
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 1575 2475 168 168 1575 2475 1650 2625
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 2700 2475 168 168 2700 2475 2775 2625
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 900 3375 168 168 900 3375 975 3525
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 2700 2475 168 168 2700 2475 2625 2625
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 3375 3375 168 168 3375 3375 3300 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 975 3525 1425 4200
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1725 4275 2550 4275
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 3300 3525 2850 4200
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 2550 4275 1725 4275
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 975 3225 1425 2550
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1725 2475 2550 2475
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 3300 3225 2850 2550
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 2550 2475 1725 2475
-4 0 0 50 -1 0 16 0.0000 4 210 1245 1575 4950 Infinite Loop\001
--6
-6 4650 2175 6450 4575
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 5550 4350 168 168 5550 4350 5625 4500
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 4875 3375 168 168 4875 3375 4950 3525
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 5550 4350 168 168 5550 4350 5475 4500
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 6225 3375 168 168 6225 3375 6150 3525
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 5550 2400 168 168 5550 2400 5475 2250
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 6225 3375 168 168 6225 3375 6150 3225
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 5550 2400 168 168 5550 2400 5625 2250
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 4875 3375 168 168 4875 3375 4950 3225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 5475 4200 4950 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 5625 4200 6150 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 5625 2550 6150 3225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 5475 2550 4950 3225
--6
-6 9450 2175 11250 4575
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 9675 3375 168 168 9675 3375 9750 3525
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 11025 3375 168 168 11025 3375 10950 3525
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 10350 2400 168 168 10350 2400 10275 2250
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 11025 3375 168 168 11025 3375 10950 3225
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 10350 2400 168 168 10350 2400 10425 2250
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 9675 3375 168 168 9675 3375 9750 3225
-1 3 0 1 0 7 50 -1 -1 0.000 0 -0.0000 9675 4332 168 168 9675 4332 9600 4482
-1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 11025 4350 168 168 11025 4350 11100 4500
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 10425 2550 10950 3225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 10275 2550 9750 3225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 9675 3525 9675 4200
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 11025 3525 11025 4200
--6
-6 7200 3300 8475 3525
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7200 3300 8475 3300 8475 3525 7200 3525 7200 3300
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7275 3300 7275 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7350 3300 7350 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7425 3300 7425 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7500 3300 7500 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7575 3300 7575 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7650 3300 7650 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7725 3300 7725 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7800 3300 7800 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7875 3300 7875 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7950 3300 7950 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8025 3300 8025 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8100 3300 8100 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8250 3300 8250 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8325 3300 8325 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8400 3300 8400 3525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8175 3300 8175 3525
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 6600 3000 6225 3000
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 7725 3750 8025 3750
-2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4050 2025 4050 5250
-4 0 0 50 -1 0 16 0.0000 4 210 1260 6750 3075 writeObject()\001
-4 0 0 50 -1 0 16 0.0000 4 210 1185 8100 3825 readObject()\001
-4 0 0 50 -1 0 16 0.0000 4 210 4650 5625 4950 readObject() does not maintain referntial integrity\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/doc-files/data-serialization-exceptions.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/doc-files/data-serialization-exceptions.gif b/geode-core/src/main/java/com/gemstone/gemfire/doc-files/data-serialization-exceptions.gif
deleted file mode 100644
index f2c98e0..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/doc-files/data-serialization-exceptions.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/doc-files/class-hierarchy.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/doc-files/class-hierarchy.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/doc-files/class-hierarchy.fig
deleted file mode 100644
index 85756e6..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/doc-files/class-hierarchy.fig
+++ /dev/null
@@ -1,224 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 225 5550 10500 9450
-6 225 7800 2550 9450
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 225 7800 2550 7800 2550 9450 225 9450 225 7800
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 225 8175 2550 8175
-4 0 0 50 -1 2 12 0.0000 4 180 2055 375 8025 RemoteApplicationProcess\001
-4 0 0 50 -1 -1 12 0.0000 4 180 585 450 8400 id : long\001
-4 0 0 50 -1 -1 12 0.0000 4 180 1005 450 8640 processId : int\001
-4 0 0 50 -1 -1 12 0.0000 4 180 1530 450 8880 javaProcess : boolean\001
-4 0 0 50 -1 -1 12 0.0000 4 135 1365 450 9120 hasCache : boolean\001
-4 0 0 50 -1 -1 12 0.0000 4 180 945 450 9360 name : String\001
--6
-6 2550 7800 4500 8025
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2550 8025 4500 8025
-4 0 0 50 -1 -1 12 0.0000 4 75 90 2625 7950 *\001
-4 0 0 50 -1 -1 12 0.0000 4 135 1410 3000 7950 connectedProcesses\001
--6
-6 4500 7725 7725 9375
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4500 9375 7725 9375 7725 7725 4500 7725 4500 9375
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4500 8100 7725 8100
-4 0 0 50 -1 -1 12 0.0000 4 180 1185 4575 8325 gemfireDir : File\001
-4 0 0 50 -1 -1 12 0.0000 4 135 1125 4575 8565 birthDate : Date\001
-4 0 0 50 -1 -1 12 0.0000 4 165 1515 4575 8805 lockInfo : LockInfo[]\001
-4 0 0 50 -1 -1 12 0.0000 4 165 2205 4575 9045 lockListeners : LockListeners[]\001
-4 0 0 50 -1 -1 12 0.0000 4 165 3045 4575 9285 connectionListeners : ConnectionListener[]\001
-4 0 0 50 -1 2 12 0.0000 4 180 1470 5400 7950 RemoteGfManager\001
--6
-6 8550 7725 10500 8625
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8550 8625 10500 8625 10500 7725 8550 7725 8550 8625
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8550 8100 10500 8100
-4 0 0 50 -1 2 12 0.0000 4 180 1785 8625 7950 RemoteApplicationVM\001
-4 0 0 50 -1 -1 12 0.0000 4 180 1440 8625 8325 sharedLog : boolean\001
-4 0 0 50 -1 -1 12 0.0000 4 135 1500 8625 8565 sharedStats : boolean\001
--6
-6 7050 5550 8850 6975
-6 7050 5550 8850 6975
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7050 5850 8850 5850
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7050 6975 8850 6975 8850 5550 7050 5550 7050 6975
-4 0 0 50 -1 3 12 0.0000 4 135 1485 7275 5775 RemoteGemFireVM\001
-4 0 0 50 -1 -1 12 0.0000 4 135 1035 7125 6150 id: Serializable\001
-4 0 0 50 -1 -1 12 0.0000 4 180 945 7125 6390 name : String\001
-4 0 0 50 -1 -1 12 0.0000 4 135 1305 7125 6630 host : InetAddress\001
-4 0 0 50 -1 -1 12 0.0000 4 180 885 7125 6870 sysDir : File\001
--6
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4
-	 6225 7725 6225 7425 9450 7425 9450 7725
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 7950 7425 7950 6975
--6
-6 150 2025 5325 7500
-6 375 2625 1875 2925
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 375 2625 1875 2625 1875 2925 375 2925 375 2625
-4 0 0 50 -1 1 12 0.0000 4 180 1215 450 2850 TransportConfig\001
--6
-6 150 3825 2250 4800
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 150 3825 2250 3825 2250 4800 150 4800 150 3825
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 150 4200 2250 4200
-4 0 0 50 -1 0 12 0.0000 4 165 1365 450 4425 isMcast() : boolean\001
-4 0 0 50 -1 2 12 0.0000 4 180 1905 225 4050 RemoteTransportConfig\001
-4 0 0 50 -1 0 12 0.0000 4 180 1485 450 4665 bindAddress : String\001
--6
-6 3225 3825 5250 5100
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3225 4200 5250 4200
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3225 3825 5250 3825 5250 5100 3225 5100 3225 3825
-4 0 0 50 -1 0 12 0.0000 4 135 1305 3450 4500 host : InetAddress\001
-4 0 0 50 -1 0 12 0.0000 4 180 600 3450 4740 port : int\001
-4 0 0 50 -1 0 12 0.0000 4 180 1485 3450 4980 bindAddress : String\001
-4 0 0 50 -1 2 12 0.0000 4 135 1725 3300 4050 DistributionLocatorId\001
--6
-6 1875 5850 3600 7500
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1875 6150 3600 6150
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1875 7500 3600 7500 3600 5850 1875 5850 1875 7500
-4 0 0 50 -1 -1 12 0.0000 4 135 1230 1950 6450 enabled : boolean\001
-4 0 0 50 -1 -1 12 0.0000 4 180 1230 1950 6690 protocols : String\001
-4 0 0 50 -1 -1 12 0.0000 4 180 1080 1950 6930 ciphers : String\001
-4 0 0 50 -1 -1 12 0.0000 4 180 1545 1950 7170 boolean : requireAuth\001
-4 0 0 50 -1 -1 12 0.0000 4 180 1560 1950 7410 properties : Properties\001
-4 0 0 50 -1 2 12 0.0000 4 180 855 2325 6075 SSLConfig\001
--6
-6 3150 2025 5325 3450
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3150 2025 5325 2025 5325 3450 3150 3450 3150 2025
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3150 2400 5325 2400
-4 0 0 50 -1 -1 12 0.0000 4 180 1500 3300 2625 displayName : String\001
-4 0 0 50 -1 -1 12 0.0000 4 180 1320 3300 2865 logger : LogWriter\001
-4 0 0 50 -1 -1 12 0.0000 4 180 930 3300 3105 logLevel : int\001
-4 0 0 50 -1 -1 12 0.0000 4 135 1935 3300 3345 alertListener : AlertListener\001
-4 0 0 50 -1 2 12 0.0000 4 180 1875 3300 2250 GfManagerAgentConfig\001
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 1050 3825 1050 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2250 3975 3225 3975
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 2250 4500 3225 4500
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 1800 4800 2250 5850
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 3825 5100 3075 5850
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 60.00 120.00
-	 1875 2775 3150 2775
-4 0 0 50 -1 0 12 0.0000 4 135 210 2400 3900 ids\001
-4 0 0 50 -1 0 12 0.0000 4 75 90 3000 3900 *\001
-4 0 0 50 -1 0 12 0.0000 4 135 555 2325 4425 mcastId\001
-4 0 0 50 -1 -1 12 0.0000 4 180 690 2100 5250 sslConfig\001
-4 0 0 50 -1 -1 12 0.0000 4 180 690 3600 5550 sslConfig\001
--6
-6 6600 2025 12300 2700
-6 6600 2100 9300 2700
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6600 2400 9300 2400
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6600 2100 9300 2100 9300 2700 6600 2700 6600 2100
-4 0 0 50 -1 2 12 0.0000 4 180 1935 6975 2325 RemoteGfManagerAgent\001
-4 0 0 50 -1 -1 12 0.0000 4 180 1485 6750 2625 licsenseType : String\001
--6
-6 9300 2025 10725 2250
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9300 2250 10725 2250
-4 0 0 50 -1 -1 12 0.0000 4 135 585 9450 2175 listeners\001
-4 0 0 50 -1 -1 12 0.0000 4 75 90 10500 2175 *\001
--6
-6 10725 2100 12300 2400
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 10725 2100 12300 2100 12300 2400 10725 2400 10725 2100
-4 0 0 50 -1 3 12 0.0000 4 150 1350 10875 2325 JoinLeaveListener\001
--6
--6
-6 9450 5550 11025 6150
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9450 6150 11025 6150 11025 5550 9450 5550 9450 6150
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9450 5850 11025 5850
-4 0 0 50 -1 2 12 0.0000 4 180 1080 9750 5775 AdminRegion\001
-4 0 0 50 -1 -1 12 0.0000 4 180 1425 9525 6075 globalName : String\001
--6
-6 9900 4725 10500 5025
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9900 4725 10500 4725 10500 5025 9900 5025 9900 4725
-4 0 0 50 -1 1 12 0.0000 4 180 495 9975 4950 Region\001
--6
-6 11475 4725 12825 5025
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 11475 4725 12825 4725 12825 5025 11475 5025 11475 4725
-4 0 0 50 -1 1 12 0.0000 4 180 1185 11550 4950 RegionAttributes\001
--6
-6 11100 6525 13125 6825
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 11100 6525 13125 6525 13125 6825 11100 6825 11100 6525
-4 0 0 50 -1 2 12 0.0000 4 180 1920 11175 6750 RemoteRegionAttributes\001
--6
-6 4350 5550 6525 6975
-6 4425 6000 6450 6975
-4 0 0 50 -1 -1 12 0.0000 4 180 945 4425 6150 name : String\001
-4 0 0 50 -1 -1 12 0.0000 4 135 450 4425 6390 id : int\001
-4 0 0 50 -1 -1 12 0.0000 4 135 1140 4425 6630 closed : boolean\001
-4 0 0 50 -1 -1 12 0.0000 4 180 1980 4425 6870 rootRegionNames : String[]\001
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4350 5925 6525 5925
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4350 6975 6525 6975 6525 5550 4350 5550 4350 6975
-4 0 0 50 -1 2 12 0.0000 4 135 1395 4725 5775 RemoteCacheInfo\001
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6825 2700 6825 7725
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 9075 2700 9075 7725
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 6600 2250 5325 2250
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 7050 5700 6525 5700
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 8850 5700 9450 5700
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 10200 5550 10200 5025
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	1 0 1.00 120.00 120.00
-	 12075 6525 12075 5025
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 10350 6150 11100 6675
-4 0 0 50 -1 -1 12 0.0000 4 75 90 9150 7725 *\001
-4 0 0 50 -1 -1 12 0.0000 4 75 90 6900 7725 *\001
-4 0 0 50 -1 -1 12 0.0000 4 135 675 6075 3000 managers\001
-4 0 0 50 -1 -1 12 0.0000 4 180 450 6075 2175 config\001
-4 0 0 50 -1 -1 12 0.0000 4 75 90 9300 5625 *\001
-4 0 0 50 -1 -1 12 0.0000 4 135 645 9150 3000 members\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/doc-files/class-hierarchy.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/doc-files/class-hierarchy.gif b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/doc-files/class-hierarchy.gif
deleted file mode 100644
index 9cef97a..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/doc-files/class-hierarchy.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/BucketAdvisor-state.png
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/BucketAdvisor-state.png b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/BucketAdvisor-state.png
deleted file mode 100644
index 7f58ca0..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/BucketAdvisor-state.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/eventmatrix.xls
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/eventmatrix.xls b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/eventmatrix.xls
deleted file mode 100644
index 769698a..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/eventmatrix.xls and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/extensible-hashing.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/extensible-hashing.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/extensible-hashing.fig
deleted file mode 100644
index 1a33d46..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/extensible-hashing.fig
+++ /dev/null
@@ -1,159 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 8700 2550 9975 3300
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8700 2550 9975 2550 9975 3300 8700 3300 8700 2550
-4 0 0 50 -1 0 12 0.0000 4 180 1095 8775 3000 localDepth = 2\001
-4 0 0 50 -1 0 12 0.0000 4 135 1005 8775 3225 locations = ...\001
-4 0 0 50 -1 2 12 0.0000 4 135 1005 8775 2775 BucketInfo2\001
--6
-6 8700 3450 9975 4200
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8700 3450 9975 3450 9975 4200 8700 4200 8700 3450
-4 0 0 50 -1 0 12 0.0000 4 180 1095 8775 3900 localDepth = 3\001
-4 0 0 50 -1 0 12 0.0000 4 135 1005 8775 4125 locations = ...\001
-4 0 0 50 -1 2 12 0.0000 4 135 1005 8775 3675 BucketInfo3\001
--6
-6 8700 1650 9975 2400
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8700 1650 9975 1650 9975 2400 8700 2400 8700 1650
-4 0 0 50 -1 0 12 0.0000 4 180 1095 8775 2100 localDepth = 2\001
-4 0 0 50 -1 0 12 0.0000 4 135 1005 8775 2325 locations = ...\001
-4 0 0 50 -1 2 12 0.0000 4 135 1005 8775 1875 BucketInfo1\001
--6
-6 8700 750 9975 1500
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8700 750 9975 750 9975 1500 8700 1500 8700 750
-4 0 0 50 -1 2 12 0.0000 4 135 1005 8775 975 BucketInfo0\001
-4 0 0 50 -1 0 12 0.0000 4 180 1095 8775 1200 localDepth = 2\001
-4 0 0 50 -1 0 12 0.0000 4 135 1005 8775 1425 locations = ...\001
--6
-6 900 1875 1800 3075
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1275 2775 1800 2775
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 1275 1875 1800 1875 1800 3075 1275 3075 1275 1875
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1275 2175 1800 2175
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 1275 2475 1800 2475
-4 0 0 50 -1 0 12 0.0000 4 135 180 900 3000 11\001
-4 0 0 50 -1 0 12 0.0000 4 135 180 900 2700 10\001
-4 0 0 50 -1 0 12 0.0000 4 135 180 900 2400 01\001
-4 0 0 50 -1 0 12 0.0000 4 135 180 900 2100 00\001
--6
-6 2250 2550 3525 3300
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2250 2550 3525 2550 3525 3300 2250 3300 2250 2550
-4 0 0 50 -1 0 12 0.0000 4 180 1095 2325 3000 localDepth = 2\001
-4 0 0 50 -1 0 12 0.0000 4 135 1005 2325 3225 locations = ...\001
-4 0 0 50 -1 2 12 0.0000 4 135 1005 2325 2775 BucketInfo2\001
--6
-6 2250 3450 3525 4200
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2250 3450 3525 3450 3525 4200 2250 4200 2250 3450
-4 0 0 50 -1 2 12 0.0000 4 135 1005 2325 3675 BucketInfo3\001
-4 0 0 50 -1 0 12 0.0000 4 180 1095 2325 3900 localDepth = 2\001
-4 0 0 50 -1 0 12 0.0000 4 135 1005 2325 4125 locations = ...\001
--6
-6 2250 1650 3525 2400
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2250 1650 3525 1650 3525 2400 2250 2400 2250 1650
-4 0 0 50 -1 2 12 0.0000 4 135 1005 2325 1875 BucketInfo1\001
-4 0 0 50 -1 0 12 0.0000 4 180 1095 2325 2100 localDepth = 2\001
-4 0 0 50 -1 0 12 0.0000 4 135 1005 2325 2325 locations = ...\001
--6
-6 2250 750 3525 1500
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2250 750 3525 750 3525 1500 2250 1500 2250 750
-4 0 0 50 -1 2 12 0.0000 4 135 1005 2325 975 BucketInfo0\001
-4 0 0 50 -1 0 12 0.0000 4 180 1095 2325 1200 localDepth = 2\001
-4 0 0 50 -1 0 12 0.0000 4 135 1005 2325 1425 locations = ...\001
--6
-6 8700 4350 9975 5100
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8700 4350 9975 4350 9975 5100 8700 5100 8700 4350
-4 0 0 50 -1 2 12 0.0000 4 135 1005 8775 4575 BucketInfo7\001
-4 0 0 50 -1 0 12 0.0000 4 180 1095 8775 4800 localDepth = 3\001
-4 0 0 50 -1 0 12 0.0000 4 135 1005 8775 5025 locations = ...\001
--6
-6 3975 2250 6225 3300
-4 0 0 50 -1 1 12 0.0000 4 135 1980 3975 2400 When Bucket3 reaches the\001
-4 0 0 50 -1 1 12 0.0000 4 180 2190 3975 2625 maximum size, it is split into\001
-4 0 0 50 -1 1 12 0.0000 4 135 1935 3975 2850 two buckets: Bucket3 and\001
-4 0 0 50 -1 1 12 0.0000 4 135 2190 3975 3075 Bucket7.  Three bits are used\001
-4 0 0 50 -1 1 12 0.0000 4 135 1035 3975 3300 to index data.\001
--6
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 8250 1950 8700 1125
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 8250 2325 8700 2025
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 8250 2625 8700 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 8250 2925 8700 3750
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 1800 1950 2250 1125
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 1800 2325 2250 2025
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 1800 2625 2250 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 1800 2925 2250 3750
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7725 2775 8250 2775
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7725 1875 8250 1875 8250 3075 7725 3075 7725 1875
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7725 2175 8250 2175
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7725 2475 8250 2475
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7725 3975 8250 3975
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7725 3075 8250 3075 8250 4275 7725 4275 7725 3075
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7725 3375 8250 3375
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7725 3675 8250 3675
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 8250 3225 8700 1200
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 8250 3525 8700 2025
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 8250 3825 8700 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 8250 4125 8700 4725
-4 0 0 50 -1 2 12 0.0000 4 180 1365 6825 1275 BucketDirectory\001
-4 0 0 50 -1 0 12 0.0000 4 180 1200 6825 1500 globalDepth = 3\001
-4 0 0 50 -1 2 12 0.0000 4 180 1365 375 1275 BucketDirectory\001
-4 0 0 50 -1 0 12 0.0000 4 180 1200 375 1500 globalDepth = 2\001
-4 0 0 50 -1 0 12 0.0000 4 135 270 7350 3000 011\001
-4 0 0 50 -1 0 12 0.0000 4 135 270 7350 2700 010\001
-4 0 0 50 -1 0 12 0.0000 4 135 270 7350 2400 001\001
-4 0 0 50 -1 0 12 0.0000 4 135 270 7350 2100 000\001
-4 0 0 50 -1 0 12 0.0000 4 135 270 7350 4200 111\001
-4 0 0 50 -1 0 12 0.0000 4 135 270 7350 3900 110\001
-4 0 0 50 -1 0 12 0.0000 4 135 270 7350 3600 101\001
-4 0 0 50 -1 0 12 0.0000 4 135 270 7350 3300 100\001
-4 0 0 50 -1 0 12 0.0000 4 135 405 675 1800 mask\001
-4 0 0 50 -1 0 12 0.0000 4 135 405 7200 1800 mask\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/extensible-hashing.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/extensible-hashing.gif b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/extensible-hashing.gif
deleted file mode 100644
index 58366a7..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/extensible-hashing.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-get-flow.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-get-flow.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-get-flow.fig
deleted file mode 100644
index d51af17..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-get-flow.fig
+++ /dev/null
@@ -1,349 +0,0 @@
-#FIG 3.2
-Portrait
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 4275 225 9825 1050
-2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
-	 4275 225 9825 225 9825 1050 4275 1050 4275 225
-4 0 0 50 0 0 13 0.0000 4 150 5085 4441 450 This flowchart describes the series of actions that are taken\001
-4 0 0 50 0 0 13 0.0000 6 210 5220 4441 930 $Id$\001
-4 0 0 50 0 0 13 0.0000 4 195 4170 4441 690 when a value is requested from a JCache region.\001
--6
-6 2025 975 3975 1575
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 3975 1575 3975 975 2100 975 2100 1575 3975 1575
-4 1 0 50 0 0 12 0.0000 4 180 1815 3000 1200 User requests the value\001
-4 1 0 50 0 0 12 0.0000 4 180 1425 3000 1440 of a key in a region\001
--6
-6 1350 8325 3750 8625
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 3750 8625 3750 8325 1350 8325 1350 8625 3750 8625
-4 1 0 50 0 0 12 0.0000 4 180 2250 2550 8550 Define the entry, if necessary\001
--6
-6 4575 9075 6525 9375
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 4575 9375 4575 9075 6525 9075 6525 9375 4575 9375
-4 1 0 50 0 0 12 0.0000 4 180 1860 5550 9300 Store key/value in region\001
--6
-6 750 3075 2400 3525
-4 1 0 50 0 0 12 0.0000 4 180 1605 1575 3225 [Does entry or region\001
-4 1 0 50 0 0 12 0.0000 4 180 1635 1575 3465 have a cache loader?]\001
--6
-6 2250 4500 3300 5550
-6 2250 4500 3300 4800
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 3300 4800 3300 4500 2250 4500 2250 4800 3300 4800
-4 1 0 50 0 0 12 0.0000 4 135 825 2775 4725 Return null\001
--6
-6 2550 4800 3000 5550
-6 2550 5100 3000 5550
-6 2625 5175 2925 5475
-1 3 0 1 0 0 50 0 20 0.000 1 0.0000 2775 5325 106 106 2775 5325 2881 5325
--6
-1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 2775 5325 168 168 2775 5325 2700 5175
--6
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 2775 4800 2775 5175
--6
--6
-6 600 4500 2100 5025
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 2100 5025 2100 4500 600 4500 600 5025 2100 5025
-4 1 0 50 0 0 12 0.0000 4 135 1425 1350 4725 Invoke the loader's\001
-4 1 0 50 0 0 12 0.0000 4 180 1065 1350 4965 load() method\001
--6
-6 5475 11775 6600 12075
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 6600 12075 6600 11775 5475 11775 5475 12075 6600 12075
-4 0 0 50 0 0 12 0.0000 4 135 960 5550 12000 Return value\001
--6
-6 2775 7725 4425 8025
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 4425 8025 4425 7725 2775 7725 2775 8025 4425 8025
-4 1 0 50 0 0 12 0.0000 4 135 1530 3600 7950 Perform a "net load"\001
--6
-6 2925 6900 4575 7350
-4 1 0 50 0 0 12 0.0000 4 180 1620 3750 7050 [Can another member\001
-4 1 0 50 0 0 12 0.0000 4 180 1185 3750 7290 load the value?]\001
--6
-6 4500 7725 5550 8700
-6 4500 7725 5550 8025
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 5550 8025 5550 7725 4500 7725 4500 8025 5550 8025
-4 1 0 50 0 0 12 0.0000 4 135 825 5025 7950 Return null\001
--6
-6 4800 8025 5250 8700
-6 4800 8250 5250 8700
-6 4875 8325 5175 8625
-1 3 0 1 0 0 50 0 20 0.000 1 0.0000 5025 8475 106 106 5025 8475 5131 8475
--6
-1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 5025 8475 168 168 5025 8475 4950 8325
--6
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 5025 8025 5025 8325
--6
--6
-6 3825 5100 5325 5625
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 5325 5625 5325 5100 3825 5100 3825 5625 5325 5625
-4 1 0 50 0 0 12 0.0000 4 180 1470 4575 5325 Request value from\001
-4 1 0 50 0 0 12 0.0000 4 135 1125 4575 5565 other members\001
--6
-6 3825 4500 5625 4800
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 5625 4800 5625 4500 3825 4500 3825 4800 5625 4800
-4 1 0 50 0 0 12 0.0000 4 135 1725 4725 4725 Perform a "net search"\001
--6
-6 7275 5850 8625 6375
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 8625 6375 8625 5850 7275 5850 7275 6375 8625 6375
-4 1 0 50 0 0 12 0.0000 4 180 1110 7950 6075 Get ownership\001
-4 1 0 50 0 0 12 0.0000 4 180 585 7950 6315 of entry\001
--6
-6 8175 6450 9825 6900
-4 1 0 50 0 0 12 0.0000 4 180 1605 9000 6600 [Does entry or region\001
-4 1 0 50 0 0 12 0.0000 4 180 1635 9000 6840 have a cache loader?]\001
--6
-6 8400 7200 9900 7725
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 9900 7725 9900 7200 8400 7200 8400 7725 9900 7725
-4 1 0 50 0 0 12 0.0000 4 135 1425 9150 7425 Invoke the loader's\001
-4 1 0 50 0 0 12 0.0000 4 180 1065 9150 7665 load() method\001
--6
-6 2700 5850 4500 6300
-4 1 0 50 0 0 12 0.0000 4 180 1725 3600 6000 [Does another member\001
-4 1 0 50 0 0 12 0.0000 4 180 1230 3600 6240 have the value?]\001
--6
-6 6000 5475 6750 5925
-4 1 0 50 0 0 12 0.0000 4 180 720 6375 5625 [Is region\001
-4 1 0 50 0 0 12 0.0000 4 180 585 6375 5865 global?]\001
--6
-6 4275 10575 5925 11100
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 5925 11100 5925 10575 4275 10575 4275 11100 5925 11100
-4 1 0 50 0 0 12 0.0000 4 180 1440 5100 10800 Release ownership\001
-4 1 0 50 0 0 12 0.0000 4 180 585 5100 11040 of entry\001
--6
-6 7575 10575 9225 11100
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 7575 11100 7575 10575 9225 10575 9225 11100 7575 11100
-4 1 0 50 0 0 12 0.0000 4 135 1530 8400 10800 Invoke the listener's\001
-4 1 0 50 0 0 12 0.0000 4 180 1110 8400 11040 objectAdded()\001
--6
-6 7425 9750 9375 10200
-6 7425 9750 9375 10200
-4 1 0 50 0 0 12 0.0000 4 180 1680 8400 10140 object event listener?]\001
-4 1 0 50 0 0 12 0.0000 4 180 1815 8400 9900 [Does the entry have an\001
--6
--6
-6 6600 12675 7050 13125
-6 6675 12750 6975 13050
-1 3 0 1 0 0 50 0 20 0.000 1 0.0000 6825 12900 106 106 6825 12900 6931 12900
--6
-1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 6825 12900 168 168 6825 12900 6750 12750
--6
-6 600 8925 2400 9375
-4 1 0 50 0 0 12 0.0000 4 180 1665 1500 9075 [Does the region have\001
-4 1 0 50 0 0 12 0.0000 4 180 1725 1500 9315 an eviction controller?]\001
--6
-6 1500 5175 2400 5625
-4 1 0 50 0 0 12 0.0000 4 180 840 1950 5325 [Did loader\001
-4 1 0 50 0 0 12 0.0000 4 180 900 1950 5565 return null?]\001
--6
-6 675 9900 2475 10500
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 2475 10500 2475 9900 675 9900 675 10500 2475 10500
-4 1 0 50 0 0 12 0.0000 4 180 1560 1575 10125 evict Entries making\001
-4 1 0 50 0 0 12 0.0000 4 180 1710 1575 10365 space for loaded Entry\001
--6
-1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3000 300 106 106 3000 300 3106 300
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 3000 975 3000 375
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2850 2025 3000 1875 3150 2025 3000 2175 2850 2025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2250 2550 2400 2400 2550 2550 2400 2700 2250 2550
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2850 2025 2400 2025 2400 2400
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 3000 1875 3000 1575
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 2250 2550 225 2550 225 11925 5475 11925
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2325 9525 2475 9375 2625 9525 2475 9675 2325 9525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2325 9525 1575 9525 1575 9900
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2325 10800 2475 10650 2625 10800 2475 10950 2325 10800
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 1575 10500 1575 10800 2325 10800
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 2625 9525 3000 9525 3000 10800 2625 10800
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 5
-	0 0 1.00 120.00 120.00
-	 2475 10950 2475 11250 3675 11250 3675 9225 4575 9225
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 2475 8625 2475 9375
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 4425 6375 2475 6375 2475 8325
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 5100 11100 5100 11325 5925 11325
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 6225 10275 6600 10275 6600 11325 6225 11325
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 5925 11325 6075 11175 6225 11325 6075 11475 5925 11325
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7425 11325 7275 11175 7125 11325 7275 11475 7425 11325
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 8325 11100 8325 11325 7425 11325
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 7125 10275 6825 10275 6825 11325 7125 11325
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 6600 9675 6600 9825 6075 9825 6075 10125
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 6825 9675 6825 9825 7275 9825 7275 10125
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 7275 11475 7275 11775 6900 11775 6900 12525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3225 4125 3375 3975 3525 4125 3375 4275 3225 4125
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 3
-	 2700 3600 3375 3600 3375 3975
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2400 3600 2550 3450 2700 3600 2550 3750 2400 3600
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2400 3600 1350 3600 1350 4500
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 4575 6225 4575 5625
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3525 4125 4125 4125 4125 4500
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3675 3075 5100 3075 5100 4500
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 6525 9225 6750 9225 6750 9675
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 6825 12525 6825 12750
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 6075 11475 6075 11775
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 6075 12075 6075 12225 6675 12225 6675 12525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3375 3075 2550 3075 2550 3450
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4500 7350 4650 7200 4800 7350 4650 7500 4500 7350
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 4500 7350 3600 7350 3600 7725
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 4800 7350 5025 7350 5025 7725
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 3600 8025 3600 8325
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3150 2025 3525 2025 3525 2550
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 1200 5700 1350 5550 1500 5700 1350 5850 1200 5700
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 1350 5550 1350 5025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 5
-	0 0 1.00 120.00 120.00
-	 1200 5700 975 5700 975 7725 1875 7725 1875 8325
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 4575 4800 4575 5100
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 1500 5700 3450 5700 3450 4650 3825 4650
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 7950 6750 7950 6375
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 8100 6900 9150 6900 9150 7200
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7800 6900 7950 6750 8100 6900 7950 7050 7800 6900
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 9150 8250 7275 8250 7275 6900
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 9300 7725 9300 8100
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 5
-	0 0 1.00 120.00 120.00
-	 9300 8400 9300 8850 4125 8850 4125 8475 3750 8475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 7800 6900 4650 6900 4650 7200
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4425 6375 4575 6225 4725 6375 4575 6525 4425 6375
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 5550 6075 5700 5925 5850 6075 5700 6225 5550 6075
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 5550 6075 5325 6075 5325 6900
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 5
-	0 0 1.00 120.00 120.00
-	 5700 5925 5700 5700 5025 5700 5025 6375 4725 6375
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 5850 6075 7275 6075
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 9150 8250 9300 8100 9450 8250 9300 8400 9150 8250
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 5925 10275 6075 10125 6225 10275 6075 10425 5925 10275
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 5925 10275 5100 10275 5100 10575
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7425 10275 7275 10125 7125 10275 7275 10425 7425 10275
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 7425 10275 8325 10275 8325 10575
-2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 6450 9675 6975 9675
-2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 6525 12525 7125 12525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3375 3075 3525 2925 3675 3075 3525 3225 3375 3075
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2550 2550 3525 2550 3525 2925
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3225 4125 2775 4125 2775 4500
-4 1 0 50 0 0 12 0.0000 4 180 1665 2025 1875 [Is the entry defined?]\001
-4 1 0 50 0 0 12 0.0000 4 180 1695 1500 2325 [Is the value present?]\001
-4 1 0 50 0 0 12 0.0000 4 180 1785 8325 8175 [Did loader return null?]\001
-4 1 0 50 0 0 12 0.0000 4 180 1350 5250 10200 [Is region global?]\001
-4 1 0 50 0 0 12 0.0000 4 180 2070 4650 2925 [Is region globally scoped?]\001
-4 1 0 50 0 0 12 0.0000 4 180 1260 2625 3975 [Is region local?]\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-get-flow.pdf
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-get-flow.pdf b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-get-flow.pdf
deleted file mode 100644
index 5c6a4d0..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-get-flow.pdf and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-put-flow.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-put-flow.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-put-flow.fig
deleted file mode 100644
index 6f3a5ca..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-put-flow.fig
+++ /dev/null
@@ -1,359 +0,0 @@
-#FIG 3.2
-Portrait
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 6600 12150 7500 12450
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 7500 12450 7500 12150 6600 12150 6600 12450 7500 12450
-4 1 0 50 0 0 12 0.0000 4 180 705 7050 12375 Entry put\001
--6
-6 6825 12675 7275 13125
-6 6900 12750 7200 13050
-1 3 0 1 0 0 50 0 20 0.000 1 0.0000 7050 12900 106 106 7050 12900 7156 12900
--6
-1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 7050 12900 168 168 7050 12900 6975 12750
--6
-6 6075 7275 8025 7575
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 8025 7575 8025 7275 6075 7275 6075 7575 8025 7575
-4 1 0 50 0 0 12 0.0000 4 180 1860 7050 7500 Store key/value in region\001
--6
-6 1875 2325 3375 2625
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 3375 2625 3375 2325 1875 2325 1875 2625 3375 2625
-4 1 0 50 0 0 12 0.0000 4 180 1440 2625 2550 Define a new entry\001
--6
-6 1125 3750 2475 4350
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 2400 4350 2400 3750 1125 3750 1125 4350 2400 4350
-4 1 0 50 0 0 12 0.0000 4 135 915 1800 3975 Use custom\001
-4 1 0 50 0 0 12 0.0000 4 180 1245 1800 4215 object attributes\001
--6
-6 2700 3750 4425 4350
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 4425 4350 4425 3750 2700 3750 2700 4350 4425 4350
-4 1 0 50 0 0 12 0.0000 4 180 1395 3600 3975 Use default object\001
-4 1 0 50 0 0 12 0.0000 4 180 1635 3600 4215 attributes from region\001
--6
-6 2925 750 4275 1350
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 4275 1350 4275 750 2925 750 2925 1350 4275 1350
-4 1 0 50 0 0 12 0.0000 4 180 1260 3600 1215 pair into a region\001
-4 1 0 50 0 0 12 0.0000 4 180 1155 3600 975 Put a key/value\001
--6
-6 4575 375 10050 1200
-2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
-	 4575 375 10050 375 10050 1200 4575 1200 4575 375
-4 0 0 50 0 0 13 0.0000 4 150 5085 4738 600 This flowchart describes the series of actions that are taken\001
-4 0 0 50 0 0 13 0.0000 4 195 3840 4738 840 when a key/value is place in a JCache region\001
-4 0 0 50 0 0 13 0.0000 6 210 5220 4738 1080 \001
--6
-6 900 2775 2400 3225
-4 1 0 50 0 0 12 0.0000 4 180 1380 1650 3165 object attributes?]\001
-4 1 0 50 0 0 12 0.0000 4 180 1395 1650 2925 [Did caller specify\001
--6
-6 2250 8775 3900 9225
-4 1 0 50 0 0 12 0.0000 4 180 1155 3075 8925 [Was the value\001
-4 1 0 50 0 0 12 0.0000 4 180 1530 3075 9165 previously present?]\001
--6
-6 1875 9750 3825 10275
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 3825 10275 3825 9750 1875 9750 1875 10275 3825 10275
-4 1 0 50 0 0 12 0.0000 4 135 1530 2850 9975 Invoke the listener's\001
-4 1 0 50 0 0 12 0.0000 4 180 1830 2850 10215 objectReplaced() mthod\001
--6
-6 4200 9750 6000 10275
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 6000 10275 6000 9750 4200 9750 4200 10275 6000 10275
-4 1 0 50 0 0 12 0.0000 4 135 1530 5100 9975 Invoke the listener's\001
-4 1 0 50 0 0 12 0.0000 4 180 1710 5100 10215 objectAdded() method\001
--6
-6 7425 8925 8925 9225
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 8925 9225 8925 8925 7425 8925 7425 9225 8925 9225
-4 1 0 50 0 0 12 0.0000 4 180 1320 8175 9150 Distribute update\001
--6
-6 8475 10050 9525 10350
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 9525 10350 9525 10050 8475 10050 8475 10350 9525 10350
-4 1 0 50 0 0 12 0.0000 4 135 1035 9000 10275 Wait for acks\001
--6
-6 8325 11325 9975 11850
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 9975 11850 9975 11325 8325 11325 8325 11850 9975 11850
-4 1 0 50 0 0 12 0.0000 4 180 1440 9150 11550 Release ownership\001
-4 1 0 50 0 0 12 0.0000 4 180 585 9150 11790 of entry\001
--6
-6 9150 10500 9900 10950
-4 1 0 50 0 0 12 0.0000 4 180 720 9525 10650 [Is region\001
-4 1 0 50 0 0 12 0.0000 4 180 585 9525 10890 global?]\001
--6
-6 4350 2250 5850 2550
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 5850 2550 5850 2250 4350 2250 4350 2550 5850 2550
-4 1 0 50 0 0 12 0.0000 4 180 1275 5100 2475 Replace an entry\001
--6
-6 5175 5100 7125 5700
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 5175 5700 5175 5100 7125 5100 7125 5700 5175 5700
-4 1 0 50 0 0 12 0.0000 4 135 1680 6150 5325 Invoke the controller's\001
-4 1 0 50 0 0 12 0.0000 4 180 1635 6150 5565 beforeObjectAdded()\001
--6
-6 7425 5100 9375 5700
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 7425 5700 7425 5100 9375 5100 9375 5700 7425 5700
-4 1 0 50 0 0 12 0.0000 4 180 1845 8400 5565 beforeObjectReplaced()\001
-4 1 0 50 0 0 12 0.0000 4 135 1680 8400 5325 Invoke the controller's\001
--6
-6 4575 2700 7575 3900
-6 5475 3300 7575 3600
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 5475 3600 5475 3300 7575 3300 7575 3600 5475 3600
-4 1 0 50 0 0 12 0.0000 4 180 1965 6525 3525 Obtain ownership of entry\001
--6
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 5250 3000 5100 2850 4950 3000 5100 3150 5250 3000
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 5250 3000 6600 3000 6600 3300
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 5250 3750 5100 3600 4950 3750 5100 3900 5250 3750
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 3
-	0 0 1.00 120.00 120.00
-	 5250 3750 6600 3750 6600 3600
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 4950 3000 4575 3000 4575 3750 4950 3750
-4 1 0 50 0 0 12 0.0000 4 180 1350 6000 2850 [Is region global?]\001
--6
-6 4350 8100 6300 8550
-6 4350 8100 6300 8550
-4 1 0 50 0 0 12 0.0000 4 180 1860 5325 8250 [Does this entry have an\001
-4 1 0 50 0 0 12 0.0000 4 180 1680 5325 8490 object event listener?]\001
--6
--6
-6 300 5550 2400 5850
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 2400 5850 2400 5550 300 5550 300 5850 2400 5850
-4 1 0 50 0 0 12 0.0000 4 180 1965 1350 5775 Obtain ownership of entry\001
--6
-6 525 6300 2325 6750
-4 1 0 50 0 0 12 0.0000 4 180 1635 1425 6690 a eviction controller?]\001
-4 1 0 50 0 0 12 0.0000 4 180 1665 1425 6450 [Does the region have\001
--6
-6 450 7125 2250 7725
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 450 7725 450 7125 2250 7125 2250 7725 450 7725
-4 1 0 50 0 0 12 0.0000 4 180 1800 1350 7350 apply eviction algorithm\001
-4 1 0 50 0 0 12 0.0000 4 135 1560 1350 7590 to accomodate value\001
--6
-1 3 0 1 0 0 50 0 20 0.000 1 0.0000 3600 300 106 106 3600 300 3706 300
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 6975 7575 6975 7875
-2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 6750 7875 7200 7875
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7350 8625 7500 8475 7650 8625 7500 8775 7350 8625
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 7125 7875 7125 8100 7500 8100 7500 8475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 7650 8625 8100 8625 8100 8925
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7425 11025 7575 10875 7725 11025 7575 11175 7425 11025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 7350 8625 7125 8625 7125 11025 7425 11025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 7575 11175 7575 11400 7125 11400 7125 11775
-2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 6750 11775 7275 11775
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 7050 11775 7050 12150
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 7050 12450 7050 12750
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 6825 7875 6825 8100 6375 8100 6375 8475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6225 8625 6375 8475 6525 8625 6375 8775 6225 8625
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 6225 8625 4050 8625 4050 9150
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3450 1950 2550 1950 2550 2325
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 2550 3150 2550 2625
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2400 4725 2550 4575 2700 4725 2550 4875 2400 4725
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2400 3300 2550 3150 2700 3300 2550 3450 2400 3300
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2700 3300 3450 3300 3450 3750
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 3
-	0 0 1.00 120.00 120.00
-	 2400 4725 1725 4725 1725 4350
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3450 4350 3450 4725 2700 4725
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 3
-	0 0 1.00 120.00 120.00
-	 1725 3750 1725 3300 2400 3300
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3450 1950 3600 1800 3750 1950 3600 2100 3450 1950
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 3600 1800 3600 1350
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3600 750 3600 375
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3750 1950 5100 1950 5100 2250
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3900 9300 4050 9150 4200 9300 4050 9450 3900 9300
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3900 9300 2775 9300 2775 9750
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 4200 9300 5025 9300 5025 9750
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3900 10725 4050 10575 4200 10725 4050 10875 3900 10725
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2775 10275 2775 10725 3900 10725
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 5025 10275 5025 10725 4200 10725
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 6375 11175 6375 11400 6900 11400 6900 11775
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6225 11025 6375 10875 6525 11025 6375 11175 6225 11025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 6525 8625 6825 8625 6825 11025 6525 11025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 4050 10875 4050 11025 6225 11025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7950 9750 8100 9600 8250 9750 8100 9900 7950 9750
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 8250 9750 9000 9750 9000 10050
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 7950 9750 7575 9750 7575 10875
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 8850 11025 9000 10875 9150 11025 9000 11175 8850 11025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 9000 10350 9000 10875
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 9150 11025 9450 11025 9450 11325
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 8850 11025 7725 11025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 9075 11850 9075 12375 8100 12375 8100 11025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 5100 2550 5100 2850
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4950 6150 5100 6000 5250 6150 5100 6300 4950 6150
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 3
-	0 0 1.00 120.00 120.00
-	 5250 6150 7275 6150 7275 6075
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4950 4425 5100 4275 5250 4425 5100 4575 4950 4425
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 5250 4425 7275 4425 7275 4650
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 4950 4425 4575 4425 4575 6150 4950 6150
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 7425 4800 8325 4800 8325 5100
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 7125 4800 6225 4800 6225 5100
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 8325 5700 8325 5925 7425 5925
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 6225 5700 6225 5925 7125 5925
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7425 5925 7275 5775 7125 5925 7275 6075 7425 5925
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7425 4800 7275 4650 7125 4800 7275 4950 7425 4800
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 5100 3900 5100 4275
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 5100 6300 5100 6600 6975 6600 6975 7275
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 5
-	0 0 1.00 120.00 120.00
-	 2550 8250 2550 8550 3375 8550 3375 7425 6075 7425
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 2550 4875 2550 5100
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2400 5250 2550 5100 2700 5250 2550 5400 2400 5250
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2400 5250 1050 5250 1050 5550
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2400 6000 2550 5850 2700 6000 2550 6150 2400 6000
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 3
-	0 0 1.00 120.00 120.00
-	 2400 6000 1050 6000 1050 5850
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 2700 5250 3075 5250 3075 6000 2700 6000
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 2550 6150 2550 6675
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2700 6825 2550 6675 2400 6825 2550 6975 2700 6825
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2400 6825 1125 6825 1125 7125
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 2700 6825 3150 6825 3150 8100 2700 8100
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 3
-	0 0 1.00 120.00 120.00
-	 2400 8100 1125 8100 1125 7725
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2700 8100 2550 7950 2400 8100 2550 8250 2700 8100
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 8100 9225 8100 9600
-4 1 0 50 0 0 12 0.0000 4 180 1995 8625 8325 [Is the region distributed?]\001
-4 1 0 50 0 0 12 0.0000 4 180 435 7200 8475 [else]\001
-4 1 0 50 0 0 12 0.0000 4 180 435 6750 8475 [else]\001
-4 1 0 50 0 0 12 0.0000 4 180 435 3150 1800 [else]\001
-4 1 0 50 0 0 12 0.0000 4 180 1665 4725 1800 [Is the entry defined?]\001
-4 1 0 50 0 0 12 0.0000 4 180 435 3000 3225 [else]\001
-4 1 0 50 0 0 12 0.0000 4 180 1230 8925 9600 [Wait for acks?]\001
-4 1 0 50 0 0 12 0.0000 4 180 435 7650 9600 [else]\001
-4 1 0 50 0 0 12 0.0000 4 180 2715 8700 4725 [Was the value previously defined?]\001
-4 1 0 50 0 0 12 0.0000 4 180 3390 6825 4275 [Does the region have a capacity controller?]\001
-4 1 0 50 0 0 12 0.0000 4 180 1350 1650 5100 [Is region global?]\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-put-flow.pdf
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-put-flow.pdf b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-put-flow.pdf
deleted file mode 100644
index 7fa4390..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-put-flow.pdf and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-update-message-flow.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-update-message-flow.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-update-message-flow.fig
deleted file mode 100644
index 6bbff07..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-update-message-flow.fig
+++ /dev/null
@@ -1,334 +0,0 @@
-#FIG 3.2
-Portrait
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 5625 3150 6975 3675
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 5625 3675 5625 3150 6975 3150 6975 3675 5625 3675
-4 1 0 50 0 0 12 0.0000 4 180 1260 6300 3375 Define entry and\001
-4 1 0 50 0 0 12 0.0000 4 180 705 6300 3615 store key\001
--6
-6 6675 4800 8325 5325
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 6675 5325 6675 4800 8325 4800 8325 5325 6675 5325
-4 1 0 50 0 0 12 0.0000 4 135 1530 7500 5025 Invoke the listener's\001
-4 1 0 50 0 0 12 0.0000 4 180 915 7500 5265 keyAdded()\001
--6
-6 6675 3825 8475 4275
-4 1 0 50 0 0 12 0.0000 4 180 1800 7575 3975 [Does the region have a\001
-4 1 0 50 0 0 12 0.0000 4 180 1680 7575 4215 region event listener?]\001
--6
-6 2700 5925 4050 6450
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 4050 6450 4050 5925 2700 5925 2700 6450 4050 6450
-4 1 0 50 0 0 12 0.0000 4 180 645 3375 6390 in region\001
-4 1 0 50 0 0 12 0.0000 4 180 1170 3375 6150 Store key/value\001
--6
-6 3825 11400 4575 11700
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 3825 11700 3825 11400 4575 11400 4575 11700 3825 11700
-4 1 0 50 0 0 12 0.0000 4 135 690 4200 11625 Send ack\001
--6
-6 3225 300 4875 1350
-6 3225 825 4875 1350
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 3300 1350 3300 825 4800 825 4800 1350 3300 1350
-4 1 0 50 0 0 12 0.0000 4 180 1215 4050 1050 An entry update\001
-4 1 0 50 0 0 12 0.0000 4 180 1545 4050 1290 message is received\001
--6
-1 3 0 1 0 0 50 0 20 0.000 0 -0.0000 4050 450 106 106 4050 450 3944 450
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4050 825 4050 525
--6
-6 5100 375 10725 1200
-2 2 1 1 0 7 50 0 -1 4.000 0 0 -1 0 0 5
-	 5100 375 9900 375 9900 1200 5100 1200 5100 375
-4 0 0 50 0 0 12 0.0000 4 135 4560 5175 600 This flowchart describes the series of actions that are taken\001
-4 0 0 50 0 0 12 0.0000 6 195 5505 5175 1080 \001
-4 0 0 50 0 0 12 0.0000 4 180 4365 5175 840 when an JCache region entry update message is received.\001
--6
-6 225 4050 2325 4650
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 2325 4650 2325 4050 225 4050 225 4650 2325 4650
-4 1 0 50 0 0 12 0.0000 4 135 1680 1275 4275 Invoke the controller's\001
-4 1 0 50 0 0 12 0.0000 4 180 1845 1275 4515 beforeObjectReplaced()\001
--6
-6 2550 4050 4500 4650
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 4500 4650 4500 4050 2550 4050 2550 4650 4500 4650
-4 1 0 50 0 0 12 0.0000 4 135 1680 3525 4275 Invoke the controller's\001
-4 1 0 50 0 0 12 0.0000 4 180 1635 3525 4515 beforeObjectAdded()\001
--6
-6 6525 6000 7875 6450
-4 1 0 50 0 0 12 0.0000 4 180 1260 7200 6150 [Does the region\001
-4 1 0 50 0 0 12 0.0000 4 180 1125 7200 6390 mirror objects?\001
--6
-6 7500 6600 9150 7050
-4 1 0 50 0 0 12 0.0000 4 180 1515 8325 6750 [Does region have a\001
-4 1 0 50 0 0 12 0.0000 4 180 1500 8325 6990 capacitycontroller?]\001
--6
-6 7725 7500 9750 8025
-6 7875 7575 9675 7725
-4 1 0 50 0 0 12 0.0000 4 135 1680 8775 7725 Invoke the controller's\001
--6
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 9750 8025 9750 7500 7725 7500 7725 8025 9750 8025
-4 1 0 50 0 0 12 0.0000 4 180 1635 8775 7965 beforeObjectAdded()\001
--6
-6 6525 8775 8175 9300
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 6600 9300 6600 8775 8100 8775 8100 9300 6600 9300
-4 1 0 50 0 0 12 0.0000 4 180 1530 7350 9000 (Request and) store\001
-4 1 0 50 0 0 12 0.0000 4 180 1095 7350 9240 value in region\001
--6
-6 4575 12375 5025 13050
-6 4575 12600 5025 13050
-6 4650 12675 4950 12975
-1 3 0 1 0 0 50 0 20 0.000 1 0.0000 4800 12825 106 106 4800 12825 4906 12825
--6
-1 3 0 1 0 7 50 0 -1 0.000 1 0.0000 4800 12825 168 168 4800 12825 4725 12675
--6
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4800 12375 4800 12675
--6
-6 6900 9900 9450 12000
-6 7200 10875 9150 11400
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 9150 10875 9150 11400 7200 11400 7200 10875 9150 10875
-4 1 0 50 0 0 12 0.0000 4 135 1530 8175 11100 Invoke the listener's\001
-4 1 0 50 0 0 12 0.0000 4 180 1710 8175 11340 objectAdded() method\001
--6
-6 7500 9900 9450 10350
-6 7500 9900 9450 10350
-4 1 0 50 0 0 12 0.0000 4 180 1860 8475 10050 [Does this entry have an\001
-4 1 0 50 0 0 12 0.0000 4 180 1680 8475 10290 object event listener?]\001
--6
--6
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7575 10425 7425 10275 7275 10425 7425 10575 7575 10425
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 7575 10425 8100 10425 8100 10875
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7575 11850 7425 11700 7275 11850 7425 12000 7575 11850
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 8100 11400 8100 11850 7575 11850
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 7275 10425 6900 10425 6900 11850 7275 11850
--6
-6 225 7650 1875 8100
-4 1 0 50 0 0 12 0.0000 4 180 1140 1050 7800 [Was the entry\001
-4 1 0 50 0 0 12 0.0000 4 180 1530 1050 8040 previously present?]\001
--6
-6 150 8625 1950 9150
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 1950 9150 1950 8625 150 8625 150 9150 1950 9150
-4 1 0 50 0 0 12 0.0000 4 135 1530 1050 8850 Invoke the listener's\001
-4 1 0 50 0 0 12 0.0000 4 180 1320 1050 9090 objectReplaced()\001
--6
-6 2250 8625 3900 9150
-2 4 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5
-	 2250 8625 2250 9150 3900 9150 3900 8625 2250 8625
-4 1 0 50 0 0 12 0.0000 4 135 1530 3075 8850 Invoke the listener's\001
-4 1 0 50 0 0 12 0.0000 4 180 1110 3075 9090 objectAdded()\001
--6
-6 1200 6975 3150 7425
-6 1200 6975 3150 7425
-4 1 0 50 0 0 12 0.0000 4 180 1860 2175 7125 [Does this entry have an\001
-4 1 0 50 0 0 12 0.0000 4 180 1680 2175 7365 object event listener?]\001
--6
--6
-6 3675 10575 4725 11025
-4 1 0 50 0 0 12 0.0000 4 180 960 4200 10725 [Was an ack\001
-4 1 0 50 0 0 12 0.0000 4 180 810 4200 10965 requested]\001
--6
-6 1650 2100 3300 2550
-4 1 0 50 0 0 12 0.0000 4 180 1605 2475 2250 [Does region have an\001
-4 1 0 50 0 0 12 0.0000 4 180 1500 2475 2490 eviction controller?]\001
--6
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3900 2025 3375 2025 3375 2550
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 5550 2700 5400 2550 5250 2700 5400 2850 5550 2700
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 4200 2025 5400 2025 5400 2550
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 5550 2700 6375 2700 6375 3150
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6525 4350 6375 4200 6225 4350 6375 4500 6525 4350
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 6525 4350 7500 4350 7500 4800
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 6375 4200 6375 3675
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6525 5700 6375 5550 6225 5700 6375 5850 6525 5700
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 7500 5325 7500 5700 6525 5700
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 6375 5850 6375 6450
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 6225 4350 5850 4350 5850 5700 6225 5700
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 5250 2700 4800 2700 4800 10200
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3525 2700 3375 2550 3225 2700 3375 2850 3525 2700
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3225 2700 2400 2700 2400 3375
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 6225 6600 5850 6600 5850 10350 4950 10350
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 3375 6825 3375 6450
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4950 10350 4800 10200 4650 10350 4800 10500 4950 10350
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 4800 10500 4800 10950
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4950 11100 4800 10950 4650 11100 4800 11250 4950 11100
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 4650 11100 4200 11100 4200 11400
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 4950 12000 4800 11850 4650 12000 4800 12150 4950 12000
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 4200 11700 4200 12000 4650 12000
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 4950 11100 5325 11100 5325 12000 4950 12000
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3900 2025 4050 1875 4200 2025 4050 2175 3900 2025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 4050 1875 4050 1350
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3525 5475 3375 5325 3225 5475 3375 5625 3525 5475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2550 3525 2400 3375 2250 3525 2400 3675 2550 3525
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2250 3525 1275 3525 1275 4050
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2550 3525 3450 3525 3450 4050
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2550 5025 2400 4875 2250 5025 2400 5175 2550 5025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 1275 4650 1275 5025 2250 5025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3525 4650 3525 5025 2550 5025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 3525 2700 4650 2700 4650 5475 3525 5475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2400 5175 2400 5475 3225 5475
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 3375 5625 3375 5925
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 6525 6600 6375 6450 6225 6600 6375 6750 6525 6600
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 6525 6600 7350 6600 7350 6975
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7500 7125 7350 6975 7200 7125 7350 7275 7500 7125
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 7500 7125 8700 7125 8700 7500
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 7500 8250 7350 8100 7200 8250 7350 8400 7500 8250
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 8700 8025 8700 8250 7500 8250
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 7200 7125 6900 7125 6900 8250 7200 8250
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 7350 8400 7350 8775
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 7350 9825 7350 9300
-2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 4575 12375 5100 12375
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2
-	0 0 1.00 120.00 120.00
-	 4800 12150 4800 12375
-2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 7050 9825 7575 9825
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 7425 10275 7425 9825
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 7125 9825 7125 10125 5850 10125
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 4
-	0 0 1.00 120.00 120.00
-	 5025 12375 5025 12150 7425 12150 7425 12000
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 1 2
-	0 0 1.00 120.00 120.00
-	 3225 7350 3225 6825
-2 1 0 4 0 7 50 0 -1 0.000 0 0 -1 0 0 2
-	 3075 6825 3600 6825
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 3075 7500 3225 7350 3375 7500 3225 7650 3075 7500
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 3375 7500 4050 7500 4050 9900 3225 9900
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 1950 8175 2100 8025 2250 8175 2100 8325 1950 8175
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2250 8175 3000 8175 3000 8625
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 1950 8175 1050 8175 1050 8625
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 1050 9150 1050 9375 1950 9375
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3000 9150 3000 9375 2250 9375
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 1950 9375 2100 9225 2250 9375 2100 9525 1950 9375
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 5
-	 2925 9900 3075 9750 3225 9900 3075 10050 2925 9900
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 2100 9525 2100 9900 2925 9900
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 5
-	0 0 1.00 120.00 120.00
-	 3450 6825 3450 7125 4350 7125 4350 10350 4650 10350
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 3
-	0 0 1.00 120.00 120.00
-	 3075 7500 2100 7500 2100 8025
-2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 4
-	0 0 1.00 120.00 120.00
-	 3075 10050 3075 12150 4650 12150 4650 12375
-4 1 0 50 0 0 12 0.0000 4 180 1815 6450 2550 [Is the region mirrored?]\001
-4 1 0 50 0 0 12 0.0000 4 180 1665 3000 1800 [Is the entry defined?]\001
-4 1 0 50 0 0 12 0.0000 4 180 435 4500 1800 [else]\001
-4 1 0 50 0 0 12 0.0000 4 180 1680 1350 3375 [Is the entry present?]\001
-4 1 0 50 0 0 12 0.0000 4 180 435 3600 7425 [else]\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-update-message-flow.pdf
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-update-message-flow.pdf b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-update-message-flow.pdf
deleted file mode 100644
index 70c38ff..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/jcache-update-message-flow.pdf and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/partitioned-regions.fig
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/partitioned-regions.fig b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/partitioned-regions.fig
deleted file mode 100644
index bef603d..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/partitioned-regions.fig
+++ /dev/null
@@ -1,255 +0,0 @@
-#FIG 3.2
-Landscape
-Center
-Inches
-Letter  
-100.00
-Single
--2
-1200 2
-6 8925 1800 11175 4125
-6 9150 2250 10950 3675
-6 9225 2775 9975 3450
-2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
-	 9225 2775 9975 2775 9975 3450 9225 3450 9225 2775
-4 0 0 50 -1 0 12 0.0000 4 135 615 9300 3000 Bucket0\001
--6
-6 10125 2775 10875 3450
-2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
-	 10125 2775 10875 2775 10875 3450 10125 3450 10125 2775
-4 0 0 50 -1 0 12 0.0000 4 135 615 10200 3000 Bucket2\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9150 2250 10950 2250 10950 3675 9150 3675 9150 2250
-4 0 0 50 -1 0 12 0.0000 4 135 735 9675 2475 Partition1\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8925 1800 11175 1800 11175 4125 8925 4125 8925 1800
-4 0 0 50 -1 0 12 0.0000 4 135 1350 9225 2025 Cache Server VM\001
-4 0 0 50 -1 0 12 0.0000 4 135 2070 9075 3975 maxPartitionedData = 1000\001
--6
-6 6750 4200 7950 4875
-2 4 0 2 0 7 50 -1 -1 0.000 0 0 7 0 0 5
-	 7875 4800 6825 4800 6825 4275 7875 4275 7875 4800
-4 1 0 50 -1 0 12 0.0000 4 135 855 7350 4500 Distributed\001
-4 1 0 50 -1 0 12 0.0000 4 180 570 7350 4725 System\001
--6
-6 4200 1800 8250 3975
-6 6225 2175 8175 3600
-6 6300 2475 7125 3525
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6525 2775 6825 2775 6825 3225 6525 3225 6525 2775
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6675 2775 6675 3225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6525 2850 6825 2850
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6525 2925 6825 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6525 3000 6825 3000
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6525 3075 6825 3075
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6525 3150 6825 3150
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6300 2475 7125 2475 7125 3525 6300 3525 6300 2475
-4 0 0 50 -1 0 12 0.0000 4 135 615 6375 2700 Bucket0\001
-4 0 0 50 -1 0 12 0.0000 4 135 690 6375 3450 size = 20\001
--6
-6 7275 2475 8100 3525
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7500 2775 7800 2775 7800 3225 7500 3225 7500 2775
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7650 2775 7650 3225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7500 2850 7800 2850
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7500 2925 7800 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7500 3000 7800 3000
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7500 3075 7800 3075
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7500 3150 7800 3150
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7275 2475 8100 2475 8100 3525 7275 3525 7275 2475
-4 0 0 50 -1 0 12 0.0000 4 135 615 7350 2700 Bucket2\001
-4 0 0 50 -1 0 12 0.0000 4 135 690 7350 3450 size = 45\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6225 2175 8175 2175 8175 3600 6225 3600 6225 2175
-4 0 0 50 -1 0 12 0.0000 4 135 735 6345 2400 Partition1\001
--6
-6 4350 3150 5850 3825
-6 4350 3150 5850 3825
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5100 3525 5100 3750
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4650 3525 5550 3525 5550 3750 4650 3750 4650 3525
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4350 3150 5850 3150 5850 3825 4350 3825 4350 3150
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4875 3525 4875 3750
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5325 3525 5325 3750
-4 0 0 50 -1 0 12 0.0000 4 180 1230 4485 3375 BucketDirectory\001
--6
--6
-6 4800 2325 5250 2925
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4800 2475 5250 2475
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4800 2625 5250 2625
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4800 2775 5250 2775
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 5025 2325 5025 2925
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4800 2325 5250 2325 5250 2925 4800 2925 4800 2325
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 4200 1800 8250 1800 8250 3975 4200 3975 4200 1800
-4 0 0 50 -1 0 12 0.0000 4 180 1200 5550 2025 Application VM\001
-4 0 0 50 -1 0 12 0.0000 4 135 2070 6000 3825 maxPartitionedData = 1000\001
--6
-6 5400 5250 8250 7425
-6 6225 5625 8175 7050
-6 6300 5925 7125 6975
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6525 6225 6825 6225 6825 6675 6525 6675 6525 6225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6675 6225 6675 6675
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6525 6300 6825 6300
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6525 6375 6825 6375
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6525 6450 6825 6450
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6525 6525 6825 6525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 6525 6600 6825 6600
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6300 5925 7125 5925 7125 6975 6300 6975 6300 5925
-4 0 0 50 -1 0 12 0.0000 4 135 615 6375 6150 Bucket1\001
-4 0 0 50 -1 0 12 0.0000 4 135 690 6375 6900 size = 34\001
--6
-6 7275 5925 8100 6975
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7500 6225 7800 6225 7800 6675 7500 6675 7500 6225
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7650 6225 7650 6675
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7500 6300 7800 6300
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7500 6375 7800 6375
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7500 6450 7800 6450
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7500 6525 7800 6525
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 7500 6600 7800 6600
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 7275 5925 8100 5925 8100 6975 7275 6975 7275 5925
-4 0 0 50 -1 0 12 0.0000 4 135 615 7350 6150 Bucket3\001
-4 0 0 50 -1 0 12 0.0000 4 135 690 7350 6900 size = 12\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 6225 5625 8175 5625 8175 7050 6225 7050 6225 5625
-4 0 0 50 -1 0 12 0.0000 4 135 735 6345 5850 Partition2\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 5400 5250 8250 5250 8250 7425 5400 7425 5400 5250
-4 0 0 50 -1 0 12 0.0000 4 135 1350 5550 5475 Cache Server VM\001
-4 0 0 50 -1 0 12 0.0000 4 135 2070 6000 7275 maxPartitionedData = 1000\001
--6
-6 2325 4125 4875 5775
-6 3225 4575 4725 5250
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3975 4950 3975 5175
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3525 4950 4425 4950 4425 5175 3525 5175 3525 4950
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 3225 4575 4725 4575 4725 5250 3225 5250 3225 4575
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 3750 4950 3750 5175
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 4200 4950 4200 5175
-4 0 0 50 -1 0 12 0.0000 4 180 1230 3360 4800 BucketDirectory\001
--6
-6 2625 4575 3075 5175
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2625 4725 3075 4725
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2625 4875 3075 4875
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2625 5025 3075 5025
-2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
-	 2850 4575 2850 5175
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2625 4575 3075 4575 3075 5175 2625 5175 2625 4575
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 2325 4125 4875 4125 4875 5775 2325 5775 2325 4125
-4 0 0 50 -1 0 12 0.0000 4 180 1200 2475 4350 Application VM\001
-4 0 0 50 -1 0 12 0.0000 4 135 1800 2550 5550 maxPartitionedData = 0\001
--6
-6 8925 5100 11175 7425
-6 9150 5550 10950 6975
-6 9225 6075 9975 6750
-2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
-	 9225 6075 9975 6075 9975 6750 9225 6750 9225 6075
-4 0 0 50 -1 0 12 0.0000 4 135 615 9300 6300 Bucket1\001
--6
-6 10125 6075 10875 6750
-2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
-	 10125 6075 10875 6075 10875 6750 10125 6750 10125 6075
-4 0 0 50 -1 0 12 0.0000 4 135 615 10200 6300 Bucket3\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 9150 5550 10950 5550 10950 6975 9150 6975 9150 5550
-4 0 0 50 -1 0 12 0.0000 4 135 735 9675 5775 Partition2\001
--6
-2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
-	 8925 5100 11175 5100 11175 7425 8925 7425 8925 5100
-4 0 0 50 -1 0 12 0.0000 4 135 1350 9225 5325 Cache Server VM\001
-4 0 0 50 -1 0 12 0.0000 4 135 2070 9075 7275 maxPartitionedData = 1000\001
--6
-2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
-	 6825 4500 4875 4500
-2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
-	 7275 4275 7275 3975
-2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
-	 7275 4800 7275 5250
-2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
-	 7875 4350 8925 3825
-2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
-	 7875 4800 8925 5400
-2 1 1 2 0 7 50 -1 -1 4.500 0 0 -1 0 0 2
-	 8475 975 8475 8175
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4725 3600 6300 2625
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4950 3600 6525 5925
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 5400 3600 7650 5925
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 5175 3600 7275 2700
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 3675 5025 6300 2850
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 3825 5100 6300 6825
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4350 5100 7275 6675
-2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
-	0 0 1.00 60.00 120.00
-	 4125 5025 7275 3000
-4 0 0 50 -1 0 12 0.0000 4 135 735 7650 1125 Machine1\001
-4 0 0 50 -1 0 12 0.0000 4 135 735 8625 1125 Machine2\001

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/partitioned-regions.gif
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/partitioned-regions.gif b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/partitioned-regions.gif
deleted file mode 100644
index b3a2baf..0000000
Binary files a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/partitioned-regions.gif and /dev/null differ


[35/54] [abbrv] incubator-geode git commit: GEODE-54: missing javadocs

Posted by je...@apache.org.
GEODE-54: missing javadocs

Create docs landing page for Geode website
Add an href to javadocs

closes #113


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/91b70969
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/91b70969
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/91b70969

Branch: refs/heads/feature/GEODE-17-2
Commit: 91b70969ac8dc4067241870ab8a66c3c462d67c9
Parents: bec420b
Author: Dave Barnes <db...@pivotal.io>
Authored: Wed Feb 24 15:11:06 2016 -0800
Committer: Swapnil Bawaskar <sb...@pivotal.io>
Committed: Wed Mar 16 17:59:26 2016 -0700

----------------------------------------------------------------------
 geode-site/website/README.md                    |  2 +-
 geode-site/website/Rules                        |  3 --
 geode-site/website/content/community/index.html |  2 +-
 geode-site/website/content/docs/index.html      | 48 ++++++++++++++++++++
 geode-site/website/layouts/default.html         | 32 -------------
 geode-site/website/layouts/footer.html          |  2 +-
 geode-site/website/layouts/header.html          |  2 +-
 7 files changed, 52 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/91b70969/geode-site/website/README.md
----------------------------------------------------------------------
diff --git a/geode-site/website/README.md b/geode-site/website/README.md
index a43efb7..6e50821 100644
--- a/geode-site/website/README.md
+++ b/geode-site/website/README.md
@@ -6,7 +6,7 @@ Source files for the website are in ``${geode-project-dir}/geode-site/website/co
 
 Generated files for the website are in ``${geode-project-dir}/geode-site/content``
 
-The website is updated by a "sync" tool that monitors the __asf-site__ branch of our Git repo, so after to make changes you must push your updated source and generated files to that branch. The content will be published to the [Geode website](http://geode.incubator.apache.org), after a 5-20 minute delay.
+The website is updated by a "sync" tool that monitors the __asf-site__ branch of our Git repo, so after making changes you must push your updated source and generated files to that branch. The content will be published to the [Geode website](http://geode.incubator.apache.org), after a 5-20 minute delay.
 
 ## Prerequsites
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/91b70969/geode-site/website/Rules
----------------------------------------------------------------------
diff --git a/geode-site/website/Rules b/geode-site/website/Rules
index e1173df..5369385 100644
--- a/geode-site/website/Rules
+++ b/geode-site/website/Rules
@@ -35,9 +35,6 @@ passthrough /\/(bootstrap|css|font|img|js|static)\/.*/
 compile '/docs/*' do
   @docs = true
   filter :erb
-  filter :fenced_code_block
-  filter :pandoc
-  filter :colorize_syntax, :default_colorizer => :pygmentsrb, :pygmentsrb => { :options => { :startinline => 'True' } }
   layout 'docs'
 end
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/91b70969/geode-site/website/content/community/index.html
----------------------------------------------------------------------
diff --git a/geode-site/website/content/community/index.html b/geode-site/website/content/community/index.html
index 5c5f25f..5a695b2 100644
--- a/geode-site/website/content/community/index.html
+++ b/geode-site/website/content/community/index.html
@@ -128,7 +128,7 @@ under the License. -->
       </div>
       <div class="col-md-3">
         	<h3><a target="_blank" href="https://www.youtube.com/channel/UCaY2q0UlWjAgEGL7uhCLs6A">Geode ClubHouse</a></h3>
-        	<p>We meet every 15 days online for discussions around specific features, detailing internals and discuss on-going issues on JIRA at the Geode Clubhouse. All meetings are recorded and videos are availabe in our <a href="https://www.youtube.com/channel/UCaY2q0UlWjAgEGL7uhCLs6A">YouTube</a> channel.<p>
+        	<p>We meet every 15 days online for discussions around specific features, detailing internals and discuss on-going issues on JIRA at the Geode Clubhouse. All meetings are recorded and videos are available in our <a href="https://www.youtube.com/channel/UCaY2q0UlWjAgEGL7uhCLs6A">YouTube</a> channel.<p>
       </div>
 	  </div>
 </section>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/91b70969/geode-site/website/content/docs/index.html
----------------------------------------------------------------------
diff --git a/geode-site/website/content/docs/index.html b/geode-site/website/content/docs/index.html
new file mode 100644
index 0000000..f848dc1
--- /dev/null
+++ b/geode-site/website/content/docs/index.html
@@ -0,0 +1,48 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License. -->
+
+<!-- <div id="map-canvas" style="width: 100%;"></div> -->
+
+<section class="bf-tagline">
+    <div class="container">
+    	<div class="row">
+        <br/>
+    	    	<h2>Geode Documentation</h2>
+	</div>
+    </div>
+</section>
+
+
+<section class="bf-docs">
+    <div class="container">
+	<div class="row">
+	    <div class="col-md-4">
+	    		<h3><a href="http://geode.docs.pivotal.io/" style="color: #1275ff;">Apache Geode (incubating) User Documentation</a></h3>
+	    		<p>Installation Instructions, User Manual, other product docs</p>
+	    </div>
+	    <div class="col-md-4">
+	    		<h3><a href="http://geode.incubator.apache.org/releases/10M2SNAP/javadocs/index.html" style="color: #1275ff;">Javadocs</a></h3>
+	    		<p>API Reference in conventional Javadoc format<p>
+	    </div>
+	    <div class="col-md-4">
+	    		<h3><a href="https://cwiki.apache.org/confluence/display/GEODE/Index" style="color: #1275ff;">Apache Geode Wiki</a></h3>
+	    		<p>Community contributions on various topics<p>
+	    </div>
+	</div>
+    </div>
+</section>
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/91b70969/geode-site/website/layouts/default.html
----------------------------------------------------------------------
diff --git a/geode-site/website/layouts/default.html b/geode-site/website/layouts/default.html
index 5e5ba68..2e3e2cd 100644
--- a/geode-site/website/layouts/default.html
+++ b/geode-site/website/layouts/default.html
@@ -3,40 +3,8 @@
 
 <%= render 'header', {:docs => @docs, :community => @community} %>
 
-<% if @docs %>
-<div class="container bf-docs-container">
-    <div class="row">
-
-        <div class="col-md-9 main-article" role="main">
-            <div class="page-article">
-                <div class="page-header">
-                    <h1><%= @item[:title] %></h1>
-                    <!-- TODO: reenable this when we sync SVN to GitHub
-                  <small><a target="_blank" href="https://github.com/geode/website/blob/master/content<%= @item.path[0..-2] %>.md">contribute to this article on github</a></small>
-                    -->
-                </div>
-                <%= @content %>
-            </div>
-        </div>
-    </div>
-    <div class="row">
-        <div class="col-md-3"></div>
-        <div class="col-md-9">
-            <div class="github-callout">
-                <strong>Questions?</strong> Please do <a href="/community">ask on the mailing-lists</a>!<br/>
-                <!--
-                <strong>Found an error?</strong> We’d greatly appreciate a pull request about <a target="_blank" href="https://github.com/geode/website/blob/master/content<%= @item.path[0..-2] %>.md">this article on github</a>.</div>
-                -->
-            </div>
-        </div>
-    </div>
-</div>
-<% else %>
-
 <%= @content %>
 
-<% end %>
-
 <%= render 'footer' %>
 
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/91b70969/geode-site/website/layouts/footer.html
----------------------------------------------------------------------
diff --git a/geode-site/website/layouts/footer.html b/geode-site/website/layouts/footer.html
index ae38c13..3d31236 100644
--- a/geode-site/website/layouts/footer.html
+++ b/geode-site/website/layouts/footer.html
@@ -24,7 +24,7 @@
                 <ul class="nav nav-list">
                     <li class="nav-header">Resources</li>
                     <li><a href="http://github.com/apache/incubator-geode" target="_blank">GitHub Code</a></li>
-                    <li><a href="http://geode.docs.pivotal.io" target="_blank">Docs</a></li>
+                    <li><a href="/docs/">Docs</a></li>
                     <li><a href="https://issues.apache.org/jira/browse/GEODE" target="_blank">JIRA Bug Tracker</a></li>
                     <li><a href="http://stackoverflow.com/search?q=Apache%20Geode" target="_blank">StackOverflow</a></li>
                     <li><a href="/community/#live">Live Chat</a></li>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/91b70969/geode-site/website/layouts/header.html
----------------------------------------------------------------------
diff --git a/geode-site/website/layouts/header.html b/geode-site/website/layouts/header.html
index 4bffa61..e364fe4 100644
--- a/geode-site/website/layouts/header.html
+++ b/geode-site/website/layouts/header.html
@@ -231,7 +231,7 @@
         <nav class="collapse navbar-collapse bf-navbar-collapse" role="navigation">
             <ul class="nav navbar-nav navbar-right">
                 <li class="<%= 'active' if @community %>"><a href="/community/"><span class="icns icon-group"></span></a></li>
-                <li><a href="http://geode.docs.pivotal.io" target="_blank"><span class="icns icon-book"></span></a></li>
+                <li class="<%= 'active' if @docs %>"><a href="/docs/"><span class="icns icon-book"></span></a></li>
                 <li><a href="http://github.com/apache/incubator-geode" target="_blank"><span class="icns icon-github-sign"></span></a></li>
                 <!--<li><a href="https://trello.com/b/exQmJIOn/usergrid" target="_blank"><span class="icns icon-trello"></span></a></li>-->
                 <li><a href="https://issues.apache.org/jira/browse/GEODE/"


[28/54] [abbrv] incubator-geode git commit: GEODE-1101: rename SimpleMemoryAllocator to MemoryAllocator

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/LifecycleListenerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/LifecycleListenerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/LifecycleListenerJUnitTest.java
index a009661..e10ca0a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/LifecycleListenerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/LifecycleListenerJUnitTest.java
@@ -54,7 +54,7 @@ public class LifecycleListenerJUnitTest {
     this.afterCreateCallbacks.clear();
     this.afterReuseCallbacks.clear();
     this.beforeCloseCallbacks.clear();
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    MemoryAllocatorImpl.freeOffHeapMemory();
   }
 
   @Test
@@ -63,7 +63,7 @@ public class LifecycleListenerJUnitTest {
     LifecycleListener.removeLifecycleListener(this.listener);
 
     SlabImpl slab = new SlabImpl(1024); // 1k
-    SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(),
+    MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(),
         new SlabImpl[] { slab });
 
     Assert.assertEquals(0, this.afterCreateCallbacks.size());
@@ -83,7 +83,7 @@ public class LifecycleListenerJUnitTest {
   public void testCallbacksAreCalledAfterCreate() {
     LifecycleListener.addLifecycleListener(this.listener);
     SlabImpl slab = new SlabImpl(1024); // 1k
-    SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(),
+    MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(),
         new SlabImpl[] { slab });
 
     Assert.assertEquals(1, this.afterCreateCallbacks.size());
@@ -104,10 +104,10 @@ public class LifecycleListenerJUnitTest {
 
     LifecycleListener.addLifecycleListener(this.listener);
 
-    System.setProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "false");
+    System.setProperty(MemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "false");
 
     SlabImpl slab = new SlabImpl(1024); // 1k
-    SimpleMemoryAllocatorImpl ma = createAllocator(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[] { slab });
+    MemoryAllocatorImpl ma = createAllocator(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[] { slab });
 
     Assert.assertEquals(1, this.afterCreateCallbacks.size());
     Assert.assertEquals(0, this.afterReuseCallbacks.size());
@@ -125,7 +125,7 @@ public class LifecycleListenerJUnitTest {
     Assert.assertEquals(1, this.afterReuseCallbacks.size());
     Assert.assertEquals(1, this.beforeCloseCallbacks.size());
 
-    SimpleMemoryAllocatorImpl ma2 = createAllocator(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[] { slab });
+    MemoryAllocatorImpl ma2 = createAllocator(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[] { slab });
     assertEquals(null, ma2);
     
     Assert.assertEquals(1, this.afterCreateCallbacks.size());
@@ -139,20 +139,20 @@ public class LifecycleListenerJUnitTest {
     Assert.assertEquals(2, this.beforeCloseCallbacks.size());
   }
 
-  private SimpleMemoryAllocatorImpl createAllocator(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats ohms, SlabImpl[] slab) {
+  private MemoryAllocatorImpl createAllocator(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats ohms, SlabImpl[] slab) {
     try {
-       return SimpleMemoryAllocatorImpl.createForUnitTest(ooohml, ohms, slab);
+       return MemoryAllocatorImpl.createForUnitTest(ooohml, ohms, slab);
     } catch (IllegalStateException e) {
       return null;
     }
   }
   
-  private void closeAndFree(SimpleMemoryAllocatorImpl ma) {
-    System.setProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "true");
+  private void closeAndFree(MemoryAllocatorImpl ma) {
+    System.setProperty(MemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "true");
     try {
       ma.close();
     } finally {
-      System.clearProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY);
+      System.clearProperty(MemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY);
     }
   }
   
@@ -162,7 +162,7 @@ public class LifecycleListenerJUnitTest {
     LifecycleListener.addLifecycleListener(this.listener);
 
     SlabImpl slab = new SlabImpl(1024); // 1k
-    SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[] { slab });
+    MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[] { slab });
 
     Assert.assertEquals(1, this.afterCreateCallbacks.size());
     Assert.assertEquals(0, this.afterReuseCallbacks.size());
@@ -175,7 +175,7 @@ public class LifecycleListenerJUnitTest {
     Assert.assertEquals(1, this.beforeCloseCallbacks.size());
 
     slab = new SlabImpl(1024); // 1k
-    SimpleMemoryAllocatorImpl ma2 = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[] { slab });
+    MemoryAllocatorImpl ma2 = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[] { slab });
 
     Assert.assertEquals(2, this.afterCreateCallbacks.size());
     Assert.assertEquals(0, this.afterReuseCallbacks.size());
@@ -189,11 +189,11 @@ public class LifecycleListenerJUnitTest {
   }
 
   static final class LifecycleListenerCallback {
-    private final SimpleMemoryAllocatorImpl allocator;
+    private final MemoryAllocatorImpl allocator;
     private final long timeStamp;
     private final Throwable creationTime;
 
-    LifecycleListenerCallback(SimpleMemoryAllocatorImpl allocator) {
+    LifecycleListenerCallback(MemoryAllocatorImpl allocator) {
       this.allocator = allocator;
       this.timeStamp = System.currentTimeMillis();
       this.creationTime = new Exception();
@@ -213,17 +213,17 @@ public class LifecycleListenerJUnitTest {
     }
 
     @Override
-    public void afterCreate(SimpleMemoryAllocatorImpl allocator) {
+    public void afterCreate(MemoryAllocatorImpl allocator) {
       this.afterCreateCallbacks.add(new LifecycleListenerCallback(allocator));
     }
 
     @Override
-    public void afterReuse(SimpleMemoryAllocatorImpl allocator) {
+    public void afterReuse(MemoryAllocatorImpl allocator) {
       this.afterReuseCallbacks.add(new LifecycleListenerCallback(allocator));
     }
 
     @Override
-    public void beforeClose(SimpleMemoryAllocatorImpl allocator) {
+    public void beforeClose(MemoryAllocatorImpl allocator) {
       this.beforeCloseCallbacks.add(new LifecycleListenerCallback(allocator));
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternIntegrationTest.java
new file mode 100644
index 0000000..2f202f8
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternIntegrationTest.java
@@ -0,0 +1,246 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import static org.junit.Assert.*;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+/**
+ * Tests fill pattern validation for the {@link MemoryAllocatorImpl}.
+ */
+@Category(IntegrationTest.class)
+public class MemoryAllocatorFillPatternIntegrationTest {
+  private static Random random = ThreadLocalRandom.current();
+
+  /**
+   * Chunk operation types.
+   */
+  static enum Operation {
+    ALLOCATE,
+    FREE,
+    WRITE;
+    
+    // Holds all Operation values
+    private static Operation[] values = Operation.values(); 
+    
+    static Operation randomOperation() {
+      return values[random.nextInt(values.length)];
+    }
+  };
+  
+  /** Number of worker threads for advanced tests. */
+  private static final int WORKER_THREAD_COUNT = 5;
+  
+  /** Size of single test slab.*/
+  private static final int SLAB_SIZE = 1024 * 1024 * 50;
+  
+  /** Maximum number of bytes a worker thread can allocate during advanced tests.  */
+  private static final int MAX_WORKER_ALLOCATION_TOTAL_SIZE = SLAB_SIZE / WORKER_THREAD_COUNT / 2;
+  
+  /** Maximum allocation for a single Chunk.  */
+  private static final int MAX_WORKER_ALLOCATION_SIZE = 512;
+  
+  /** Canned data for write operations. */
+  private static final byte[] WRITE_BYTES = new String("Some string data.").getBytes();
+  
+  /** Minimum size for write operations. */
+  private static final int MIN_WORKER_ALLOCATION_SIZE = WRITE_BYTES.length;
+
+  /** Runtime for worker threads. */
+  private static final long RUN_TIME_IN_MILLIS = 1 * 1000 * 5;
+  
+  /** Chunk size for basic huge allocation test. */
+  private static final int HUGE_CHUNK_SIZE = 1024 * 200;
+  
+  /** Our test victim. */
+  private MemoryAllocatorImpl allocator = null;
+  
+  /** Our test victim's memory slab. */
+  private SlabImpl slab = null;
+
+  /**
+   * Enables fill validation and creates the test victim.
+   */
+  @Before
+  public void setUp() throws Exception {
+    System.setProperty("gemfire.validateOffHeapWithFill", "true");
+    this.slab = new SlabImpl(SLAB_SIZE);
+    this.allocator = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{this.slab});
+  }
+
+  /**
+   * Frees off heap memory.
+   */
+  @After
+  public void tearDown() throws Exception {
+    MemoryAllocatorImpl.freeOffHeapMemory();
+    System.clearProperty("gemfire.validateOffHeapWithFill");
+  }
+  
+  /**
+   * This test hammers a MemoryAllocatorImpl with multiple threads exercising
+   * the fill validation of tiny Chunks for one minute.  This, of course, exercises many aspects of
+   * the MemoryAllocatorImpl and its helper classes.
+   * @throws Exception
+   */
+  @Test
+  public void testFillPatternAdvancedForTinyAllocations() throws Exception { 
+    doFillPatternAdvancedTest(new ChunkSizer() {
+      @Override
+      public int allocationSize() {
+        int allocation = random.nextInt(MAX_WORKER_ALLOCATION_SIZE+1);
+        
+        while(allocation < MIN_WORKER_ALLOCATION_SIZE) {
+          allocation = random.nextInt(MAX_WORKER_ALLOCATION_SIZE+1);
+        }
+        return allocation;
+      }
+    });
+  }
+
+  /**
+   * This test hammers a MemoryAllocatorImpl with multiple threads exercising
+   * the fill validation of huge Chunks for one minute.  This, of course, exercises many aspects of
+   * the MemoryAllocatorImpl and its helper classes.
+   * @throws Exception
+   */
+  @Test
+  public void testFillPatternAdvancedForHugeAllocations() throws Exception {
+    doFillPatternAdvancedTest(new ChunkSizer() {
+      @Override
+      public int allocationSize() {
+        return HUGE_CHUNK_SIZE;
+      }
+    });
+  }
+  
+  private interface ChunkSizer {
+    int allocationSize();
+  }
+  
+  private void doFillPatternAdvancedTest(final ChunkSizer chunkSizer) throws InterruptedException {
+    // Used to manage worker thread completion
+    final CountDownLatch latch = new CountDownLatch(WORKER_THREAD_COUNT);
+    
+    // Use to track any errors the worker threads will encounter
+    final List<Throwable> threadErrorList = Collections.synchronizedList(new LinkedList<Throwable>());
+    
+    /*
+     * Start up a number of worker threads.  These threads will randomly allocate, free,
+     * and write to Chunks.
+     */
+    for(int i = 0;i < WORKER_THREAD_COUNT;++i) {
+      new Thread(new Runnable() {
+        // Total allocation in bytes for this thread
+        private int totalAllocation = 0;
+        
+        // List of Chunks allocated by this thread
+        private List<OffHeapStoredObject> chunks = new LinkedList<OffHeapStoredObject>();
+        
+        // Time to end thread execution
+        private long endTime = System.currentTimeMillis() + RUN_TIME_IN_MILLIS;
+        
+        /**
+         * Allocates a chunk and adds it to the thread's Chunk list.
+         */
+        private void allocate() {          
+          int allocation = chunkSizer.allocationSize();
+          OffHeapStoredObject chunk = (OffHeapStoredObject) allocator.allocate(allocation);
+          
+          // This should always work just after allocation
+          chunk.validateFill();
+          
+          chunks.add(chunk);
+          totalAllocation += chunk.getSize();
+        }
+        
+        /**
+         * Frees a random chunk from the Chunk list.
+         */
+        private void free() {
+          OffHeapStoredObject chunk = chunks.remove(random.nextInt(chunks.size()));
+          totalAllocation -= chunk.getSize();
+          
+          /*
+           * Chunk is filled here but another thread may have already grabbed it so we
+           * cannot validate the fill.
+           */
+          chunk.release(); 
+        }
+        
+        /**
+         * Writes canned data to a random Chunk from the Chunk list.
+         */
+        private void write() {
+          OffHeapStoredObject chunk = chunks.get(random.nextInt(chunks.size()));
+          chunk.writeDataBytes(0, WRITE_BYTES);
+        }
+        
+        /**
+         * Randomly selects Chunk operations and executes them
+         * for a period of time.  Collects any error thrown during execution.
+         */
+        @Override
+        public void run() {
+          try {
+            for(long currentTime = System.currentTimeMillis();currentTime < endTime;currentTime = System.currentTimeMillis()) {
+              Operation op = (totalAllocation == 0 ? Operation.ALLOCATE : (totalAllocation >= MAX_WORKER_ALLOCATION_TOTAL_SIZE ? Operation.FREE : Operation.randomOperation()));
+              switch(op) {
+              case ALLOCATE:
+                allocate();
+                break;
+              case FREE:
+                free();
+                break;
+              case WRITE:
+                write();
+                break;
+              }
+            }
+          } catch (Throwable t) {
+            threadErrorList.add(t);
+          } finally {
+            latch.countDown();
+          }
+       }        
+      }).start();
+    }
+    
+    // Make sure each thread ended cleanly
+    assertTrue(latch.await(2, TimeUnit.MINUTES));
+    
+    // Fail on the first error we find
+    if(!threadErrorList.isEmpty()) {
+      fail(threadErrorList.get(0).getMessage());
+    }
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
new file mode 100644
index 0000000..f1d223d
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import static org.junit.Assert.*;
+import static com.googlecode.catchexception.CatchException.*;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests fill pattern validation for the {@link MemoryAllocatorImpl}.
+ * @author rholmes
+ */
+@Category(UnitTest.class)
+public class MemoryAllocatorFillPatternJUnitTest {
+  
+  /** Size of single test slab.*/
+  private static final int SLAB_SIZE = 1024 * 1024 * 50;
+  
+  /** Canned data for write operations. */
+  private static final byte[] WRITE_BYTES = new String("Some string data.").getBytes();
+  
+  /** Chunk size for basic huge allocation test. */
+  private static final int HUGE_CHUNK_SIZE = 1024 * 200;
+  
+  /** The number of chunks to allocate in order to force compaction. */
+  private static final int COMPACTION_CHUNKS = 3;
+  
+  /** Our slab size divided in three (with some padding for safety). */
+  private static final int COMPACTION_CHUNK_SIZE = (SLAB_SIZE / COMPACTION_CHUNKS) - 1024;
+  
+  /** This should force compaction when allocated. */
+  private static final int FORCE_COMPACTION_CHUNK_SIZE = COMPACTION_CHUNK_SIZE * 2;
+
+  /** Our test victim. */
+  private MemoryAllocatorImpl allocator = null;
+  
+  /** Our test victim's memory slab. */
+  private SlabImpl slab = null;
+
+  /**
+   * Enables fill validation and creates the test victim.
+   */
+  @Before
+  public void setUp() throws Exception {
+    System.setProperty("gemfire.validateOffHeapWithFill", "true");
+    this.slab = new SlabImpl(SLAB_SIZE);
+    this.allocator = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{this.slab});
+  }
+
+  /**
+   * Frees off heap memory.
+   */
+  @After
+  public void tearDown() throws Exception {
+    MemoryAllocatorImpl.freeOffHeapMemory();
+    System.clearProperty("gemfire.validateOffHeapWithFill");
+  }
+
+  /**
+   * This tests the fill pattern for a single tiny Chunk allocation.
+   * @throws Exception
+   */
+  @Test
+  public void testFillPatternBasicForTinyAllocations() throws Exception {
+    doFillPatternBasic(1024);
+  }
+  
+  /**
+   * This tests the fill pattern for a single huge Chunk allocation.
+   * @throws Exception
+   */
+  @Test
+  public void testFillPatternBasicForHugeAllocations() throws Exception {
+    doFillPatternBasic(HUGE_CHUNK_SIZE);
+  }
+  
+  private void doFillPatternBasic(final int chunkSize) {
+    /*
+     * Pull a chunk off the fragment.  This will have no fill because
+     * it is a "fresh" chunk.
+     */
+    OffHeapStoredObject chunk = (OffHeapStoredObject) this.allocator.allocate(chunkSize);
+
+    /*
+     * Chunk should have valid fill from initial fragment allocation.
+     */
+    chunk.validateFill();
+         
+    // "Dirty" the chunk so the release has something to fill over
+    chunk.writeDataBytes(OffHeapStoredObject.MIN_CHUNK_SIZE + 1, WRITE_BYTES);
+
+    // This should free the Chunk (ref count == 1)
+    chunk.release();
+
+    /*
+     * This chunk should have a fill because it was reused from the
+     * free list (assuming no fragmentation at this point...)
+     */
+    chunk = (OffHeapStoredObject) this.allocator.allocate(chunkSize);
+    
+    // Make sure we have a fill this time
+    chunk.validateFill();
+    
+    // Give the fill code something to write over during the release
+    chunk.writeDataBytes(OffHeapStoredObject.MIN_CHUNK_SIZE + 1, WRITE_BYTES);
+    chunk.release();
+
+    // Again, make sure the release implemented the fill
+    chunk.validateFill();
+
+    // "Dirty up" the free chunk
+    chunk.writeDataBytes(OffHeapStoredObject.MIN_CHUNK_SIZE + 1, WRITE_BYTES);
+    
+    catchException(chunk).validateFill();
+    assertTrue(caughtException() instanceof IllegalStateException);
+    assertEquals("Fill pattern violated for chunk " + chunk.getAddress() + " with size " + chunk.getSize(), caughtException().getMessage());
+    
+  }
+
+  /**
+   * This tests that fill validation is working properly on newly created fragments after
+   * a compaction.
+   * @throws Exception
+   */
+  @Test
+  public void testFillPatternAfterCompaction() throws Exception {
+    /*
+     * Stores our allocated memory.
+     */
+    OffHeapStoredObject[] allocatedChunks = new OffHeapStoredObject[COMPACTION_CHUNKS];
+    
+    /*
+     * Use up most of our memory
+     * Our memory looks like [      ][      ][      ]
+     */
+    for(int i =0;i < allocatedChunks.length;++i) {
+      allocatedChunks[i] = (OffHeapStoredObject) this.allocator.allocate(COMPACTION_CHUNK_SIZE);
+      allocatedChunks[i].validateFill();
+    }
+
+    /*
+     * Release some of our allocated chunks.
+     */
+    for(int i=0;i < 2;++i) {
+      allocatedChunks[i].release();
+      allocatedChunks[i].validateFill();      
+    }
+    
+    /*
+     * Now, allocate another chunk that is slightly larger than one of
+     * our initial chunks.  This should force a compaction causing our
+     * memory to look like [            ][      ].
+     */
+    OffHeapStoredObject slightlyLargerChunk = (OffHeapStoredObject) this.allocator.allocate(FORCE_COMPACTION_CHUNK_SIZE);
+    
+    /*
+     * Make sure the compacted memory has the fill validation.
+     */
+    slightlyLargerChunk.validateFill();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java
new file mode 100644
index 0000000..7639f8d
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorJUnitTest.java
@@ -0,0 +1,594 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import static org.junit.Assert.*;
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.contrib.java.lang.system.RestoreSystemProperties;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.OutOfOffHeapMemoryException;
+import com.gemstone.gemfire.cache.CacheClosedException;
+import com.gemstone.gemfire.internal.logging.NullLogWriter;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class MemoryAllocatorJUnitTest {
+  @Rule
+  public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
+
+  private static int round(int multiple, int v) {
+    return ((v+multiple-1)/multiple)*multiple;
+  }
+  @Test
+  public void testNullGetAllocator() {
+    try {
+      MemoryAllocatorImpl.getAllocator();
+      fail("expected CacheClosedException");
+    } catch (CacheClosedException expected) {
+    }
+  }
+  @Test
+  public void testConstructor() {
+    try {
+      MemoryAllocatorImpl.createForUnitTest(null, null, null);
+      fail("expected IllegalArgumentException");
+    } catch (IllegalArgumentException expected) {
+    }
+  }
+  @Test
+  public void testCreate() {
+    System.setProperty(MemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "false");
+    {
+      NullOutOfOffHeapMemoryListener listener = new NullOutOfOffHeapMemoryListener();
+      NullOffHeapMemoryStats stats = new NullOffHeapMemoryStats();
+      try {
+        MemoryAllocatorImpl.createForUnitTest(listener, stats, 10, 950, 100, new SlabFactory() {
+     @Override
+     public Slab create(int size) {
+        throw new OutOfMemoryError("expected");
+     }
+    });
+      } catch (OutOfMemoryError expected) {
+      }
+      assertTrue(listener.isClosed());
+      assertTrue(stats.isClosed());
+     }
+    {
+      NullOutOfOffHeapMemoryListener listener = new NullOutOfOffHeapMemoryListener();
+      NullOffHeapMemoryStats stats = new NullOffHeapMemoryStats();
+      int MAX_SLAB_SIZE = 100;
+      try {
+        SlabFactory factory = new SlabFactory() {
+          private int createCount = 0;
+          @Override
+          public Slab create(int size) {
+            createCount++;
+            if (createCount == 1) {
+              return new SlabImpl(size);
+            } else {
+              throw new OutOfMemoryError("expected");
+            }
+          }
+        };
+        MemoryAllocatorImpl.createForUnitTest(listener, stats, 10, 950, MAX_SLAB_SIZE, factory);
+      } catch (OutOfMemoryError expected) {
+      }
+      assertTrue(listener.isClosed());
+      assertTrue(stats.isClosed());
+    }
+    {
+      NullOutOfOffHeapMemoryListener listener = new NullOutOfOffHeapMemoryListener();
+      NullOffHeapMemoryStats stats = new NullOffHeapMemoryStats();
+      SlabFactory factory = new SlabFactory() {
+        @Override
+        public Slab create(int size) {
+          return new SlabImpl(size);
+        }
+      };
+      MemoryAllocator ma = 
+        MemoryAllocatorImpl.createForUnitTest(listener, stats, 10, 950, 100, factory);
+      try {
+        assertFalse(listener.isClosed());
+        assertFalse(stats.isClosed());
+        ma.close();
+        assertTrue(listener.isClosed());
+        assertFalse(stats.isClosed());
+        listener = new NullOutOfOffHeapMemoryListener();
+        NullOffHeapMemoryStats stats2 = new NullOffHeapMemoryStats();
+        {
+          SlabImpl slab = new SlabImpl(1024);
+          try {
+            MemoryAllocatorImpl.createForUnitTest(listener, stats2, new SlabImpl[]{slab});
+          } catch (IllegalStateException expected) {
+            assertTrue("unexpected message: " + expected.getMessage(), 
+                expected.getMessage().equals("attempted to reuse existing off-heap memory even though new off-heap memory was allocated"));
+          } finally {
+            slab.free();
+          }
+          assertFalse(stats.isClosed());
+          assertTrue(listener.isClosed());
+          assertTrue(stats2.isClosed());
+        }
+        listener = new NullOutOfOffHeapMemoryListener();
+        stats2 = new NullOffHeapMemoryStats();
+        MemoryAllocator ma2 = MemoryAllocatorImpl.createForUnitTest(listener, stats2, 10, 950, 100, factory);
+        assertSame(ma, ma2);
+        assertTrue(stats.isClosed());
+        assertFalse(listener.isClosed());
+        assertFalse(stats2.isClosed());
+        stats = stats2;
+        ma.close();
+        assertTrue(listener.isClosed());
+        assertFalse(stats.isClosed());
+      } finally {
+        MemoryAllocatorImpl.freeOffHeapMemory();
+      }
+      assertTrue(stats.isClosed());
+    }
+  }
+  @Test
+  public void testBasics() {
+    int BATCH_SIZE = 1;
+    int TINY_MULTIPLE = FreeListManager.TINY_MULTIPLE;
+    int HUGE_MULTIPLE = FreeListManager.HUGE_MULTIPLE;
+    int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
+    int maxTiny = FreeListManager.MAX_TINY-perObjectOverhead;
+    int minHuge = maxTiny+1;
+    int TOTAL_MEM = (maxTiny+perObjectOverhead)*BATCH_SIZE /*+ (maxBig+perObjectOverhead)*BATCH_SIZE*/ + round(TINY_MULTIPLE, minHuge+1+perObjectOverhead)*BATCH_SIZE + (TINY_MULTIPLE+perObjectOverhead)*BATCH_SIZE /*+ (MIN_BIG_SIZE+perObjectOverhead)*BATCH_SIZE*/ + round(TINY_MULTIPLE, minHuge+perObjectOverhead+1);
+    SlabImpl slab = new SlabImpl(TOTAL_MEM);
+    try {
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      assertEquals(TOTAL_MEM, ma.getFreeMemory());
+      assertEquals(TOTAL_MEM, ma.freeList.getFreeFragmentMemory());
+      assertEquals(0, ma.freeList.getFreeTinyMemory());
+      assertEquals(0, ma.freeList.getFreeHugeMemory());
+      StoredObject tinymc = ma.allocate(maxTiny);
+      assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
+      assertEquals(round(TINY_MULTIPLE, maxTiny+perObjectOverhead)*(BATCH_SIZE-1), ma.freeList.getFreeTinyMemory());
+      StoredObject hugemc = ma.allocate(minHuge);
+      assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, minHuge+perObjectOverhead)/*-round(BIG_MULTIPLE, maxBig+perObjectOverhead)*/-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
+      long freeSlab = ma.freeList.getFreeFragmentMemory();
+      long oldFreeHugeMemory = ma.freeList.getFreeHugeMemory();
+      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*(BATCH_SIZE-1), oldFreeHugeMemory);
+      hugemc.release();
+      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead), ma.freeList.getFreeHugeMemory()-oldFreeHugeMemory);
+      assertEquals(TOTAL_MEM/*-round(BIG_MULTIPLE, maxBig+perObjectOverhead)*/-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
+      assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
+      long oldFreeTinyMemory = ma.freeList.getFreeTinyMemory();
+      tinymc.release();
+      assertEquals(round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.freeList.getFreeTinyMemory()-oldFreeTinyMemory);
+      assertEquals(TOTAL_MEM, ma.getFreeMemory());
+      // now lets reallocate from the free lists
+      tinymc = ma.allocate(maxTiny);
+      assertEquals(oldFreeTinyMemory, ma.freeList.getFreeTinyMemory());
+      assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
+      hugemc = ma.allocate(minHuge);
+      assertEquals(oldFreeHugeMemory, ma.freeList.getFreeHugeMemory());
+      assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, minHuge+perObjectOverhead)/*-round(BIG_MULTIPLE, maxBig+perObjectOverhead)*/-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
+      hugemc.release();
+      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead), ma.freeList.getFreeHugeMemory()-oldFreeHugeMemory);
+      assertEquals(TOTAL_MEM/*-round(BIG_MULTIPLE, maxBig+perObjectOverhead)*/-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
+      assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
+      tinymc.release();
+      assertEquals(round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.freeList.getFreeTinyMemory()-oldFreeTinyMemory);
+      assertEquals(TOTAL_MEM, ma.getFreeMemory());
+      // None of the reallocates should have come from the slab.
+      assertEquals(freeSlab, ma.freeList.getFreeFragmentMemory());
+      tinymc = ma.allocate(1);
+      assertEquals(round(TINY_MULTIPLE, 1+perObjectOverhead), tinymc.getSize());
+      assertEquals(freeSlab-(round(TINY_MULTIPLE, 1+perObjectOverhead)*BATCH_SIZE), ma.freeList.getFreeFragmentMemory());
+      freeSlab = ma.freeList.getFreeFragmentMemory();
+      tinymc.release();
+      assertEquals(round(TINY_MULTIPLE, maxTiny+perObjectOverhead)+(round(TINY_MULTIPLE, 1+perObjectOverhead)*BATCH_SIZE), ma.freeList.getFreeTinyMemory()-oldFreeTinyMemory);
+      
+      hugemc = ma.allocate(minHuge+1);
+      assertEquals(round(TINY_MULTIPLE, minHuge+1+perObjectOverhead), hugemc.getSize());
+      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*(BATCH_SIZE-1), ma.freeList.getFreeHugeMemory());
+      hugemc.release();
+      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*BATCH_SIZE, ma.freeList.getFreeHugeMemory());
+      hugemc = ma.allocate(minHuge);
+      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*(BATCH_SIZE-1), ma.freeList.getFreeHugeMemory());
+      if (BATCH_SIZE > 1) {
+        StoredObject hugemc2 = ma.allocate(minHuge);
+        assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*(BATCH_SIZE-2), ma.freeList.getFreeHugeMemory());
+        hugemc2.release();
+        assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*(BATCH_SIZE-1), ma.freeList.getFreeHugeMemory());
+      }
+      hugemc.release();
+      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*BATCH_SIZE, ma.freeList.getFreeHugeMemory());
+      // now that we do compaction the following allocate works.
+      hugemc = ma.allocate(minHuge + HUGE_MULTIPLE + HUGE_MULTIPLE-1);
+    } finally {
+      MemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+  
+  @Test
+  public void testChunkCreateDirectByteBuffer() {
+    SlabImpl slab = new SlabImpl(1024*1024);
+    try {
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      ByteBuffer bb = ByteBuffer.allocate(1024);
+      for (int i=0; i < 1024; i++) {
+        bb.put((byte) i);
+      }
+      bb.position(0);
+      OffHeapStoredObject c = (OffHeapStoredObject) ma.allocateAndInitialize(bb.array(), false, false);
+      assertEquals(1024, c.getDataSize());
+      if (!Arrays.equals(bb.array(), c.getRawBytes())) {
+        fail("arrays are not equal. Expected " + Arrays.toString(bb.array()) + " but found: " + Arrays.toString(c.getRawBytes()));
+      }
+      ByteBuffer dbb = c.createDirectByteBuffer();
+      assertEquals(true, dbb.isDirect());
+      assertEquals(bb, dbb);
+    } finally {
+      MemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+  
+  @Test
+  public void testDebugLog() {
+    MemoryAllocatorImpl.debugLog("test debug log", false);
+    MemoryAllocatorImpl.debugLog("test debug log", true);
+  }
+  @Test
+  public void testGetLostChunks() {
+    SlabImpl slab = new SlabImpl(1024*1024);
+    try {
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      assertEquals(Collections.emptyList(), ma.getLostChunks());
+    } finally {
+      MemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+  @Test
+  public void testFindSlab() {
+    final int SLAB_SIZE = 1024*1024;
+    SlabImpl slab = new SlabImpl(SLAB_SIZE);
+    try {
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      assertEquals(0, ma.findSlab(slab.getMemoryAddress()));
+      assertEquals(0, ma.findSlab(slab.getMemoryAddress()+SLAB_SIZE-1));
+      try {
+        ma.findSlab(slab.getMemoryAddress()-1);
+        fail("expected IllegalStateException");
+      } catch (IllegalStateException expected) {
+      }
+      try {
+        ma.findSlab(slab.getMemoryAddress()+SLAB_SIZE);
+        fail("expected IllegalStateException");
+      } catch (IllegalStateException expected) {
+      }
+    } finally {
+      MemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+  @Test
+  public void testValidateAddressAndSize() {
+    final int SLAB_SIZE = 1024*1024;
+    SlabImpl slab = new SlabImpl(SLAB_SIZE);
+    try {
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      try {
+        MemoryAllocatorImpl.validateAddress(0L);
+        fail("expected IllegalStateException");
+      } catch (IllegalStateException expected) {
+        assertEquals("Unexpected exception message: " + expected.getMessage(), true, expected.getMessage().contains("addr was smaller than expected"));
+      }
+      try {
+        MemoryAllocatorImpl.validateAddress(1L);
+        fail("expected IllegalStateException");
+      } catch (IllegalStateException expected) {
+        assertEquals("Unexpected exception message: " + expected.getMessage(), true, expected.getMessage().contains("Valid addresses must be in one of the following ranges:"));
+      }
+      MemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress(), SLAB_SIZE, false);
+      MemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress(), SLAB_SIZE, true);
+      MemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress(), -1, true);
+      try {
+        MemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress()-1, SLAB_SIZE, true);
+        fail("expected IllegalStateException");
+      } catch (IllegalStateException expected) {
+        assertEquals("Unexpected exception message: " + expected.getMessage(), true, expected.getMessage().equals(" address 0x" + Long.toString(slab.getMemoryAddress()-1, 16) + " does not address the original slab memory"));
+      }
+      try {
+        MemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress(), SLAB_SIZE+1, true);
+        fail("expected IllegalStateException");
+      } catch (IllegalStateException expected) {
+        assertEquals("Unexpected exception message: " + expected.getMessage(), true, expected.getMessage().equals(" address 0x" + Long.toString(slab.getMemoryAddress()+SLAB_SIZE, 16) + " does not address the original slab memory"));
+      }
+    } finally {
+      MemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+  @Test
+  public void testMemoryInspection() {
+    final int SLAB_SIZE = 1024*1024;
+    SlabImpl slab = new SlabImpl(SLAB_SIZE);
+    try {
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      MemoryInspector inspector = ma.getMemoryInspector();
+      assertNotNull(inspector);
+      assertEquals(null, inspector.getFirstBlock());
+      assertEquals(Collections.emptyList(), inspector.getSnapshot());
+      assertEquals(Collections.emptyList(), inspector.getAllocatedBlocks());
+      assertEquals(null, inspector.getBlockAfter(null));
+      inspector.createSnapshot();
+      // call this twice for code coverage
+      inspector.createSnapshot();
+      try {
+        assertEquals(inspector.getAllBlocks(), inspector.getSnapshot());
+        MemoryBlock firstBlock = inspector.getFirstBlock();
+        assertNotNull(firstBlock);
+        assertEquals(1024*1024, firstBlock.getBlockSize());
+        assertEquals("N/A", firstBlock.getDataType());
+        assertEquals(-1, firstBlock.getFreeListId());
+        assertTrue(firstBlock.getAddress() > 0);
+        assertNull(firstBlock.getNextBlock());
+        assertEquals(0, firstBlock.getRefCount());
+        assertEquals(0, firstBlock.getSlabId());
+        assertEquals(MemoryBlock.State.UNUSED, firstBlock.getState());
+        assertFalse(firstBlock.isCompressed());
+        assertFalse(firstBlock.isSerialized());
+        assertEquals(null, inspector.getBlockAfter(firstBlock));
+      } finally {
+        inspector.clearSnapshot();
+      }
+    } finally {
+      MemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+
+  @Test
+  public void testClose() {
+    System.setProperty(MemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "false");
+    SlabImpl slab = new SlabImpl(1024*1024);
+    boolean freeSlab = true;
+    SlabImpl[] slabs = new SlabImpl[]{slab};
+    try {
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), slabs);
+      ma.close();
+      ma.close();
+      System.setProperty(MemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "true");
+      try {
+        ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), slabs);
+        ma.close();
+        freeSlab = false;
+        ma.close();
+      } finally {
+        System.clearProperty(MemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY);
+      }
+    } finally {
+      if (freeSlab) {
+        MemoryAllocatorImpl.freeOffHeapMemory();
+      }
+    }
+    
+  }
+  
+  @Test
+  public void testCompaction() {
+    final int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
+    final int BIG_ALLOC_SIZE = 150000;
+    final int SMALL_ALLOC_SIZE = BIG_ALLOC_SIZE/2;
+    final int TOTAL_MEM = BIG_ALLOC_SIZE;
+    SlabImpl slab = new SlabImpl(TOTAL_MEM);
+    try {
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      StoredObject bmc = ma.allocate(BIG_ALLOC_SIZE-perObjectOverhead);
+      try {
+        StoredObject smc = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
+        fail("Expected out of memory");
+      } catch (OutOfOffHeapMemoryException expected) {
+      }
+      bmc.release();
+      assertEquals(TOTAL_MEM, ma.freeList.getFreeMemory());
+      StoredObject smc1 = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
+      StoredObject smc2 = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
+      smc2.release();
+      assertEquals(TOTAL_MEM-SMALL_ALLOC_SIZE, ma.freeList.getFreeMemory());
+      try {
+        bmc = ma.allocate(BIG_ALLOC_SIZE-perObjectOverhead);
+        fail("Expected out of memory");
+      } catch (OutOfOffHeapMemoryException expected) {
+      }
+      smc1.release();
+      assertEquals(TOTAL_MEM, ma.freeList.getFreeMemory());
+      bmc = ma.allocate(BIG_ALLOC_SIZE-perObjectOverhead);
+      bmc.release();
+      assertEquals(TOTAL_MEM, ma.freeList.getFreeMemory());
+      ArrayList<StoredObject> mcs = new ArrayList<StoredObject>();
+      for (int i=0; i < BIG_ALLOC_SIZE/(8+perObjectOverhead); i++) {
+        mcs.add(ma.allocate(8));
+      }
+      checkMcs(mcs);
+      assertEquals(0, ma.freeList.getFreeMemory());
+      try {
+        ma.allocate(8);
+        fail("expected out of memory");
+      } catch (OutOfOffHeapMemoryException expected) {
+      }
+      mcs.remove(0).release(); // frees 8+perObjectOverhead
+      assertEquals(8+perObjectOverhead, ma.freeList.getFreeMemory());
+      mcs.remove(0).release(); // frees 8+perObjectOverhead
+      assertEquals((8+perObjectOverhead)*2, ma.freeList.getFreeMemory());
+      ma.allocate(16).release(); // allocates and frees 16+perObjectOverhead; still have perObjectOverhead
+      assertEquals((8+perObjectOverhead)*2, ma.freeList.getFreeMemory());
+      mcs.remove(0).release(); // frees 8+perObjectOverhead
+      assertEquals((8+perObjectOverhead)*3, ma.freeList.getFreeMemory());
+      mcs.remove(0).release(); // frees 8+perObjectOverhead
+      assertEquals((8+perObjectOverhead)*4, ma.freeList.getFreeMemory());
+      // At this point I should have 8*4 + perObjectOverhead*4 of free memory
+      ma.allocate(8*4+perObjectOverhead*3).release();
+      assertEquals((8+perObjectOverhead)*4, ma.freeList.getFreeMemory());
+      mcs.remove(0).release(); // frees 8+perObjectOverhead
+      assertEquals((8+perObjectOverhead)*5, ma.freeList.getFreeMemory());
+      // At this point I should have 8*5 + perObjectOverhead*5 of free memory
+      try {
+        ma.allocate((8*5+perObjectOverhead*4)+1);
+        fail("expected out of memory");
+      } catch (OutOfOffHeapMemoryException expected) {
+      }
+      mcs.remove(0).release(); // frees 8+perObjectOverhead
+      assertEquals((8+perObjectOverhead)*6, ma.freeList.getFreeMemory());
+      checkMcs(mcs);
+      // At this point I should have 8*6 + perObjectOverhead*6 of free memory
+      StoredObject mc24 = ma.allocate(24);
+      checkMcs(mcs);
+      assertEquals((8+perObjectOverhead)*6 - (24+perObjectOverhead), ma.freeList.getFreeMemory());
+      // At this point I should have 8*3 + perObjectOverhead*5 of free memory
+      StoredObject mc16 = ma.allocate(16);
+      checkMcs(mcs);
+      assertEquals((8+perObjectOverhead)*6 - (24+perObjectOverhead) - (16+perObjectOverhead), ma.freeList.getFreeMemory());
+      // At this point I should have 8*1 + perObjectOverhead*4 of free memory
+      mcs.add(ma.allocate(8));
+      checkMcs(mcs);
+      assertEquals((8+perObjectOverhead)*6 - (24+perObjectOverhead) - (16+perObjectOverhead) - (8+perObjectOverhead), ma.freeList.getFreeMemory());
+      // At this point I should have 8*0 + perObjectOverhead*3 of free memory
+      StoredObject mcDO = ma.allocate(perObjectOverhead*2);
+      checkMcs(mcs);
+      // At this point I should have 8*0 + perObjectOverhead*0 of free memory
+      assertEquals(0, ma.freeList.getFreeMemory());
+      try {
+        ma.allocate(1);
+        fail("expected out of memory");
+      } catch (OutOfOffHeapMemoryException expected) {
+      }
+      checkMcs(mcs);
+      assertEquals(0, ma.freeList.getFreeMemory());
+      mcDO.release();
+      assertEquals((perObjectOverhead*3), ma.freeList.getFreeMemory());
+      mcs.remove(mcs.size()-1).release();
+      assertEquals((perObjectOverhead*3)+(8+perObjectOverhead), ma.freeList.getFreeMemory());
+      mc16.release();
+      assertEquals((perObjectOverhead*3)+(8+perObjectOverhead)+(16+perObjectOverhead), ma.freeList.getFreeMemory());
+      mc24.release();
+      assertEquals((perObjectOverhead*3)+(8+perObjectOverhead)+(16+perObjectOverhead)+(24+perObjectOverhead), ma.freeList.getFreeMemory());
+      
+      long freeMem = ma.freeList.getFreeMemory();
+      for (StoredObject mc: mcs) {
+        mc.release();
+        assertEquals(freeMem+(8+perObjectOverhead), ma.freeList.getFreeMemory());
+        freeMem += (8+perObjectOverhead);
+      }
+      mcs.clear();
+      assertEquals(TOTAL_MEM, ma.freeList.getFreeMemory());
+      bmc = ma.allocate(BIG_ALLOC_SIZE-perObjectOverhead);
+      bmc.release();
+    } finally {
+      MemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+  
+  long expectedMemoryUsage;
+  boolean memoryUsageEventReceived;
+  @Test
+  public void testUsageEventListener() {
+    final int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
+    final int SMALL_ALLOC_SIZE = 1000;
+    SlabImpl slab = new SlabImpl(3000);
+    try {
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      MemoryUsageListener listener = new MemoryUsageListener() {
+        @Override
+        public void updateMemoryUsed(final long bytesUsed) {
+          MemoryAllocatorJUnitTest.this.memoryUsageEventReceived = true;
+          assertEquals(MemoryAllocatorJUnitTest.this.expectedMemoryUsage, bytesUsed);
+        }
+      };
+      ma.addMemoryUsageListener(listener);
+      
+      this.expectedMemoryUsage = SMALL_ALLOC_SIZE;
+      this.memoryUsageEventReceived = false;
+      StoredObject smc = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
+      assertEquals(true, this.memoryUsageEventReceived);
+      
+      this.expectedMemoryUsage = SMALL_ALLOC_SIZE * 2;
+      this.memoryUsageEventReceived = false;
+      smc = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
+      assertEquals(true, this.memoryUsageEventReceived);
+      
+      MemoryUsageListener unaddedListener = new MemoryUsageListener() {
+        @Override
+        public void updateMemoryUsed(final long bytesUsed) {
+          throw new IllegalStateException("Should never be called");
+        }
+      };
+      ma.removeMemoryUsageListener(unaddedListener);
+      
+      ma.removeMemoryUsageListener(listener);
+      
+      ma.removeMemoryUsageListener(unaddedListener);
+
+      this.expectedMemoryUsage = SMALL_ALLOC_SIZE * 2;
+      this.memoryUsageEventReceived = false;
+      smc = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
+      assertEquals(false, this.memoryUsageEventReceived);
+      
+    } finally {
+      MemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+  private void checkMcs(ArrayList<StoredObject> mcs) {
+    for (StoredObject mc: mcs) {
+      assertEquals(8+8, mc.getSize());
+    }
+  }
+  
+  @Test
+  public void testOutOfOffHeapMemory() {
+    final int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
+    final int BIG_ALLOC_SIZE = 150000;
+    final int SMALL_ALLOC_SIZE = BIG_ALLOC_SIZE/2;
+    final int TOTAL_MEM = BIG_ALLOC_SIZE;
+    final SlabImpl slab = new SlabImpl(TOTAL_MEM);
+    final AtomicReference<OutOfOffHeapMemoryException> ooom = new AtomicReference<OutOfOffHeapMemoryException>();
+    final OutOfOffHeapMemoryListener oooml = new OutOfOffHeapMemoryListener() {
+      @Override
+      public void outOfOffHeapMemory(OutOfOffHeapMemoryException cause) {
+        ooom.set(cause);
+      }
+      @Override
+      public void close() {
+      }
+    };
+    try {
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(oooml, new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      // make a big allocation
+      StoredObject bmc = ma.allocate(BIG_ALLOC_SIZE-perObjectOverhead);
+      assertNull(ooom.get());
+      // drive the ma to ooom with small allocations
+      try {
+        StoredObject smc = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
+        fail("Expected out of memory");
+      } catch (OutOfOffHeapMemoryException expected) {
+      }
+      assertNotNull(ooom.get());
+      assertTrue(ooom.get().getMessage().contains("Out of off-heap memory. Could not allocate size of "));
+    } finally {
+      MemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java
index e1c3f4e..f0563ad 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java
@@ -46,7 +46,7 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class MemoryBlockNodeJUnitTest {
 
-  private SimpleMemoryAllocatorImpl ma;
+  private MemoryAllocatorImpl ma;
   private OutOfOffHeapMemoryListener ooohml;
   private OffHeapMemoryStats stats;
   private Slab[] slabs = {
@@ -82,12 +82,12 @@ public class MemoryBlockNodeJUnitTest {
   public void setUp() {
     ooohml = mock(OutOfOffHeapMemoryListener.class);
     stats = mock(OffHeapMemoryStats.class);
-    ma = (SimpleMemoryAllocatorImpl) SimpleMemoryAllocatorImpl.createForUnitTest(ooohml, stats, slabs);
+    ma = (MemoryAllocatorImpl) MemoryAllocatorImpl.createForUnitTest(ooohml, stats, slabs);
   }
 
   @After
   public void tearDown() {
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    MemoryAllocatorImpl.freeOffHeapMemory();
   }
   
   protected Object getValue() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
index fa4e776..95b6869 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapHelperJUnitTest.java
@@ -47,7 +47,7 @@ public class OffHeapHelperJUnitTest extends AbstractStoredObjectTestBase {
     OutOfOffHeapMemoryListener ooohml = mock(OutOfOffHeapMemoryListener.class);
     OffHeapMemoryStats stats = mock(OffHeapMemoryStats.class);
 
-    ma = SimpleMemoryAllocatorImpl.create(ooohml, stats, 3, OffHeapStorage.MIN_SLAB_SIZE * 3, OffHeapStorage.MIN_SLAB_SIZE);
+    ma = MemoryAllocatorImpl.create(ooohml, stats, 3, OffHeapStorage.MIN_SLAB_SIZE * 3, OffHeapStorage.MIN_SLAB_SIZE);
 
   }
 
@@ -71,7 +71,7 @@ public class OffHeapHelperJUnitTest extends AbstractStoredObjectTestBase {
 
   @After
   public void tearDown() {
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    MemoryAllocatorImpl.freeOffHeapMemory();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapIndexJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapIndexJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapIndexJUnitTest.java
index ec494e8..571060b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapIndexJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapIndexJUnitTest.java
@@ -57,7 +57,7 @@ public class OffHeapIndexJUnitTest {
   @After
   public void tearDown() {
     this.gfc.close();
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    MemoryAllocatorImpl.freeOffHeapMemory();
     // TODO cleanup default disk store files
   }
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
index ae1b35d..fb1aa41 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
@@ -75,7 +75,7 @@ public abstract class OffHeapRegionBase {
   private void closeCache(GemFireCacheImpl gfc, boolean keepOffHeapAllocated) {
     gfc.close();
     if (!keepOffHeapAllocated) {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+      MemoryAllocatorImpl.freeOffHeapMemory();
     }
     // TODO cleanup default disk store files
   }
@@ -100,7 +100,7 @@ public abstract class OffHeapRegionBase {
       assertEquals(0, ma.getUsedMemory());
       // do an allocation larger than the slab size
       // TODO: currently the compact will product slabs bigger than the max slab size
-      // (see the todo comment on compact() in SimpleMemoryAllocator).
+      // (see the todo comment on compact() in FreeListManager).
       // So we request 20m here since that it the total size.
       try {
         ma.allocate(1024*1024*20);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
index cf47a72..5cb6afb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelperJUnitTest.java
@@ -65,12 +65,12 @@ public class OffHeapRegionEntryHelperJUnitTest {
     OutOfOffHeapMemoryListener ooohml = mock(OutOfOffHeapMemoryListener.class);
     OffHeapMemoryStats stats = mock(OffHeapMemoryStats.class);
 
-    ma = SimpleMemoryAllocatorImpl.create(ooohml, stats, 1, OffHeapStorage.MIN_SLAB_SIZE * 1, OffHeapStorage.MIN_SLAB_SIZE);
+    ma = MemoryAllocatorImpl.create(ooohml, stats, 1, OffHeapStorage.MIN_SLAB_SIZE * 1, OffHeapStorage.MIN_SLAB_SIZE);
   }
 
   @After
   public void tearDown() {
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    MemoryAllocatorImpl.freeOffHeapMemory();
   }
 
   private OffHeapStoredObject createChunk(Object value) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
index d878358..d30d4c4 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
@@ -152,7 +152,7 @@ public class OffHeapStorageJUnitTest {
     StatisticsFactory localStatsFactory = new LocalStatisticsFactory(null);
     InternalDistributedSystem ids = mock(InternalDistributedSystem.class);
     MemoryAllocator ma = OffHeapStorage.createOffHeapStorage(localStatsFactory, OffHeapStorage.MIN_SLAB_SIZE, ids);
-    System.setProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "true");
+    System.setProperty(MemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "true");
     ma.close();
   }
 
@@ -260,11 +260,11 @@ public class OffHeapStorageJUnitTest {
       verify(ooohml).outOfOffHeapMemory(ex);
 
     } finally {
-      System.setProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "true");
+      System.setProperty(MemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "true");
       try {
         ma.close();
       } finally {
-        System.clearProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY);
+        System.clearProperty(MemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java
index 884787f..1d19854 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectAddressStackJUnitTest.java
@@ -107,13 +107,13 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
   public void stackCreatedWithAddressIsNotEmpty() {
     SlabImpl slab = new SlabImpl(1024);
     try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
       OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
 
       OffHeapStoredObjectAddressStack stack = new OffHeapStoredObjectAddressStack(chunk.getAddress());
       assertEquals(false, stack.isEmpty());
     } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+      MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
 
@@ -121,14 +121,14 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
   public void stackWithChunkIsNotEmpty() {
     SlabImpl slab = new SlabImpl(1024);
     try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
       OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
 
       OffHeapStoredObjectAddressStack stack = new OffHeapStoredObjectAddressStack();
       stack.offer(chunk.getAddress());
       assertEquals(false, stack.isEmpty());
     } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+      MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
 
@@ -136,7 +136,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
   public void stackWithChunkTopEqualsAddress() {
     SlabImpl slab = new SlabImpl(1024);
     try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
       OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
 
       long addr = chunk.getAddress();
@@ -144,7 +144,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
       stack.offer(addr);
       assertEquals(addr, stack.getTopAddress());
     } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+      MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
 
@@ -163,7 +163,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
   public void stackWithChunkClearReturnsAddressAndEmptiesStack() {
     SlabImpl slab = new SlabImpl(1024);
     try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
       OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
 
       long addr = chunk.getAddress();
@@ -173,7 +173,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
       assertEquals(addr, clearAddr);
       assertEquals(true, stack.isEmpty());
     } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+      MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
 
@@ -181,7 +181,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
   public void stackWithChunkPollReturnsAddressAndEmptiesStack() {
     SlabImpl slab = new SlabImpl(1024);
     try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
       OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
 
       long addr = chunk.getAddress();
@@ -191,7 +191,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
       assertEquals(addr, pollAddr);
       assertEquals(true, stack.isEmpty());
     } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+      MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
 
@@ -199,7 +199,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
   public void stackWithChunkTotalSizeIsChunkSize() {
     SlabImpl slab = new SlabImpl(1024);
     try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
       OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
       int chunkSize = chunk.getSize();
 
@@ -208,7 +208,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
       stack.offer(addr);
       assertEquals(chunkSize, stack.computeTotalSize());
     } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+      MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
 
@@ -217,7 +217,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
   public void stackWithChunkLogShowsMsgAndSize() {
     SlabImpl slab = new SlabImpl(1024);
     try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
       OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
       int chunkSize = chunk.getSize();
 
@@ -228,15 +228,15 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
       stack.logSizes(lw, "foo");
       verify(lw).info("foo"+chunkSize);
     } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+      MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
   
   private class TestableSyncChunkStack extends OffHeapStoredObjectAddressStack {
     public boolean doConcurrentMod = true;
     public int chunk2Size;
-    private SimpleMemoryAllocatorImpl ma;
-    TestableSyncChunkStack(SimpleMemoryAllocatorImpl ma) {
+    private MemoryAllocatorImpl ma;
+    TestableSyncChunkStack(MemoryAllocatorImpl ma) {
       this.ma = ma;
     }
     @Override
@@ -253,7 +253,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
   public void stackWithChunkTotalSizeIsChunkSizeWithConcurrentMod() {
     SlabImpl slab = new SlabImpl(1024);
     try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
       OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
       int chunkSize = chunk.getSize();
 
@@ -263,7 +263,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
       long totalSize = stack.computeTotalSize();
       assertEquals("chunkSize=" + chunkSize + " chunk2Size=" + stack.chunk2Size, chunkSize + stack.chunk2Size, totalSize);
     } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+      MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
 
@@ -272,7 +272,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
   public void stackWithChunkLogShowsMsgAndSizeWithConcurrentMod() {
     SlabImpl slab = new SlabImpl(1024);
     try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
+      MemoryAllocatorImpl ma = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
       OffHeapStoredObject chunk = (OffHeapStoredObject) ma.allocate(100);
       int chunkSize = chunk.getSize();
 
@@ -284,7 +284,7 @@ public class OffHeapStoredObjectAddressStackJUnitTest {
       verify(lw).info("foo"+chunkSize);
       verify(lw).info("foo"+stack.chunk2Size);
     } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+      MemoryAllocatorImpl.freeOffHeapMemory();
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java
index 956acb4..85c8d4c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObjectJUnitTest.java
@@ -63,12 +63,12 @@ public class OffHeapStoredObjectJUnitTest extends AbstractStoredObjectTestBase {
     OutOfOffHeapMemoryListener ooohml = mock(OutOfOffHeapMemoryListener.class);
     OffHeapMemoryStats stats = mock(OffHeapMemoryStats.class);
 
-    ma = SimpleMemoryAllocatorImpl.create(ooohml, stats, 3, OffHeapStorage.MIN_SLAB_SIZE * 3, OffHeapStorage.MIN_SLAB_SIZE);
+    ma = MemoryAllocatorImpl.create(ooohml, stats, 3, OffHeapStorage.MIN_SLAB_SIZE * 3, OffHeapStorage.MIN_SLAB_SIZE);
   }
 
   @After
   public void tearDown() {
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    MemoryAllocatorImpl.freeOffHeapMemory();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
index f8a5c8e..aa09449 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
@@ -184,7 +184,7 @@ public class OffHeapValidationJUnitTest {
     MemoryBlock firstBlock = inspector.getFirstBlock();
     assertEquals(MemoryBlock.State.UNUSED, firstBlock.getState());
     
-    //System.out.println(((SimpleMemoryAllocatorImpl)inspector).getSnapshot());
+    //System.out.println(((MemoryAllocatorImpl)inspector).getSnapshot());
     
     // sort the ExpectedValues into the same order as the MemberBlocks from inspector
     Collections.sort(expected, 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java
index 7157eaa..5d79192 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java
@@ -33,7 +33,7 @@ import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.offheap.NullOffHeapMemoryStats;
 import com.gemstone.gemfire.internal.offheap.NullOutOfOffHeapMemoryListener;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.SlabImpl;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
@@ -43,16 +43,16 @@ public class OffHeapWriteObjectAsByteArrayJUnitTest {
 
   @Before
   public void setUp() throws Exception {
-    SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
+    MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
   }
 
   @After
   public void tearDown() throws Exception {
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    MemoryAllocatorImpl.freeOffHeapMemory();
   }
   
   private StoredObject createStoredObject(byte[] bytes, boolean isSerialized, boolean isCompressed) {
-    return SimpleMemoryAllocatorImpl.getAllocator().allocateAndInitialize(bytes, isSerialized, isCompressed);
+    return MemoryAllocatorImpl.getAllocator().allocateAndInitialize(bytes, isSerialized, isCompressed);
   }
   
   private DataInputStream createInput(HeapDataOutputStream hdos) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
index 25de4ea..9c2e5e8 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
@@ -91,7 +91,7 @@ public class OutOfOffHeapMemoryDUnitTest extends CacheTestCase {
   @SuppressWarnings("unused") // invoked by reflection from tearDown2()
   private static void cleanup() {
     disconnectFromDS();
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    MemoryAllocatorImpl.freeOffHeapMemory();
     cache.set(null);
     system.set(null);
     isSmallerVM.set(false);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternIntegrationTest.java
deleted file mode 100644
index 51bc0a2..0000000
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternIntegrationTest.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.offheap;
-
-import static org.junit.Assert.*;
-
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Random;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-/**
- * Tests fill pattern validation for the {@link SimpleMemoryAllocatorImpl}.
- */
-@Category(IntegrationTest.class)
-public class SimpleMemoryAllocatorFillPatternIntegrationTest {
-  private static Random random = ThreadLocalRandom.current();
-
-  /**
-   * Chunk operation types.
-   */
-  static enum Operation {
-    ALLOCATE,
-    FREE,
-    WRITE;
-    
-    // Holds all Operation values
-    private static Operation[] values = Operation.values(); 
-    
-    static Operation randomOperation() {
-      return values[random.nextInt(values.length)];
-    }
-  };
-  
-  /** Number of worker threads for advanced tests. */
-  private static final int WORKER_THREAD_COUNT = 5;
-  
-  /** Size of single test slab.*/
-  private static final int SLAB_SIZE = 1024 * 1024 * 50;
-  
-  /** Maximum number of bytes a worker thread can allocate during advanced tests.  */
-  private static final int MAX_WORKER_ALLOCATION_TOTAL_SIZE = SLAB_SIZE / WORKER_THREAD_COUNT / 2;
-  
-  /** Maximum allocation for a single Chunk.  */
-  private static final int MAX_WORKER_ALLOCATION_SIZE = 512;
-  
-  /** Canned data for write operations. */
-  private static final byte[] WRITE_BYTES = new String("Some string data.").getBytes();
-  
-  /** Minimum size for write operations. */
-  private static final int MIN_WORKER_ALLOCATION_SIZE = WRITE_BYTES.length;
-
-  /** Runtime for worker threads. */
-  private static final long RUN_TIME_IN_MILLIS = 1 * 1000 * 5;
-  
-  /** Chunk size for basic huge allocation test. */
-  private static final int HUGE_CHUNK_SIZE = 1024 * 200;
-  
-  /** Our test victim. */
-  private SimpleMemoryAllocatorImpl allocator = null;
-  
-  /** Our test victim's memory slab. */
-  private SlabImpl slab = null;
-
-  /**
-   * Enables fill validation and creates the test victim.
-   */
-  @Before
-  public void setUp() throws Exception {
-    System.setProperty("gemfire.validateOffHeapWithFill", "true");
-    this.slab = new SlabImpl(SLAB_SIZE);
-    this.allocator = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{this.slab});
-  }
-
-  /**
-   * Frees off heap memory.
-   */
-  @After
-  public void tearDown() throws Exception {
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-    System.clearProperty("gemfire.validateOffHeapWithFill");
-  }
-  
-  /**
-   * This test hammers a SimpleMemoryAllocatorImpl with multiple threads exercising
-   * the fill validation of tiny Chunks for one minute.  This, of course, exercises many aspects of
-   * the SimpleMemoryAllocatorImpl and its helper classes.
-   * @throws Exception
-   */
-  @Test
-  public void testFillPatternAdvancedForTinyAllocations() throws Exception { 
-    doFillPatternAdvancedTest(new ChunkSizer() {
-      @Override
-      public int allocationSize() {
-        int allocation = random.nextInt(MAX_WORKER_ALLOCATION_SIZE+1);
-        
-        while(allocation < MIN_WORKER_ALLOCATION_SIZE) {
-          allocation = random.nextInt(MAX_WORKER_ALLOCATION_SIZE+1);
-        }
-        return allocation;
-      }
-    });
-  }
-
-  /**
-   * This test hammers a SimpleMemoryAllocatorImpl with multiple threads exercising
-   * the fill validation of huge Chunks for one minute.  This, of course, exercises many aspects of
-   * the SimpleMemoryAllocatorImpl and its helper classes.
-   * @throws Exception
-   */
-  @Test
-  public void testFillPatternAdvancedForHugeAllocations() throws Exception {
-    doFillPatternAdvancedTest(new ChunkSizer() {
-      @Override
-      public int allocationSize() {
-        return HUGE_CHUNK_SIZE;
-      }
-    });
-  }
-  
-  private interface ChunkSizer {
-    int allocationSize();
-  }
-  
-  private void doFillPatternAdvancedTest(final ChunkSizer chunkSizer) throws InterruptedException {
-    // Used to manage worker thread completion
-    final CountDownLatch latch = new CountDownLatch(WORKER_THREAD_COUNT);
-    
-    // Use to track any errors the worker threads will encounter
-    final List<Throwable> threadErrorList = Collections.synchronizedList(new LinkedList<Throwable>());
-    
-    /*
-     * Start up a number of worker threads.  These threads will randomly allocate, free,
-     * and write to Chunks.
-     */
-    for(int i = 0;i < WORKER_THREAD_COUNT;++i) {
-      new Thread(new Runnable() {
-        // Total allocation in bytes for this thread
-        private int totalAllocation = 0;
-        
-        // List of Chunks allocated by this thread
-        private List<OffHeapStoredObject> chunks = new LinkedList<OffHeapStoredObject>();
-        
-        // Time to end thread execution
-        private long endTime = System.currentTimeMillis() + RUN_TIME_IN_MILLIS;
-        
-        /**
-         * Allocates a chunk and adds it to the thread's Chunk list.
-         */
-        private void allocate() {          
-          int allocation = chunkSizer.allocationSize();
-          OffHeapStoredObject chunk = (OffHeapStoredObject) allocator.allocate(allocation);
-          
-          // This should always work just after allocation
-          chunk.validateFill();
-          
-          chunks.add(chunk);
-          totalAllocation += chunk.getSize();
-        }
-        
-        /**
-         * Frees a random chunk from the Chunk list.
-         */
-        private void free() {
-          OffHeapStoredObject chunk = chunks.remove(random.nextInt(chunks.size()));
-          totalAllocation -= chunk.getSize();
-          
-          /*
-           * Chunk is filled here but another thread may have already grabbed it so we
-           * cannot validate the fill.
-           */
-          chunk.release(); 
-        }
-        
-        /**
-         * Writes canned data to a random Chunk from the Chunk list.
-         */
-        private void write() {
-          OffHeapStoredObject chunk = chunks.get(random.nextInt(chunks.size()));
-          chunk.writeDataBytes(0, WRITE_BYTES);
-        }
-        
-        /**
-         * Randomly selects Chunk operations and executes them
-         * for a period of time.  Collects any error thrown during execution.
-         */
-        @Override
-        public void run() {
-          try {
-            for(long currentTime = System.currentTimeMillis();currentTime < endTime;currentTime = System.currentTimeMillis()) {
-              Operation op = (totalAllocation == 0 ? Operation.ALLOCATE : (totalAllocation >= MAX_WORKER_ALLOCATION_TOTAL_SIZE ? Operation.FREE : Operation.randomOperation()));
-              switch(op) {
-              case ALLOCATE:
-                allocate();
-                break;
-              case FREE:
-                free();
-                break;
-              case WRITE:
-                write();
-                break;
-              }
-            }
-          } catch (Throwable t) {
-            threadErrorList.add(t);
-          } finally {
-            latch.countDown();
-          }
-       }        
-      }).start();
-    }
-    
-    // Make sure each thread ended cleanly
-    assertTrue(latch.await(2, TimeUnit.MINUTES));
-    
-    // Fail on the first error we find
-    if(!threadErrorList.isEmpty()) {
-      fail(threadErrorList.get(0).getMessage());
-    }
-  }
-  
-}


[31/54] [abbrv] incubator-geode git commit: GEODE-1007 CI failure: ClientAuthroizationTwoDUnitTest.testAllOpsWithFailover2

Posted by je...@apache.org.
GEODE-1007 CI failure: ClientAuthroizationTwoDUnitTest.testAllOpsWithFailover2

The previous fix caused ClientAuthorizationDUnitTest.testAllOpsWithFailover
to have problems.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f4b20379
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f4b20379
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f4b20379

Branch: refs/heads/feature/GEODE-17-2
Commit: f4b203793e0cb1b16a09cc3ae6eed570ecfd1ef4
Parents: 79d2990
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Wed Mar 16 11:00:41 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Wed Mar 16 12:41:20 2016 -0700

----------------------------------------------------------------------
 .../security/ClientAuthorizationTestBase.java   | 25 +++++++++++++-------
 1 file changed, 16 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f4b20379/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
index cc468e1..8476ae2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
@@ -855,12 +855,17 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
       Properties serverProps = buildProperties(authenticator, accessor, false,
           extraAuthProps, extraAuthzProps);
       // Get ports for the servers
-      int port1 = 0;
+      Keeper locator1PortKeeper = AvailablePort.getRandomAvailablePortKeeper(AvailablePort.SOCKET);
+      Keeper locator2PortKeeper = AvailablePort.getRandomAvailablePortKeeper(AvailablePort.SOCKET);
+      Keeper port1Keeper = AvailablePort.getRandomAvailablePortKeeper(AvailablePort.SOCKET);
       Keeper port2Keeper = AvailablePort.getRandomAvailablePortKeeper(AvailablePort.SOCKET);
+      int locator1Port = locator1PortKeeper.getPort();
+      int locator2Port = locator2PortKeeper.getPort();
+      int port1 = port1Keeper.getPort();
       int port2 = port2Keeper.getPort();
 
       // Perform all the ops on the clients
-      List<OperationWithAction> opBlock = new ArrayList<>();
+      List opBlock = new ArrayList();
       Random rnd = new Random();
       for (int opNum = 0; opNum < opCodes.length; ++opNum) {
         // Start client with valid credentials as specified in
@@ -871,20 +876,22 @@ public class ClientAuthorizationTestBase extends DistributedTestCase {
           // End of current operation block; execute all the operations
           // on the servers with/without failover
           if (opBlock.size() > 0) {
+            locator1PortKeeper.release();
+            port1Keeper.release();
             // Start the first server and execute the operation block
-            final int locatorPort = 0;
-            port1 = server1.invoke(() -> ClientAuthorizationTestBase.createCacheServer(
-                    locatorPort, 0, serverProps,
+            server1.invoke(() -> ClientAuthorizationTestBase.createCacheServer(
+                    locator1Port, port1, serverProps,
                     javaProps ));
             server2.invoke(() -> SecurityTestUtil.closeCache());
             executeOpBlock(opBlock, port1, port2, authInit, extraAuthProps,
                 extraAuthzProps, tgen, rnd);
             if (!currentOp.equals(OperationWithAction.OPBLOCK_NO_FAILOVER)) {
               // Failover to the second server and run the block again
-              final String locatorString = null;
-              port2 = server2.invoke(() -> SecurityTestUtil.createCacheServer(
-                      serverProps, javaProps, null, locatorString, 0, Boolean.TRUE,
-                          SecurityTestUtil.NO_EXCEPTION ));
+              locator2PortKeeper.release();
+              port2Keeper.release();
+              server2.invoke(() -> ClientAuthorizationTestBase.createCacheServer(
+                      locator2Port, port2, serverProps,
+                      javaProps ));
               server1.invoke(() -> SecurityTestUtil.closeCache());
               executeOpBlock(opBlock, port1, port2, authInit, extraAuthProps,
                   extraAuthzProps, tgen, rnd);


[30/54] [abbrv] incubator-geode git commit: GEODE-1099: NPE thrown from TXManagerImpl.isDistributed()

Posted by je...@apache.org.
GEODE-1099: NPE thrown from TXManagerImpl.isDistributed()

fixing the DistTXManagerImplJUnitTest that was overriding the test added
in the last commit for this issue.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/79d2990e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/79d2990e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/79d2990e

Branch: refs/heads/feature/GEODE-17-2
Commit: 79d2990eb2be920e93a5bb413830db0c8458fb91
Parents: 82faa8a
Author: Swapnil Bawaskar <sb...@pivotal.io>
Authored: Wed Mar 16 10:28:11 2016 -0700
Committer: Swapnil Bawaskar <sb...@pivotal.io>
Committed: Wed Mar 16 12:40:31 2016 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java    | 6 ++++++
 .../gemfire/internal/cache/TXManagerImplJUnitTest.java         | 4 ++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/79d2990e/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
index 1df2c45..e4db285 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
@@ -18,6 +18,7 @@ package com.gemstone.gemfire.disttx;
 
 import java.util.Properties;
 
+import com.gemstone.gemfire.internal.cache.TXManagerImpl;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.CacheFactory;
@@ -27,6 +28,7 @@ import com.gemstone.gemfire.internal.cache.TXManagerImplJUnitTest;
 import com.gemstone.gemfire.test.junit.categories.DistributedTransactionsTest;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
+import static junit.framework.TestCase.assertTrue;
 
 /**
  * Same tests as that of {@link TXManagerImplJUnitTest} after setting
@@ -51,4 +53,8 @@ public class DistTXManagerImplJUnitTest extends TXManagerImplJUnitTest {
     assert(txmgr.isDistributed());
   }
 
+  @Override
+  protected void callIsDistributed(TXManagerImpl txMgr) {
+    assertTrue(txMgr.isDistributed());
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/79d2990e/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
index 0467f4f..fa4c640 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
@@ -336,6 +336,10 @@ public class TXManagerImplJUnitTest {
   public void testIsDistributedDoesNotThrowNPE() {
     TXManagerImpl txMgr = (TXManagerImpl) cache.getCacheTransactionManager();
     cache.getDistributedSystem().disconnect();
+    callIsDistributed(txMgr);
+  }
+
+  protected void callIsDistributed(TXManagerImpl txMgr) {
     assertFalse(txMgr.isDistributed());
   }
 }


[11/54] [abbrv] incubator-geode git commit: GEODE-1081 remove becomeCoordinator from JoinResponseMessage

Posted by je...@apache.org.
GEODE-1081 remove becomeCoordinator from JoinResponseMessage

We no longer use becomeCoordinator so it is not needed in JoinResponseMessage.
The code reacting to becomeCoordinator in GMSJoinLeave is also not needed
and has been removed.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/d25e4459
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/d25e4459
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/d25e4459

Branch: refs/heads/feature/GEODE-17-2
Commit: d25e445988501052258b14a167221f6b6e8d1c0b
Parents: 7971a77
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Mar 14 09:28:58 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Mar 14 09:34:51 2016 -0700

----------------------------------------------------------------------
 .../membership/gms/membership/GMSJoinLeave.java      |  9 ---------
 .../membership/gms/messages/JoinResponseMessage.java | 15 ---------------
 .../codeAnalysis/sanctionedDataSerializables.txt     |  4 ++--
 3 files changed, 2 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d25e4459/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 85d76d6..2b7893e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -395,15 +395,6 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       return isJoined;
     }
 
-    if (response.getBecomeCoordinator()) {
-      logger.info("I am being told to become the membership coordinator by {}", coord);
-      synchronized (viewInstallationLock) {
-        this.currentView = response.getCurrentView();
-        becomeCoordinator(null);
-      }
-      return true;
-    }
-
     this.birthViewId = response.getMemberID().getVmViewId();
     this.localAddress.setVmViewId(this.birthViewId);
     GMSMember me = (GMSMember) this.localAddress.getNetMember();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d25e4459/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinResponseMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinResponseMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinResponseMessage.java
index c01353a..ad9c319 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinResponseMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinResponseMessage.java
@@ -37,7 +37,6 @@ public class JoinResponseMessage extends HighPriorityDistributionMessage {
   private String rejectionMessage;
   private InternalDistributedMember memberID;
   private byte[] messengerData;
-  private boolean becomeCoordinator;
   
   public JoinResponseMessage(InternalDistributedMember memberID, NetView view) {
     this.currentView = view;
@@ -45,13 +44,6 @@ public class JoinResponseMessage extends HighPriorityDistributionMessage {
     setRecipient(memberID);
   }
   
-  public JoinResponseMessage(InternalDistributedMember memberID, NetView view, boolean becomeCoordinator) {
-    this.currentView = view;
-    this.memberID = memberID;
-    setRecipient(memberID);
-    this.becomeCoordinator = becomeCoordinator;
-  }
-  
   public JoinResponseMessage(String rejectionMessage) {
     this.rejectionMessage = rejectionMessage;
   }
@@ -68,10 +60,6 @@ public class JoinResponseMessage extends HighPriorityDistributionMessage {
     return memberID;
   }
   
-  public boolean getBecomeCoordinator() {
-    return becomeCoordinator;
-  }
-
   public String getRejectionMessage() {
     return rejectionMessage;
   }
@@ -94,7 +82,6 @@ public class JoinResponseMessage extends HighPriorityDistributionMessage {
     return getShortClassName() + "("+memberID + "; "
         + (currentView==null? "" : currentView.toString())
         + (rejectionMessage==null? "" : ("; "+rejectionMessage))
-        + (becomeCoordinator? "; becomeCoordinator" : "")
         + ")";
   }
   
@@ -112,7 +99,6 @@ public class JoinResponseMessage extends HighPriorityDistributionMessage {
   public void toData(DataOutput out) throws IOException {
     DataSerializer.writeObject(currentView, out);
     DataSerializer.writeObject(memberID, out);
-    out.writeBoolean(becomeCoordinator);
     DataSerializer.writeString(rejectionMessage, out);
     DataSerializer.writeByteArray(messengerData, out);
   }
@@ -121,7 +107,6 @@ public class JoinResponseMessage extends HighPriorityDistributionMessage {
   public void fromData(DataInput in) throws IOException, ClassNotFoundException {
     currentView = DataSerializer.readObject(in);
     memberID = DataSerializer.readObject(in);
-    becomeCoordinator = in.readBoolean();
     rejectionMessage = DataSerializer.readString(in);
     messengerData = DataSerializer.readByteArray(in);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d25e4459/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
index bb9f350..a6e951a 100644
--- a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
@@ -373,8 +373,8 @@ fromData,38,2a2bb80019c0001ab500042a2bb80019b500052a2bb8001bb500022a2bb9001c0100
 toData,35,2ab400042bb800152ab400052bb800152ab400022bb800162b2ab60017b900180200b1
 
 com/gemstone/gemfire/distributed/internal/membership/gms/messages/JoinResponseMessage,2
-fromData,49,2a2bb8001cc0001db500022a2bb8001cc0001eb500032a2bb9001f0100b500052a2bb80020b500062a2bb80021b50007b1
-toData,43,2ab400022bb800182ab400032bb800182b2ab40005b9001902002ab400062bb8001a2ab400072bb8001bb1
+fromData,39,2a2bb80019c0001ab500022a2bb80019c0001bb500032a2bb8001cb500052a2bb8001db50006b1
+toData,33,2ab400022bb800162ab400032bb800162ab400052bb800172ab400062bb80018b1
 
 com/gemstone/gemfire/distributed/internal/membership/gms/messages/LeaveRequestMessage,2
 fromData,20,2a2bb8000cc0000db500032a2bb8000eb50004b1


[46/54] [abbrv] incubator-geode git commit: GEODE-949: refactor and repackage security test code

Posted by je...@apache.org.
GEODE-949: refactor and repackage security test code

* move test security classes from security package to com.gemstone.gemfire.security.generator
* move test security resources from lib package to com.gemstone.gemfire.security.generator
* move test security classes from templates.security package to com.gemstone.gemfire.security.templates
* fix places where security code ate exceptions
* fix up javadocs
* reformat and refactor code to be more readable and follow standards


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8de59df1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8de59df1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8de59df1

Branch: refs/heads/feature/GEODE-17-2
Commit: 8de59df1853413fa1cc50dfbeba26325f85f8093
Parents: d72986b
Author: Kirk Lund <kl...@apache.org>
Authored: Thu Mar 17 14:17:38 2016 -0700
Committer: Kirk Lund <kl...@apache.org>
Committed: Thu Mar 17 14:17:38 2016 -0700

----------------------------------------------------------------------
 .../membership/gms/auth/GMSAuthenticator.java   |  98 +--
 .../CacheServerSSLConnectionDUnitTest.java      | 124 ++--
 .../sockets/DurableClientBug39997DUnitTest.java |   6 +
 .../security/ClientAuthenticationDUnitTest.java |   7 +-
 .../security/ClientAuthorizationDUnitTest.java  |  11 +-
 .../security/ClientAuthorizationTestBase.java   |  20 +-
 .../security/ClientMultiUserAuthzDUnitTest.java |   5 +-
 .../DeltaClientAuthorizationDUnitTest.java      |   5 +-
 .../DeltaClientPostAuthorizationDUnitTest.java  |   5 +-
 .../security/P2PAuthenticationDUnitTest.java    |  11 +-
 .../generator/AuthzCredentialGenerator.java     | 446 ++++++++++++
 .../security/generator/CredentialGenerator.java | 332 +++++++++
 .../DummyAuthzCredentialGenerator.java          | 129 ++++
 .../generator/DummyCredentialGenerator.java     |  89 +++
 .../generator/LdapUserCredentialGenerator.java  | 163 +++++
 .../generator/PKCSCredentialGenerator.java      | 115 ++++
 .../generator/SSLCredentialGenerator.java       | 121 ++++
 .../UserPasswordWithExtraPropsAuthInit.java     |  69 ++
 .../generator/XmlAuthzCredentialGenerator.java  | 257 +++++++
 .../security/templates/DummyAuthenticator.java  |  75 +++
 .../security/templates/DummyAuthorization.java  | 122 ++++
 .../templates/FunctionSecurityPrmsHolder.java   |  50 ++
 .../templates/LdapUserAuthenticator.java        | 106 +++
 .../security/templates/PKCSAuthInit.java        | 119 ++++
 .../security/templates/PKCSAuthenticator.java   | 157 +++++
 .../security/templates/PKCSPrincipal.java       |  40 ++
 .../security/templates/PKCSPrincipalTest.java   |  48 ++
 .../templates/UserPasswordAuthInit.java         |  75 +++
 .../security/templates/UsernamePrincipal.java   |  44 ++
 .../templates/UsernamePrincipalTest.java        |  48 ++
 .../security/templates/XmlAuthorization.java    | 614 +++++++++++++++++
 .../security/templates/XmlErrorHandler.java     |  74 ++
 .../gemfire/test/dunit/NamedCallable.java       |   1 -
 .../gemfire/test/dunit/NamedRunnable.java       |   1 -
 .../java/security/AuthzCredentialGenerator.java | 462 -------------
 .../test/java/security/CredentialGenerator.java | 340 ----------
 .../security/DummyAuthzCredentialGenerator.java | 141 ----
 .../java/security/DummyCredentialGenerator.java |  90 ---
 .../security/LdapUserCredentialGenerator.java   | 156 -----
 .../java/security/PKCSCredentialGenerator.java  | 109 ---
 .../java/security/SSLCredentialGenerator.java   | 116 ----
 .../UserPasswordWithExtraPropsAuthInit.java     |  74 --
 .../security/XmlAuthzCredentialGenerator.java   | 261 -------
 .../templates/security/DummyAuthenticator.java  |  84 ---
 .../templates/security/DummyAuthorization.java  | 117 ----
 .../security/FunctionSecurityPrmsHolder.java    |  54 --
 .../security/LdapUserAuthenticator.java         | 118 ----
 .../java/templates/security/PKCSAuthInit.java   | 132 ----
 .../templates/security/PKCSAuthenticator.java   | 166 -----
 .../java/templates/security/PKCSPrincipal.java  |  43 --
 .../templates/security/PKCSPrincipalTest.java   |  48 --
 .../security/UserPasswordAuthInit.java          |  83 ---
 .../templates/security/UsernamePrincipal.java   |  45 --
 .../security/UsernamePrincipalTest.java         |  48 --
 .../templates/security/XmlAuthorization.java    | 672 -------------------
 .../templates/security/XmlErrorHandler.java     |  81 ---
 .../gemfire/security/generator/authz-dummy.xml  | 124 ++++
 .../gemfire/security/generator/authz-ldap.xml   |  83 +++
 .../generator/authz-multiUser-dummy.xml         | 104 +++
 .../security/generator/authz-multiUser-ldap.xml |  81 +++
 .../security/generator/keys/gemfire1.keystore   | Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire10.keystore  | Bin 0 -> 1546 bytes
 .../security/generator/keys/gemfire11.keystore  | Bin 0 -> 1546 bytes
 .../security/generator/keys/gemfire2.keystore   | Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire3.keystore   | Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire4.keystore   | Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire5.keystore   | Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire6.keystore   | Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire7.keystore   | Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire8.keystore   | Bin 0 -> 1536 bytes
 .../security/generator/keys/gemfire9.keystore   | Bin 0 -> 1536 bytes
 .../generator/keys/ibm/gemfire1.keystore        | Bin 0 -> 1426 bytes
 .../generator/keys/ibm/gemfire10.keystore       | Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire11.keystore       | Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire2.keystore        | Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire3.keystore        | Bin 0 -> 1426 bytes
 .../generator/keys/ibm/gemfire4.keystore        | Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire5.keystore        | Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire6.keystore        | Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire7.keystore        | Bin 0 -> 1426 bytes
 .../generator/keys/ibm/gemfire8.keystore        | Bin 0 -> 1434 bytes
 .../generator/keys/ibm/gemfire9.keystore        | Bin 0 -> 1426 bytes
 .../security/generator/keys/ibm/publickeyfile   | Bin 0 -> 4535 bytes
 .../security/generator/keys/publickeyfile       | Bin 0 -> 4535 bytes
 .../gemfire/security/templates/authz5_5.dtd     | 105 +++
 .../gemfire/security/templates/authz6_0.dtd     | 110 +++
 .../src/test/resources/lib/authz-dummy.xml      | 126 ----
 .../src/test/resources/lib/authz-ldap.xml       |  85 ---
 .../resources/lib/authz-multiUser-dummy.xml     | 106 ---
 .../test/resources/lib/authz-multiUser-ldap.xml |  83 ---
 .../test/resources/lib/keys/gemfire1.keystore   | Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire10.keystore  | Bin 1546 -> 0 bytes
 .../test/resources/lib/keys/gemfire11.keystore  | Bin 1546 -> 0 bytes
 .../test/resources/lib/keys/gemfire2.keystore   | Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire3.keystore   | Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire4.keystore   | Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire5.keystore   | Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire6.keystore   | Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire7.keystore   | Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire8.keystore   | Bin 1536 -> 0 bytes
 .../test/resources/lib/keys/gemfire9.keystore   | Bin 1536 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire1.keystore    | Bin 1426 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire10.keystore   | Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire11.keystore   | Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire2.keystore    | Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire3.keystore    | Bin 1426 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire4.keystore    | Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire5.keystore    | Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire6.keystore    | Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire7.keystore    | Bin 1426 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire8.keystore    | Bin 1434 -> 0 bytes
 .../resources/lib/keys/ibm/gemfire9.keystore    | Bin 1426 -> 0 bytes
 .../test/resources/lib/keys/ibm/publickeyfile   | Bin 4535 -> 0 bytes
 .../src/test/resources/lib/keys/publickeyfile   | Bin 4535 -> 0 bytes
 .../resources/templates/security/authz5_5.dtd   | 105 ---
 .../resources/templates/security/authz6_0.dtd   | 110 ---
 .../security/ClientAuthzObjectModDUnitTest.java |  16 +-
 .../ClientCQPostAuthorizationDUnitTest.java     |   5 +-
 .../ClientPostAuthorizationDUnitTest.java       |   4 +-
 .../gemfire/security/MultiuserAPIDUnitTest.java |   6 +-
 .../MultiuserDurableCQAuthzDUnitTest.java       |   7 +-
 121 files changed, 4047 insertions(+), 4240 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticator.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticator.java
index ba35e46..741eb2c 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticator.java
@@ -47,10 +47,13 @@ import static com.gemstone.gemfire.internal.i18n.LocalizedStrings.AUTH_FAILED_TO
 import static com.gemstone.gemfire.distributed.internal.DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME;
 import static com.gemstone.gemfire.distributed.internal.DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME;
 
-
 public class GMSAuthenticator implements Authenticator {
 
+  private final static String secPrefix =  "gemfire.sys.security-";
+  private final static int gemfireSysPrefixLen = "gemfire.sys.".length();
+
   private Services services;
+  private Properties securityProps = getSecurityProps();
 
   @Override
   public void init(Services s) {
@@ -96,101 +99,113 @@ public class GMSAuthenticator implements Authenticator {
   /**
    * Authenticate peer member with authenticator class defined by property
    * "security-peer-authenticator".
-   * @param member the member to be authenticated
-   * @param credentials the credentials used in authentication
+   *
+   * @param  member
+   *         the member to be authenticated
+   * @param  credentials
+   *         the credentials used in authentication
    * @return null if authentication succeed (including no authenticator case),
    *         otherwise, return failure message
    * @throws AuthenticationFailedException
    *         this will be removed since return string is used for failure
    */
   @Override
-  public String authenticate(InternalDistributedMember member, Object credentials)
-    throws AuthenticationFailedException {
-    return authenticate(member, credentials, securityProps, services.getJoinLeave().getMemberID());
+  public String authenticate(InternalDistributedMember member, Object credentials) throws AuthenticationFailedException {
+    return authenticate(member, credentials, this.securityProps, this.services.getJoinLeave().getMemberID());
   }
 
-  // for unit test
-  /* package */ String authenticate(
-      DistributedMember member, Object credentials, Properties secProps, DistributedMember localMember)
-    throws AuthenticationFailedException {
+  /**
+   * Method is package protected to be used in testing.
+   */
+  String authenticate(DistributedMember member, Object credentials, Properties secProps, DistributedMember localMember) throws AuthenticationFailedException {
 
     String authMethod = secProps.getProperty(SECURITY_PEER_AUTHENTICATOR_NAME);
     if (authMethod == null || authMethod.length() == 0) {
       return null;
     }
 
-    InternalLogWriter securityLogWriter = services.getSecurityLogWriter();
+    InternalLogWriter securityLogWriter = this.services.getSecurityLogWriter();
     String failMsg = null;
     if (credentials != null) {
       try {
         invokeAuthenticator(authMethod, member, credentials);
+
       } catch (Exception ex) {
-        securityLogWriter.warning(
-            AUTH_PEER_AUTHENTICATION_FAILED_WITH_EXCEPTION,
-          new Object[] {member, authMethod, ex.getLocalizedMessage()}, ex);
+        securityLogWriter.warning(AUTH_PEER_AUTHENTICATION_FAILED_WITH_EXCEPTION, new Object[] {member, authMethod, ex.getLocalizedMessage()}, ex);
         failMsg = AUTH_PEER_AUTHENTICATION_FAILED.toLocalizedString(localMember);
       }
+
     } else { // No credentials - need to send failure message
-      securityLogWriter.warning(
-          AUTH_PEER_AUTHENTICATION_MISSING_CREDENTIALS, new Object[] {member, authMethod});
+      securityLogWriter.warning(AUTH_PEER_AUTHENTICATION_MISSING_CREDENTIALS, new Object[] {member, authMethod});
       failMsg = AUTH_PEER_AUTHENTICATION_MISSING_CREDENTIALS.toLocalizedString(member, authMethod);
     }
+
     return failMsg;
   }
 
-  /* package */ Principal invokeAuthenticator(String authMethod, DistributedMember member, Object credentials)
-    throws AuthenticationFailedException {
+  /**
+   * Method is package protected to be used in testing.
+   */
+  Principal invokeAuthenticator(String authMethod, DistributedMember member, Object credentials) throws AuthenticationFailedException {
     com.gemstone.gemfire.security.Authenticator auth = null;
+
     try {
       Method getter = ClassLoadUtil.methodFromName(authMethod);
       auth = (com.gemstone.gemfire.security.Authenticator) getter.invoke(null, (Object[]) null);
-      if (auth == null)
-        throw new AuthenticationFailedException(
-          HandShake_AUTHENTICATOR_INSTANCE_COULD_NOT_BE_OBTAINED.toLocalizedString());
+      if (auth == null) {
+        throw new AuthenticationFailedException(HandShake_AUTHENTICATOR_INSTANCE_COULD_NOT_BE_OBTAINED.toLocalizedString());
+      }
 
-      LogWriter logWriter = services.getLogWriter();
-      LogWriter securityLogWriter = services.getSecurityLogWriter();
-      auth.init(securityProps, logWriter, securityLogWriter);
+      LogWriter logWriter = this.services.getLogWriter();
+      LogWriter securityLogWriter = this.services.getSecurityLogWriter();
+
+      auth.init(this.securityProps, logWriter, securityLogWriter); // this.securityProps contains security-ldap-basedn but security-ldap-baseDomainName is expected
       return auth.authenticate((Properties) credentials, member);
+
     } catch (GemFireSecurityException gse) {
       throw gse;
+
     } catch (Exception ex) {
-      throw new AuthenticationFailedException(
-        HandShake_FAILED_TO_ACQUIRE_AUTHENTICATOR_OBJECT.toLocalizedString(), ex);
+      throw new AuthenticationFailedException(HandShake_FAILED_TO_ACQUIRE_AUTHENTICATOR_OBJECT.toLocalizedString(), ex);
+
     } finally {
       if (auth != null) auth.close();
     }
   }
 
   /**
-   * Get credential object for the given GemFire distributed member
-   * @param member the target distributed member
+   * Get credential object for the given GemFire distributed member.
+   *
+   * @param  member
+   *         the target distributed member
    * @return the credential object
    */
   @Override
   public Object getCredentials(InternalDistributedMember member) {
     try {
       return getCredentials(member, securityProps);
+
     } catch (Exception e) {
       String authMethod = securityProps.getProperty(SECURITY_PEER_AUTH_INIT_NAME);
-      services.getSecurityLogWriter().warning(
-          LocalizedStrings.AUTH_FAILED_TO_OBTAIN_CREDENTIALS_IN_0_USING_AUTHINITIALIZE_1_2,
-          new Object[] {authMethod, e.getLocalizedMessage()});
+      services.getSecurityLogWriter().warning(LocalizedStrings.AUTH_FAILED_TO_OBTAIN_CREDENTIALS_IN_0_USING_AUTHINITIALIZE_1_2, new Object[] { authMethod, e.getLocalizedMessage() });
       return null;
     }
   }
 
-  // for unit test
+  /**
+   * For testing only.
+   */
   Properties getCredentials(DistributedMember member, Properties secProps) {
     Properties credentials = null;
     String authMethod = secProps.getProperty(SECURITY_PEER_AUTH_INIT_NAME);
+
     try {
       if (authMethod != null && authMethod.length() > 0) {
         Method getter = ClassLoadUtil.methodFromName(authMethod);
         AuthInitialize auth = (AuthInitialize)getter.invoke(null, (Object[]) null);
-        if (auth == null)
-          throw new AuthenticationRequiredException(
-            AUTH_FAILED_TO_ACQUIRE_AUTHINITIALIZE_INSTANCE.toLocalizedString(authMethod));
+        if (auth == null) {
+          throw new AuthenticationRequiredException(AUTH_FAILED_TO_ACQUIRE_AUTHINITIALIZE_INSTANCE.toLocalizedString(authMethod));
+        }
 
         try {
           LogWriter logWriter = services.getLogWriter();
@@ -201,19 +216,17 @@ public class GMSAuthenticator implements Authenticator {
           auth.close();
         }
       }
+
     } catch (GemFireSecurityException gse) {
       throw gse;
+
     } catch (Exception ex) {
-      throw new AuthenticationRequiredException(
-        HandShake_FAILED_TO_ACQUIRE_AUTHINITIALIZE_METHOD_0.toLocalizedString(authMethod), ex);
+      throw new AuthenticationRequiredException(HandShake_FAILED_TO_ACQUIRE_AUTHINITIALIZE_METHOD_0.toLocalizedString(authMethod), ex);
     }
+
     return credentials;
   }
 
-  private final static String secPrefix =  "gemfire.sys.security-";
-  private final static int gemfireSysPrefixLen = "gemfire.sys.".length();
-  private Properties securityProps = getSecurityProps();
-
   Properties getSecurityProps() {
     Properties props = new Properties();
     Set keys = System.getProperties().keySet();
@@ -228,8 +241,5 @@ public class GMSAuthenticator implements Authenticator {
 
   @Override
   public void emergencyClose() {
-    // TODO Auto-generated method stub
-    
   }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
index 5fa4fc4..c59ed4f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
@@ -41,27 +41,25 @@ import com.gemstone.gemfire.util.test.TestUtil;
 
 /**
  * Tests cacheserver ssl support added. See https://svn.gemstone.com/trac/gemfire/ticket/48995 for details
- * @author tushark
- *
  */
 public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
   
   private static final long serialVersionUID = 1L;
-  private Cache cache;
-  private CacheServer cacheServer;
-  private ClientCache clientCache;
-  private int cacheServerPort;
-  private String hostName;
-  
+
   private static final String TRUSTED_STORE = "trusted.keystore";
   private static final String CLIENT_KEY_STORE = "client.keystore";
   private static final String CLIENT_TRUST_STORE = "client.truststore";
   private static final String SERVER_KEY_STORE = "cacheserver.keystore";
   private static final String SERVER_TRUST_STORE = "cacheserver.truststore";
-  
+
   private static CacheServerSSLConnectionDUnitTest instance = new CacheServerSSLConnectionDUnitTest("CacheServerSSLConnectionDUnit");
-  
-  
+
+  private Cache cache;
+  private CacheServer cacheServer;
+  private ClientCache clientCache;
+  private int cacheServerPort;
+  private String hostName;
+
   public void setUp() throws Exception {
     disconnectAllFromDS();
     super.setUp();
@@ -224,7 +222,7 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     instance.doServerRegionTest();
   }
   
-  public static Object[] getCacheServerEndPointTask() {
+  public static Object[] getCacheServerEndPointTask() { // TODO: avoid Object[]
     Object[] array = new Object[2];
     array[0] = instance.getCacheServerHost();
     array[1] = instance.getCacheServerPort();
@@ -252,23 +250,16 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     boolean cacheClientSslenabled = true;
     boolean cacheClientSslRequireAuth = true;
     
-    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.setUpServerVMTask(cacheServerSslenabled));
-    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.createServerTask());
+    serverVM.invoke(() -> setUpServerVMTask(cacheServerSslenabled));
+    serverVM.invoke(() -> createServerTask());
     
-    Object array[] = (Object[])serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.getCacheServerEndPointTask()); 
+    Object array[] = (Object[])serverVM.invoke(() -> getCacheServerEndPointTask());
     String hostName = (String)array[0];
     int port = (Integer) array[1];
-    Object params[] = new Object[6];
-    params[0] = hostName;
-    params[1] = port;
-    params[2] = cacheClientSslenabled;
-    params[3] = cacheClientSslRequireAuth;
-    params[4] = CLIENT_KEY_STORE;
-    params[5] = CLIENT_TRUST_STORE;
-    //getLogWriter().info("Starting client with server endpoint " + hostName + ":" + port);
-    clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "setUpClientVMTask", params);
-    clientVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doClientRegionTestTask());
-    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doServerRegionTestTask());
+
+    clientVM.invoke(() -> setUpClientVMTask(hostName, port, cacheClientSslenabled, cacheClientSslRequireAuth, CLIENT_KEY_STORE, CLIENT_TRUST_STORE));
+    clientVM.invoke(() -> doClientRegionTestTask());
+    serverVM.invoke(() -> doServerRegionTestTask());
     
   }
   
@@ -282,27 +273,21 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     boolean cacheClientSslenabled = false;
     boolean cacheClientSslRequireAuth = true;
     
-    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.setUpServerVMTask(cacheServerSslenabled));
-    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.createServerTask());
+    serverVM.invoke(() -> setUpServerVMTask(cacheServerSslenabled));
+    serverVM.invoke(() -> createServerTask());
     
-    Object array[] = (Object[])serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.getCacheServerEndPointTask()); 
+    Object array[] = (Object[])serverVM.invoke(() -> getCacheServerEndPointTask());
     String hostName = (String)array[0];
     int port = (Integer) array[1];
-    Object params[] = new Object[6];
-    params[0] = hostName;
-    params[1] = port;
-    params[2] = cacheClientSslenabled;
-    params[3] = cacheClientSslRequireAuth;
-    params[4] = TRUSTED_STORE;
-    params[5] = TRUSTED_STORE;
+
     IgnoredException expect = IgnoredException.addIgnoredException("javax.net.ssl.SSLException", serverVM);
     IgnoredException expect2 = IgnoredException.addIgnoredException("IOException", serverVM);
     try{
-      //getLogWriter().info("Starting client with server endpoint " + hostName + ":" + port);    
-      clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "setUpClientVMTaskNoSubscription", params);
-      clientVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doClientRegionTestTask());
-      serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doServerRegionTestTask());
+      clientVM.invoke(() -> setUpClientVMTaskNoSubscription(hostName, port, cacheClientSslenabled, cacheClientSslRequireAuth, TRUSTED_STORE, TRUSTED_STORE));
+      clientVM.invoke(() -> doClientRegionTestTask());
+      serverVM.invoke(() -> doServerRegionTestTask());
       fail("Test should fail as non-ssl client is trying to connect to ssl configured server");
+
     } catch (Exception rmiException) {
       Throwable e = rmiException.getCause();
       //getLogWriter().info("ExceptionCause at clientVM " + e);
@@ -330,24 +315,18 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     boolean cacheClientSslenabled = true;
     boolean cacheClientSslRequireAuth = false;
 
-    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.setUpServerVMTask(cacheServerSslenabled));
-    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.createServerTask());
+    serverVM.invoke(() -> setUpServerVMTask(cacheServerSslenabled));
+    serverVM.invoke(() -> createServerTask());
 
-    Object array[] = (Object[])serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.getCacheServerEndPointTask()); 
+    Object array[] = (Object[])serverVM.invoke(() -> getCacheServerEndPointTask());
     String hostName = (String)array[0];
     int port = (Integer) array[1];
-    Object params[] = new Object[6];
-    params[0] = hostName;
-    params[1] = port;
-    params[2] = cacheClientSslenabled;
-    params[3] = cacheClientSslRequireAuth;
-    params[4] = CLIENT_KEY_STORE;
-    params[5] = CLIENT_TRUST_STORE;
-    //getLogWriter().info("Starting client with server endpoint " + hostName + ":" + port);
+
     try {
-      clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "setUpClientVMTask", params);
+      clientVM.invoke(() -> setUpClientVMTask(hostName, port, cacheClientSslenabled, cacheClientSslRequireAuth, CLIENT_KEY_STORE, CLIENT_TRUST_STORE));
       clientVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doClientRegionTestTask());
       serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doServerRegionTestTask());
+
     } catch (Exception rmiException) {
       Throwable e = rmiException.getCause();
       //getLogWriter().info("ExceptionCause at clientVM " + e);
@@ -372,41 +351,22 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     boolean cacheClientSslenabled = true;
     boolean cacheClientSslRequireAuth = true;
     
-    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.setUpServerVMTask(cacheServerSslenabled));
-    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.createServerTask());
+    serverVM.invoke(() -> setUpServerVMTask(cacheServerSslenabled));
+    serverVM.invoke(() -> createServerTask());
     
-    Object array[] = (Object[])serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.getCacheServerEndPointTask()); 
+    Object array[] = (Object[])serverVM.invoke(() -> getCacheServerEndPointTask());
     String hostName = (String)array[0];
     int port = (Integer) array[1];
-    Object params[] = new Object[6];
-    params[0] = hostName;
-    params[1] = port;
-    params[2] = cacheClientSslenabled;
-    params[3] = cacheClientSslRequireAuth;
-    params[4] = TRUSTED_STORE;
-    params[5] = TRUSTED_STORE;
+
     IgnoredException expect = IgnoredException.addIgnoredException("javax.net.ssl.SSLHandshakeException", serverVM);
     try{
-      //getLogWriter().info("Starting client with server endpoint " + hostName + ":" + port);    
-      clientVM.invoke(CacheServerSSLConnectionDUnitTest.class, "setUpClientVMTask", params);
-      clientVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doClientRegionTestTask());
-      serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.doServerRegionTestTask());
+      clientVM.invoke(() -> setUpClientVMTask(hostName, port, cacheClientSslenabled, cacheClientSslRequireAuth, TRUSTED_STORE, TRUSTED_STORE));
+      clientVM.invoke(() -> doClientRegionTestTask());
+      serverVM.invoke(() -> doServerRegionTestTask());
       fail("Test should fail as ssl client with ssl enabled is trying to connect to server with ssl disabled");
-    }catch (Exception rmiException) {
-      
+
+    } catch (Exception rmiException) {
       //ignore
-      
-      /*Throwable e = rmiException.getCause();
-      getLogWriter().info("ExceptionCause at clientVM " + e);
-      if (e instanceof com.gemstone.gemfire.cache.client.ServerOperationException) {
-        Throwable t = e.getCause();
-        getLogWriter().info("Cause is " + t);
-        assertTrue(t instanceof com.gemstone.gemfire.security.AuthenticationRequiredException);
-      } else {
-        getLogWriter().error("Unexpected exception ", e);
-        fail("Unexpected Exception...expected "
-            + AuthenticationRequiredException.class);
-      }*/
     } finally {
       expect.remove();
     }
@@ -417,8 +377,8 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
     final Host host = Host.getHost(0);
     VM serverVM = host.getVM(1);
     VM clientVM = host.getVM(2);
-    clientVM.invoke(() -> CacheServerSSLConnectionDUnitTest.closeClientCacheTask());
-    serverVM.invoke(() -> CacheServerSSLConnectionDUnitTest.closeCacheTask());
+    clientVM.invoke(() -> closeClientCacheTask());
+    serverVM.invoke(() -> closeCacheTask());
   }
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
index fb8fb3e..fb425c1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
@@ -32,6 +32,7 @@ import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.Invoke;
 import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.SerializableRunnable;
 import com.gemstone.gemfire.test.dunit.VM;
@@ -45,6 +46,10 @@ public class DurableClientBug39997DUnitTest extends CacheTestCase {
   public DurableClientBug39997DUnitTest(String name) {
     super(name);
   }
+
+  public final void postTearDownCacheTestCase() {
+    Host.getHost(0) .getVM(0).invoke(() -> disconnectFromDS());
+  }
   
   public void testNoServerAvailableOnStartup() {
     Host host = Host.getHost(0);
@@ -120,6 +125,7 @@ public class DurableClientBug39997DUnitTest extends CacheTestCase {
   public Properties getClientProperties() {
     Properties props = new Properties();
     props.setProperty("mcast-port", "0");
+    props.setProperty("locators", "");
     props.setProperty("durable-client-id", "my_id");
     return props;
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java
index 8446eae..739dd42 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationDUnitTest.java
@@ -24,12 +24,13 @@ import java.util.Properties;
 import javax.net.ssl.SSLException;
 import javax.net.ssl.SSLHandshakeException;
 
-import security.CredentialGenerator;
-import security.CredentialGenerator.ClassCode;
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
+import com.gemstone.gemfire.security.generator.CredentialGenerator.ClassCode;
 
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.security.generator.DummyCredentialGenerator;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
@@ -37,8 +38,6 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 
-import security.DummyCredentialGenerator;
-
 /**
  * Test for authentication from client to server. This tests for both valid and
  * invalid credentials/modules. It also checks for authentication

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
index 1d0b481..e3d8ccf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationDUnitTest.java
@@ -26,19 +26,18 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Properties;
 
-import security.AuthzCredentialGenerator;
-import security.CredentialGenerator;
-import security.DummyCredentialGenerator;
-import security.XmlAuthzCredentialGenerator;
-
 import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
 import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.security.generator.AuthzCredentialGenerator;
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
+import com.gemstone.gemfire.security.generator.DummyCredentialGenerator;
+import com.gemstone.gemfire.security.generator.XmlAuthzCredentialGenerator;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 
-import templates.security.UserPasswordAuthInit;
+import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
 
 /**
  * Tests for authorization from client to server. This tests for authorization

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
index 8476ae2..c7eed57 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestBase.java
@@ -1,6 +1,3 @@
-
-package com.gemstone.gemfire.security;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -9,9 +6,9 @@ package com.gemstone.gemfire.security;
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -19,7 +16,7 @@ package com.gemstone.gemfire.security;
  * specific language governing permissions and limitations
  * under the License.
  */
-
+package com.gemstone.gemfire.security;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -55,18 +52,17 @@ import com.gemstone.gemfire.internal.AvailablePort.Keeper;
 import com.gemstone.gemfire.internal.cache.AbstractRegionEntry;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.util.Callable;
+import com.gemstone.gemfire.security.generator.AuthzCredentialGenerator;
+import com.gemstone.gemfire.security.generator.AuthzCredentialGenerator.ClassCode;
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
+import com.gemstone.gemfire.security.generator.DummyCredentialGenerator;
+import com.gemstone.gemfire.security.generator.XmlAuthzCredentialGenerator;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
-import security.AuthzCredentialGenerator;
-import security.AuthzCredentialGenerator.ClassCode;
-import security.CredentialGenerator;
-import security.DummyCredentialGenerator;
-import security.XmlAuthzCredentialGenerator;
-
 /**
  * Base class for tests for authorization from client to server. It contains
  * utility functions for the authorization tests from client to server.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java
index dc03990..325f0bb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientMultiUserAuthzDUnitTest.java
@@ -24,14 +24,13 @@ package com.gemstone.gemfire.security;
 import java.util.Iterator;
 import java.util.Properties;
 
+import com.gemstone.gemfire.security.generator.AuthzCredentialGenerator;
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
 import com.gemstone.gemfire.test.dunit.VM;
-import security.AuthzCredentialGenerator;
-import security.CredentialGenerator;
 
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.execute.Function;
 import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
-import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.execute.PRClientServerTestBase;
 import com.gemstone.gemfire.internal.cache.functions.TestFunction;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java
index 5c184d1..a7d6131 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/DeltaClientAuthorizationDUnitTest.java
@@ -23,15 +23,14 @@ package com.gemstone.gemfire.security;
 
 import java.util.Properties;
 
-import security.AuthzCredentialGenerator;
-import security.CredentialGenerator;
-
 import com.gemstone.gemfire.DeltaTestImpl;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.client.NoAvailableServersException;
 import com.gemstone.gemfire.cache.client.ServerConnectivityException;
 import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionLocalMaxMemoryDUnitTest.TestObject1;
+import com.gemstone.gemfire.security.generator.AuthzCredentialGenerator;
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.LogWriterUtils;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
index ec1c692..090b96a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/DeltaClientPostAuthorizationDUnitTest.java
@@ -28,9 +28,6 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.Random;
 
-import security.AuthzCredentialGenerator;
-import security.CredentialGenerator;
-
 import com.gemstone.gemfire.DeltaTestImpl;
 import com.gemstone.gemfire.cache.InterestResultPolicy;
 import com.gemstone.gemfire.cache.Region;
@@ -40,6 +37,8 @@ import com.gemstone.gemfire.cache.query.CqException;
 import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
 import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.util.Callable;
+import com.gemstone.gemfire.security.generator.AuthzCredentialGenerator;
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
 import com.gemstone.gemfire.test.dunit.Assert;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
index d47b1c4..3af4e14 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
@@ -26,10 +26,6 @@ import java.util.Properties;
 
 import javax.net.ssl.SSLHandshakeException;
 
-import security.CredentialGenerator;
-import security.DummyCredentialGenerator;
-import security.LdapUserCredentialGenerator;
-
 import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.Locator;
@@ -38,6 +34,10 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
 import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
 import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
+import com.gemstone.gemfire.security.generator.DummyCredentialGenerator;
+import com.gemstone.gemfire.security.generator.LdapUserCredentialGenerator;
+import com.gemstone.gemfire.security.generator.UserPasswordWithExtraPropsAuthInit;
 import com.gemstone.gemfire.test.dunit.DistributedTestCase;
 import com.gemstone.gemfire.test.dunit.Host;
 import com.gemstone.gemfire.test.dunit.IgnoredException;
@@ -46,6 +46,7 @@ import com.gemstone.gemfire.test.dunit.NetworkUtils;
 import com.gemstone.gemfire.test.dunit.VM;
 import com.gemstone.gemfire.test.dunit.Wait;
 
+
 /**
  * Tests peer to peer authentication in Gemfire
  * 
@@ -497,7 +498,7 @@ public class P2PAuthenticationDUnitTest extends DistributedTestCase {
     gen.init();
     Properties extraProps = gen.getSystemProperties();
     String authenticator = gen.getAuthenticator();
-    String authInit = "security.UserPasswordWithExtraPropsAuthInit.create";
+    String authInit = UserPasswordWithExtraPropsAuthInit.class.getName() + ".create";
     if (extraProps == null) {
       extraProps = new Properties();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/generator/AuthzCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/AuthzCredentialGenerator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/AuthzCredentialGenerator.java
new file mode 100755
index 0000000..f39fc84
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/AuthzCredentialGenerator.java
@@ -0,0 +1,446 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.generator;
+
+import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.security.AccessControl;
+import com.gemstone.gemfire.security.templates.DummyAuthorization;
+import com.gemstone.gemfire.security.templates.XmlAuthorization;
+import org.apache.logging.log4j.Logger;
+
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * Encapsulates obtaining authorized and unauthorized credentials for a given
+ * operation in a region. Implementations will be for different kinds of
+ * authorization scheme and authentication scheme combos.
+ * 
+ * @since 5.5
+ */
+public abstract class AuthzCredentialGenerator {
+  
+  private static final Logger logger = LogService.getLogger();
+
+  /**
+   * The {@link CredentialGenerator} being used.
+   */
+  protected CredentialGenerator generator;
+
+  /**
+   * A set of system properties that should be added to the gemfire system
+   * properties before using the authorization module.
+   */
+  private Properties systemProperties;
+
+  /**
+   * A factory method to create a new instance of an
+   * {@link AuthzCredentialGenerator} for the given {@link ClassCode}. Caller
+   * is supposed to invoke {@link AuthzCredentialGenerator#init} immediately
+   * after obtaining the instance.
+   * 
+   * @param  classCode
+   *         the {@code ClassCode} of the {@code AuthzCredentialGenerator}
+   *         implementation
+   * 
+   * @return an instance of {@code AuthzCredentialGenerator} for the given
+   *         class code
+   */
+  public static AuthzCredentialGenerator create(final ClassCode classCode) {
+    switch (classCode.classType) {
+      case ClassCode.ID_DUMMY:
+        return new DummyAuthzCredentialGenerator();
+      case ClassCode.ID_XML:
+        return new XmlAuthzCredentialGenerator();
+      default:
+        return null;
+    }
+  }
+
+  /**
+   * Initialize the authorized credential generator.
+   * 
+   * @param  generator
+   *         an instance of {@link CredentialGenerator} of the credential
+   *         implementation for which to obtain authorized/unauthorized
+   *         credentials.
+   * 
+   * @return false when the given {@link CredentialGenerator} is incompatible
+   *         with this authorization module.
+   */
+  public boolean init(final CredentialGenerator generator) {
+    this.generator = generator;
+    try {
+      this.systemProperties = init();
+    } catch (IllegalArgumentException ex) {
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * 
+   * @return A set of extra properties that should be added to Gemfire system
+   *         properties when not null.
+   */
+  public Properties getSystemProperties() {
+    return this.systemProperties;
+  }
+
+  /**
+   * Get the {@link CredentialGenerator} being used by this instance.
+   */
+  public CredentialGenerator getCredentialGenerator() {
+    return this.generator;
+  }
+
+  /**
+   * Initialize the authorized credential generator.
+   *
+   * Required to be implemented by concrete classes that implement this abstract
+   * class.
+   *
+   * @return A set of extra properties that should be added to Gemfire system
+   *         properties when not null.
+   *
+   * @throws IllegalArgumentException when the {@link CredentialGenerator} is
+   *         incompatible with this authorization module.
+   */
+  protected abstract Properties init() throws IllegalArgumentException;
+
+  /**
+   * The {@link ClassCode} of the particular implementation.
+   * 
+   * @return the {@code ClassCode}
+   */
+  public abstract ClassCode classCode();
+
+  /**
+   * The name of the {@link AccessControl} factory function that should be used
+   * as the authorization module on the server side.
+   * 
+   * @return name of the {@code AccessControl} factory function
+   */
+  public abstract String getAuthorizationCallback();
+
+  /**
+   * Get a set of credentials generated using the given index allowed to perform
+   * the given {@link OperationCode}s for the given regions.
+   * 
+   * @param  opCodes
+   *         the list of {@link OperationCode}s of the operations requiring
+   *         authorization; should not be null
+   * @param  regionNames
+   *         list of the region names requiring authorization; a value of
+   *         null indicates all regions
+   * @param  index
+   *         used to generate multiple such credentials by passing different
+   *         values for this
+   * 
+   * @return the set of credentials authorized to perform the given operation in
+   *         the given regions
+   */
+  public Properties getAllowedCredentials(final OperationCode[] opCodes, final String[] regionNames, final int index) {
+    int numTries = getNumPrincipalTries(opCodes, regionNames);
+    if (numTries <= 0) {
+      numTries = 1;
+    }
+
+    for (int tries = 0; tries < numTries; tries++) {
+      final Principal principal = getAllowedPrincipal(opCodes, regionNames, (index + tries) % numTries);
+      try {
+        return this.generator.getValidCredentials(principal);
+      } catch (IllegalArgumentException ex) {
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Get a set of credentials generated using the given index not allowed to
+   * perform the given {@link OperationCode}s for the given regions. The
+   * credentials are required to be valid for authentication.
+   * 
+   * @param  opCodes
+   *         the {@link OperationCode}s of the operations requiring
+   *         authorization failure; should not be null
+   * @param  regionNames
+   *         list of the region names requiring authorization failure; a value
+   *         of null indicates all regions
+   * @param  index
+   *         used to generate multiple such credentials by passing different
+   *         values for this
+   * 
+   * @return the set of credentials that are not authorized to perform the given
+   *         operation in the given region
+   */
+  public Properties getDisallowedCredentials(final OperationCode[] opCodes, final String[] regionNames, final int index) {
+    // This may not be very correct since we use the value of
+    // getNumPrincipalTries() but is used to avoid adding another method.
+    // Also something like getNumDisallowedPrincipals() will be normally always
+    // infinite, and the number here is just to perform some number of tries
+    // before giving up.
+
+    int numTries = getNumPrincipalTries(opCodes, regionNames);
+    if (numTries <= 0) {
+      numTries = 1;
+    }
+
+    for (int tries = 0; tries < numTries; tries++) {
+      final Principal principal = getDisallowedPrincipal(opCodes, regionNames, (index + tries) % numTries);
+      try {
+        return this.generator.getValidCredentials(principal);
+      } catch (IllegalArgumentException ex) {
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Get the number of tries to be done for obtaining valid credentials for the
+   * given operations in the given region. It is required that
+   * {@link #getAllowedPrincipal} method returns valid principals for values of
+   * {@code index} from 0 through (n-1) where {@code n} is the
+   * value returned by this method. It is recommended that the principals so
+   * returned be unique for efficiency.
+   * 
+   * This will be used by {@link #getAllowedCredentials} to step through
+   * different principals and obtain a set of valid credentials.
+   * 
+   * Required to be implemented by concrete classes that implement this abstract
+   * class.
+   * 
+   * @param  opCodes
+   *         the {@link OperationCode}s of the operations requiring
+   *         authorization
+   * @param  regionNames
+   *         list of the region names requiring authorization; a value of null
+   *         indicates all regions
+   * 
+   * @return the number of principals allowed to perform the given operation in
+   *         the given region
+   */
+  protected abstract int getNumPrincipalTries(final OperationCode[] opCodes, final String[] regionNames);
+
+  /**
+   * Get a {@link Principal} generated using the given index allowed to perform
+   * the given {@link OperationCode}s for the given region.
+   * 
+   * Required to be implemented by concrete classes that implement this abstract
+   * class.
+   * 
+   * @param  opCodes
+   *         the {@link OperationCode}s of the operations requiring
+   *         authorization
+   * @param  regionNames
+   *         list of the region names requiring authorization; a value of null
+   *         indicates all regions
+   * @param  index
+   *         used to generate multiple such principals by passing different
+   *         values for this
+   * 
+   * @return the {@link Principal} authorized to perform the given operation in
+   *         the given region
+   */
+  protected abstract Principal getAllowedPrincipal(final OperationCode[] opCodes, final String[] regionNames, final int index);
+
+  /**
+   * Get a {@link Principal} generated using the given index not allowed to
+   * perform the given {@link OperationCode}s for the given region.
+   * 
+   * Required to be implemented by concrete classes that implement this abstract
+   * class.
+   * 
+   * @param  opCodes
+   *         the {@link OperationCode}s of the operations requiring
+   *         authorization failure
+   * @param  regionNames
+   *         list of the region names requiring authorization failure; a value
+   *         of null indicates all regions
+   * @param  index
+   *         used to generate multiple such principals by passing different
+   *         values for this
+   * 
+   * @return a {@link Principal} not authorized to perform the given operation
+   *         in the given region
+   */
+  protected abstract Principal getDisallowedPrincipal(final OperationCode[] opCodes, final String[] regionNames, final int index);
+
+  /**
+   * Enumeration for various {@link AuthzCredentialGenerator} implementations.
+   *
+   * <p>The following schemes are supported as of now:
+   * <ul>
+   * <li>{@code DummyAuthorization} with {@code DummyAuthenticator}</li>
+   * <li>{@code XMLAuthorization} with {@code DummyAuthenticator}</li>
+   * <li>{@code XMLAuthorization} with {@code LDAPAuthenticator}</li>
+   * <li>{@code XMLAuthorization} with {@code PKCSAuthenticator}</li>
+   * <li>{@code XMLAuthorization} when using SSL sockets</li>
+   * </ul>
+   *
+   * <p>To add a new authorization scheme the following needs to be done:
+   * <ul>
+   * <li>Add implementation for {@link AccessControl}.</li>
+   * <li>Choose the authentication schemes that it shall work with from
+   * {@link CredentialGenerator.ClassCode}</li>
+   * <li>Add a new enumeration value for the scheme in this class. Notice the
+   * size of {@code VALUES} array and increase that if it is getting
+   * overflowed. Note the methods and fields for existing schemes and add for
+   * the new one in a similar manner.</li>
+   * <li>Add an implementation for {@link AuthzCredentialGenerator}. Note the
+   * {@link AuthzCredentialGenerator#init} method where different authentication
+   * schemes can be passed and initialize differently for the authentication
+   * schemes that shall be handled.</li>
+   * <li>Modify the {@link AuthzCredentialGenerator#create} method to add
+   * creation of an instance of the new implementation for the
+   * {@code ClassCode} enumeration value.</li>
+   * </ul>
+   *
+   * <p>All dunit tests will automagically start testing the new implementation
+   * after this.
+   *
+   * @since 5.5
+   */
+  public static final class ClassCode {
+
+    private static byte nextOrdinal = 0;
+
+    private static final byte ID_DUMMY = 1;
+    private static final byte ID_XML = 2;
+
+    private static final ClassCode[] VALUES = new ClassCode[10];
+    private static final Map CODE_NAME_MAP = new HashMap();
+
+    public static final ClassCode DUMMY = new ClassCode(DummyAuthorization.class.getName() + ".create", ID_DUMMY);
+    public static final ClassCode XML = new ClassCode(XmlAuthorization.class.getName() + ".create", ID_XML);
+
+    /** The name of this class. */
+    private final String name;
+
+    /** byte used as ordinal to represent this class */
+    private final byte ordinal;
+
+    /**
+     * One of the following: ID_DUMMY, ID_LDAP, ID_PKI
+     */
+    private final byte classType;
+
+    /** Creates a new instance of class code. */
+    private ClassCode(final String name, final byte classType) {
+      this.name = name;
+      this.classType = classType;
+      this.ordinal = nextOrdinal++;
+      VALUES[this.ordinal] = this;
+      CODE_NAME_MAP.put(name, this);
+    }
+
+    public boolean isDummy() {
+      return this.classType == ID_DUMMY;
+    }
+
+    public boolean isXml() {
+      return this.classType == ID_XML;
+    }
+
+    /**
+     * Returns the {@code ClassCode} represented by specified ordinal.
+     */
+    public static ClassCode fromOrdinal(final byte ordinal) {
+      return VALUES[ordinal];
+    }
+
+    /**
+     * Returns the {@code ClassCode} represented by specified string.
+     */
+    public static ClassCode parse(final String operationName) {
+      return (ClassCode) CODE_NAME_MAP.get(operationName);
+    }
+
+    /**
+     * Returns all the possible values.
+     */
+    public static List getAll() {
+      final List codes = new ArrayList();
+      for (Iterator iter = CODE_NAME_MAP.values().iterator(); iter.hasNext();) {
+        codes.add(iter.next());
+      }
+      return codes;
+    }
+
+    /**
+     * Returns the ordinal for this class code.
+     *
+     * @return the ordinal of this class code.
+     */
+    public byte toOrdinal() {
+      return this.ordinal;
+    }
+
+    /**
+     * Returns a string representation for this class code.
+     *
+     * @return the name of this class code.
+     */
+    @Override
+    public final String toString() {
+      return this.name;
+    }
+
+    /**
+     * Indicates whether other object is same as this one.
+     *
+     * @return true if other object is same as this one.
+     */
+    @Override
+    public final boolean equals(final Object obj) {
+      if (obj == this) {
+        return true;
+      }
+      if (!(obj instanceof ClassCode)) {
+        return false;
+      }
+      final ClassCode other = (ClassCode)obj;
+      return other.ordinal == this.ordinal;
+    }
+
+    /**
+     * Indicates whether other {@code ClassCode} is same as this one.
+     *
+     * @return true if other {@code ClassCode} is same as this one.
+     */
+    public final boolean equals(final ClassCode opCode) {
+      return opCode != null && opCode.ordinal == this.ordinal;
+    }
+
+    /**
+     * Returns a hash code value for this {@code ClassCode} which is the
+     * same as its ordinal.
+     *
+     * @return the ordinal of this {@code ClassCode}.
+     */
+    @Override
+    public final int hashCode() {
+      return this.ordinal;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/generator/CredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/CredentialGenerator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/CredentialGenerator.java
new file mode 100755
index 0000000..aee7ebb
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/CredentialGenerator.java
@@ -0,0 +1,332 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.generator;
+
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.security.AuthInitialize;
+import com.gemstone.gemfire.security.Authenticator;
+import com.gemstone.gemfire.security.templates.DummyAuthenticator;
+import com.gemstone.gemfire.security.templates.LdapUserAuthenticator;
+import com.gemstone.gemfire.security.templates.PKCSAuthenticator;
+import org.apache.logging.log4j.Logger;
+
+/**
+ * Encapsulates obtaining valid and invalid credentials. Implementations will be
+ * for different kinds of authentication schemes.
+ * 
+ * @since 5.5
+ */
+public abstract class CredentialGenerator {
+
+  private static final Logger logger = LogService.getLogger();
+
+  /**
+   * A set of properties that should be added to the Gemfire system properties
+   * before using the authentication module.
+   */
+  private Properties systemProperties = null;
+
+  /**
+   * A set of properties that should be added to the java system properties
+   * before using the authentication module.
+   */
+  protected Properties javaProperties = null;
+
+  /**
+   * A factory method to create a new instance of an {@link CredentialGenerator}
+   * for the given {@link ClassCode}. Caller is supposed to invoke
+   * {@link CredentialGenerator#init} immediately after obtaining the instance.
+   * 
+   * @param  classCode
+   *         the {@code ClassCode} of the {@code CredentialGenerator}
+   *         implementation
+   * 
+   * @return an instance of {@code CredentialGenerator} for the given class
+   *         code
+   */
+  public static CredentialGenerator create(final ClassCode classCode) {
+    switch (classCode.classType) {
+      // Removing dummy one to reduce test run times
+      // case ClassCode.ID_DUMMY:
+      // return new DummyCredentialGenerator();
+      case ClassCode.ID_LDAP:
+        return new LdapUserCredentialGenerator();
+        // case ClassCode.ID_SSL:ø
+        // return new SSLCredentialGenerator();
+      case ClassCode.ID_PKCS:
+        return new PKCSCredentialGenerator();
+      default:
+        return null;
+    }
+  }
+
+  /**
+   * Initialize the credential generator.
+   *
+   * @throws IllegalArgumentException when there is a problem during
+   *         initialization
+   */
+  public void init() throws IllegalArgumentException {
+    this.systemProperties = initialize();
+    logger.info("Generating CredentialGenerator with {}", this.systemProperties);
+  }
+
+  /**
+   * @return A set of extra properties that should be added to Gemfire system
+   *         properties when not null.
+   */
+  public Properties getSystemProperties() {
+    return this.systemProperties;
+  }
+
+  /**
+   * @return A set of extra properties that should be added to Gemfire system
+   *         properties when not null.
+   */
+  public Properties getJavaProperties() {
+    return this.javaProperties;
+  }
+
+  /**
+   * The {@link ClassCode} of this particular implementation.
+   * 
+   * @return the {@code ClassCode}
+   */
+  public abstract ClassCode classCode();
+
+  /**
+   * The name of the {@link AuthInitialize} factory function that should be used
+   * in conjunction with the credentials generated by this generator.
+   * 
+   * @return name of the {@code AuthInitialize} factory function
+   */
+  public abstract String getAuthInit();
+
+  /**
+   * The name of the {@link Authenticator} factory function that should be used
+   * in conjunction with the credentials generated by this generator.
+   * 
+   * @return name of the {@code Authenticator} factory function
+   */
+  public abstract String getAuthenticator();
+
+  /**
+   * Get a set of valid credentials generated using the given index.
+   */
+  public abstract Properties getValidCredentials(final int index);
+
+  /**
+   * Get a set of valid credentials for the given {@link Principal}.
+   * 
+   * @return credentials for the given {@code Principal} or null if none
+   *         possible.
+   */
+  public abstract Properties getValidCredentials(final Principal principal);
+
+  /**
+   * Get a set of invalid credentials generated using the given index.
+   */
+  public abstract Properties getInvalidCredentials(final int index);
+
+  /**
+   * Initialize the credential generator. This is provided separately from the
+   * {@link #init()} method for convenience of implementations so that they do not
+   * need to store in {@link #systemProperties}. The latter is convenient for the users
+   * who do not need to store these properties rather can obtain it later by
+   * invoking {@link #getSystemProperties()}
+   *
+   * <p>Required to be implemented by concrete classes that implement this abstract
+   * class.
+   *
+   * @return A set of extra properties that should be added to Gemfire system
+   *         properties when not null.
+   *
+   * @throws IllegalArgumentException when there is a problem during
+   *         initialization
+   */
+  protected abstract Properties initialize() throws IllegalArgumentException;
+
+  /**
+   * Enumeration for various {@link CredentialGenerator} implementations.
+   *
+   * <p>The following schemes are supported as of now:
+   * {@code DummyAuthenticator}, {@code LdapUserAuthenticator},
+   * {@code PKCSAuthenticator}. In addition SSL socket mode with mutual
+   * authentication is also supported.
+   *
+   * <p>To add a new authentication scheme the following needs to be done:
+   * <ul>
+   * <li>Add implementations for {@link AuthInitialize} and
+   * {@link Authenticator} classes for clients/peers.</li>
+   * <li>Add a new enumeration value for the scheme in this class. Notice the
+   * size of {@code VALUES} array and increase that if it is getting
+   * overflowed. Note the methods and fields for existing schemes and add for
+   * the new one in a similar manner.</li>
+   * <li>Add an implementation for {@link CredentialGenerator}.</li>
+   * <li>Modify the CredentialGenerator.Factory#create [no such Factory exists] method to add
+   * creation of an instance of the new implementation for the
+   * {@code ClassCode} enumeration value.</li>
+   * </ul>
+   *
+   * <p>All security dunit tests will automagically start testing the new
+   * implementation after this.
+   *
+   * @since 5.5
+   */
+  public static final class ClassCode {
+
+    private static byte nextOrdinal = 0;
+
+    private static final byte ID_DUMMY = 1;
+    private static final byte ID_LDAP = 2;
+    private static final byte ID_PKCS = 3;
+    private static final byte ID_SSL = 4;
+
+    private static final ClassCode[] VALUES = new ClassCode[10];
+    private static final Map CODE_NAME_MAP = new HashMap();
+
+    public static final ClassCode DUMMY = new ClassCode(DummyAuthenticator.class.getName() + ".create", ID_DUMMY);
+    public static final ClassCode LDAP = new ClassCode(LdapUserAuthenticator.class.getName() + ".create", ID_LDAP);
+    public static final ClassCode PKCS = new ClassCode(PKCSAuthenticator.class.getName() + ".create", ID_PKCS);
+    public static final ClassCode SSL = new ClassCode("SSL", ID_SSL);
+
+    /** The name of this class. */
+    private final String name;
+
+    /** byte used as ordinal to represent this class */
+    private final byte ordinal;
+
+    /**
+     * One of the following: ID_DUMMY, ID_LDAP, ID_PKCS
+     */
+    private final byte classType;
+
+    /** Creates a new instance of class code. */
+    private ClassCode(final String name, final byte classType) {
+      this.name = name;
+      this.classType = classType;
+      this.ordinal = nextOrdinal++;
+      VALUES[this.ordinal] = this;
+      CODE_NAME_MAP.put(name, this);
+    }
+
+    public boolean isDummy() {
+      return this.classType == ID_DUMMY;
+    }
+
+    public boolean isLDAP() {
+      return this.classType == ID_LDAP;
+    }
+
+    public boolean isPKCS() {
+      return this.classType == ID_PKCS;
+    }
+
+    public boolean isSSL() {
+      return this.classType == ID_SSL;
+    }
+
+    /**
+     * Returns the {@code ClassCode} represented by specified ordinal.
+     */
+    public static ClassCode fromOrdinal(final byte ordinal) {
+      return VALUES[ordinal];
+    }
+
+    /**
+     * Returns the {@code ClassCode} represented by specified string.
+     */
+    public static ClassCode parse(final String operationName) {
+      return (ClassCode) CODE_NAME_MAP.get(operationName);
+    }
+
+    /**
+     * Returns all the possible values.
+     */
+    public static List getAll() {
+      final List codes = new ArrayList();
+      for (Iterator iter = CODE_NAME_MAP.values().iterator(); iter.hasNext();) {
+        codes.add(iter.next());
+      }
+      return codes;
+    }
+
+    /**
+     * Returns the ordinal for this operation code.
+     *
+     * @return the ordinal of this operation.
+     */
+    public byte toOrdinal() {
+      return this.ordinal;
+    }
+
+    /**
+     * Returns a string representation for this operation.
+     *
+     * @return the name of this operation.
+     */
+    @Override
+    public final String toString() {
+      return this.name;
+    }
+
+    /**
+     * Indicates whether other object is same as this one.
+     *
+     * @return true if other object is same as this one.
+     */
+    @Override
+    public final boolean equals(final Object obj) {
+      if (obj == this) {
+        return true;
+      }
+      if (!(obj instanceof ClassCode)) {
+        return false;
+      }
+      final ClassCode other = (ClassCode)obj;
+      return other.ordinal == this.ordinal;
+    }
+
+    /**
+     * Indicates whether other {@code ClassCode} is same as this one.
+     *
+     * @return true if other {@code ClassCode} is same as this one.
+     */
+    public final boolean equals(final ClassCode opCode) {
+      return opCode != null && opCode.ordinal == this.ordinal;
+    }
+
+    /**
+     * Returns a hash code value for this {@code ClassCode} which is the
+     * same as its ordinal.
+     *
+     * @return the ordinal of this operation.
+     */
+    @Override
+    public final int hashCode() {
+      return this.ordinal;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/generator/DummyAuthzCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/DummyAuthzCredentialGenerator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/DummyAuthzCredentialGenerator.java
new file mode 100755
index 0000000..64fb84a
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/DummyAuthzCredentialGenerator.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.generator;
+
+import java.security.Principal;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+
+import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
+import com.gemstone.gemfire.security.templates.DummyAuthorization;
+import com.gemstone.gemfire.security.templates.UsernamePrincipal;
+
+public class DummyAuthzCredentialGenerator extends AuthzCredentialGenerator {
+
+  public static final byte READER_ROLE = 1;
+  public static final byte WRITER_ROLE = 2;
+  public static final byte ADMIN_ROLE = 3;
+
+  private static Set readerOpsSet;
+  private static Set writerOpsSet;
+
+  static {
+    readerOpsSet = new HashSet();
+    for (int index = 0; index < DummyAuthorization.READER_OPS.length; index++) {
+      readerOpsSet.add(DummyAuthorization.READER_OPS[index]);
+    }
+
+    writerOpsSet = new HashSet();
+    for (int index = 0; index < DummyAuthorization.WRITER_OPS.length; index++) {
+      writerOpsSet.add(DummyAuthorization.WRITER_OPS[index]);
+    }
+  }
+
+  public static byte getRequiredRole(final OperationCode[] opCodes) {
+    byte roleType = ADMIN_ROLE;
+    boolean requiresReader = true;
+    boolean requiresWriter = true;
+
+    for (int opNum = 0; opNum < opCodes.length; opNum++) {
+      if (requiresReader && !readerOpsSet.contains(opCodes[opNum])) {
+        requiresReader = false;
+      }
+      if (requiresWriter && !writerOpsSet.contains(opCodes[opNum])) {
+        requiresWriter = false;
+      }
+    }
+    if (requiresReader) {
+      roleType = READER_ROLE;
+    }
+    else if (requiresWriter) {
+      roleType = WRITER_ROLE;
+    }
+    return roleType;
+  }
+
+  @Override
+  protected Properties init() throws IllegalArgumentException {
+    if (!this.generator.classCode().isDummy()) {
+      throw new IllegalArgumentException("DummyAuthorization module only works with DummyAuthenticator");
+    }
+    return null;
+  }
+
+  @Override
+  public ClassCode classCode() {
+    return ClassCode.DUMMY;
+  }
+
+  @Override
+  public String getAuthorizationCallback() {
+    return DummyAuthorization.class.getName() + ".create";
+  }
+
+  @Override
+  protected Principal getAllowedPrincipal(final OperationCode[] opCodes, final String[] regionNames, final int index) {
+    final byte roleType = getRequiredRole(opCodes);
+    return getPrincipal(roleType, index);
+  }
+
+  @Override
+  protected Principal getDisallowedPrincipal(final OperationCode[] opCodes, final String[] regionNames, final int index) {
+    byte roleType = getRequiredRole(opCodes);
+    byte disallowedRoleType;
+    switch (roleType) {
+      case READER_ROLE:
+        disallowedRoleType = WRITER_ROLE;
+        break;
+      case WRITER_ROLE:
+        disallowedRoleType = READER_ROLE;
+        break;
+      default:
+        disallowedRoleType = READER_ROLE;
+        break;
+    }
+    return getPrincipal(disallowedRoleType, index);
+  }
+
+  @Override
+  protected int getNumPrincipalTries(final OperationCode[] opCodes,  final String[] regionNames) {
+    return 5;
+  }
+
+  private Principal getPrincipal(final byte roleType, final int index) {
+    String[] admins = new String[] { "root", "admin", "administrator" };
+    switch (roleType) {
+      case READER_ROLE:
+        return new UsernamePrincipal("reader" + index);
+      case WRITER_ROLE:
+        return new UsernamePrincipal("writer" + index);
+      default:
+        return new UsernamePrincipal(admins[index % admins.length]);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/generator/DummyCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/DummyCredentialGenerator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/DummyCredentialGenerator.java
new file mode 100755
index 0000000..b709dbc
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/DummyCredentialGenerator.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.generator;
+
+import com.gemstone.gemfire.security.templates.DummyAuthenticator;
+import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
+
+import java.security.Principal;
+import java.util.Properties;
+
+public class DummyCredentialGenerator extends CredentialGenerator {
+
+  @Override
+  protected Properties initialize() throws IllegalArgumentException {
+    return null;
+  }
+
+  @Override
+  public ClassCode classCode() {
+    return ClassCode.DUMMY;
+  }
+
+  @Override
+  public String getAuthInit() {
+    return UserPasswordAuthInit.class.getName() + ".create";
+  }
+
+  @Override
+  public String getAuthenticator() {
+    return DummyAuthenticator.class.getName() + ".create";
+  }
+
+  @Override
+  public Properties getValidCredentials(final int index) {
+    final String[] validGroups = new String[] { "admin", "user", "reader", "writer" };
+    final String[] admins = new String[] { "root", "admin", "administrator" };
+
+    final Properties props = new Properties();
+    final int groupNum = index % validGroups.length;
+
+    String userName;
+    if (groupNum == 0) {
+      userName = admins[index % admins.length];
+    } else {
+      userName = validGroups[groupNum] + (index / validGroups.length);
+    }
+
+    props.setProperty(UserPasswordAuthInit.USER_NAME, userName);
+    props.setProperty(UserPasswordAuthInit.PASSWORD, userName);
+    return props;
+  }
+
+  @Override
+  public Properties getValidCredentials(final Principal principal) {
+    final String userName = principal.getName();
+
+    if (DummyAuthenticator.checkValidName(userName)) {
+      Properties props = new Properties();
+      props.setProperty(UserPasswordAuthInit.USER_NAME, userName);
+      props.setProperty(UserPasswordAuthInit.PASSWORD, userName);
+      return props;
+
+    } else {
+      throw new IllegalArgumentException("Dummy: [" + userName + "] is not a valid user");
+    }
+  }
+
+  @Override
+  public Properties getInvalidCredentials(int index) {
+    Properties props = new Properties();
+    props.setProperty(UserPasswordAuthInit.USER_NAME, "invalid" + index);
+    props.setProperty(UserPasswordAuthInit.PASSWORD, "none");
+    return props;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8de59df1/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java
new file mode 100755
index 0000000..bbd9528
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.security.generator;
+
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.tier.sockets.HandShake;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.test.dunit.Assert;
+import com.gemstone.gemfire.util.test.TestUtil;
+import com.gemstone.gemfire.security.templates.LdapUserAuthenticator;
+import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
+import org.apache.logging.log4j.Logger;
+
+import java.security.Principal;
+import java.util.Properties;
+import java.util.Random;
+
+public class LdapUserCredentialGenerator extends CredentialGenerator {
+
+  private static final Logger logger = LogService.getLogger();
+
+  private static final String USER_PREFIX = "gemfire";
+  private static final Random RANDOM = new Random();
+  private static final String[] CIPHERS = new String[] { "", "DESede", "AES:128", "Blowfish:128" };
+
+  private static boolean enableServerAuthentication = false;
+
+  private boolean serverAuthEnabled = false;
+
+  public LdapUserCredentialGenerator() {
+    // Toggle server authentication enabled for each test
+    // This is done instead of running all the tests with both
+    // server auth enabled/disabled to reduce test run time.
+    enableServerAuthentication = !enableServerAuthentication;
+    this.serverAuthEnabled = enableServerAuthentication;
+  }
+
+  @Override
+  protected Properties initialize() throws IllegalArgumentException {
+    final String ldapServer = System.getProperty("gf.ldap.server", "ldap");
+    final String ldapBaseDN = System.getProperty("gf.ldap.basedn", "ou=ldapTesting,dc=pune,dc=gemstone,dc=com");
+    final String ldapUseSSL = System.getProperty("gf.ldap.usessl");
+
+    final Properties extraProps = new Properties();
+    extraProps.setProperty(LdapUserAuthenticator.LDAP_SERVER_NAME, ldapServer);
+    extraProps.setProperty(LdapUserAuthenticator.LDAP_BASEDN_NAME, ldapBaseDN);
+
+    if (ldapUseSSL != null && ldapUseSSL.length() > 0) {
+      extraProps.setProperty(LdapUserAuthenticator.LDAP_SSL_NAME, ldapUseSSL);
+    }
+
+    if (serverAuthEnabled) {
+      String keyStoreFile = TestUtil.getResourcePath(LdapUserCredentialGenerator.class, PKCSCredentialGenerator.keyStoreDir + "/gemfire1.keystore");
+      extraProps.setProperty(HandShake.PRIVATE_KEY_FILE_PROP, keyStoreFile);
+      extraProps.setProperty(HandShake.PRIVATE_KEY_ALIAS_PROP, "gemfire1");
+      extraProps.setProperty(HandShake.PRIVATE_KEY_PASSWD_PROP, "gemfire");
+    }
+
+    Assert.assertNotNull(extraProps.getProperty(LdapUserAuthenticator.LDAP_BASEDN_NAME));
+
+    logger.info("Generating LdapUserCredentialGenerator with {}", extraProps);
+
+    return extraProps;
+  }
+
+  @Override
+  public ClassCode classCode() {
+    return ClassCode.LDAP;
+  }
+
+  @Override
+  public String getAuthInit() {
+    return UserPasswordAuthInit.class.getName() + ".create";
+  }
+
+  @Override
+  public String getAuthenticator() {
+    return LdapUserAuthenticator.class.getName() + ".create";
+  }
+
+  @Override
+  public Properties getValidCredentials(final int index) {
+    final Properties props = new Properties();
+    props.setProperty(UserPasswordAuthInit.USER_NAME, USER_PREFIX + ((index % 10) + 1));
+    props.setProperty(UserPasswordAuthInit.PASSWORD, USER_PREFIX + ((index % 10) + 1));
+    props.setProperty(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME, CIPHERS[RANDOM.nextInt(CIPHERS.length)]);
+
+    if (serverAuthEnabled) {
+      final String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, PKCSCredentialGenerator.keyStoreDir + "/publickeyfile");
+      props.setProperty(HandShake.PUBLIC_KEY_FILE_PROP, keyStoreFile);
+      props.setProperty(HandShake.PUBLIC_KEY_PASSWD_PROP, "gemfire");
+    }
+
+    return props;
+  }
+
+  @Override
+  public Properties getValidCredentials(final Principal principal) {
+    Properties props = null;
+    final String userName = principal.getName();
+
+    if (userName != null && userName.startsWith(USER_PREFIX)) {
+      boolean isValid;
+
+      try {
+        final int suffix = Integer.parseInt(userName.substring(USER_PREFIX.length()));
+        isValid = (suffix >= 1 && suffix <= 10);
+      } catch (Exception ex) {
+        isValid = false;
+      }
+
+      if (isValid) {
+        props = new Properties();
+        props.setProperty(UserPasswordAuthInit.USER_NAME, userName);
+        props.setProperty(UserPasswordAuthInit.PASSWORD, userName);
+      }
+    }
+
+    if (props == null) {
+      throw new IllegalArgumentException("LDAP: [" + userName + "] not a valid user");
+    }
+
+    props.setProperty(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME, CIPHERS[RANDOM.nextInt(CIPHERS.length)]);
+
+    if (serverAuthEnabled) {
+      final String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, PKCSCredentialGenerator.keyStoreDir + "/publickeyfile");
+      props.setProperty(HandShake.PUBLIC_KEY_FILE_PROP, keyStoreFile);
+      props.setProperty(HandShake.PUBLIC_KEY_PASSWD_PROP, "gemfire");
+    }
+
+    return props;
+  }
+
+  @Override
+  public Properties getInvalidCredentials(final int index) {
+    final Properties props = new Properties();
+    props.setProperty(UserPasswordAuthInit.USER_NAME, "invalid" + index);
+    props.setProperty(UserPasswordAuthInit.PASSWORD, "none");
+    props.setProperty(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME, CIPHERS[RANDOM.nextInt(CIPHERS.length)]);
+
+    if (serverAuthEnabled) {
+      final String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, PKCSCredentialGenerator.keyStoreDir + "/publickeyfile");
+      props.setProperty(HandShake.PUBLIC_KEY_FILE_PROP, keyStoreFile);
+      props.setProperty(HandShake.PUBLIC_KEY_PASSWD_PROP, "gemfire");
+    }
+
+    return props;
+  }
+}



[20/54] [abbrv] incubator-geode git commit: GEODE-1097 allow Lambda invocations to be named so that they show up in test logs

Posted by je...@apache.org.
GEODE-1097 allow Lambda invocations to be named so that they show up in test logs

addressing issues found by Jianxia.  One of the VM methods was not invoking
the correct runnable.  Unit tests were needed for the NamedRunnable
invocation methods.  Since Runnable doesn't return a result the test
ensures that the target method has been invoked by having it throw an
exception.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/c5a88171
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/c5a88171
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/c5a88171

Branch: refs/heads/feature/GEODE-17-2
Commit: c5a88171733532e76f9f6880d0a8f5ea6fe0bede
Parents: 5503de0
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Tue Mar 15 14:02:34 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Tue Mar 15 14:04:47 2016 -0700

----------------------------------------------------------------------
 .../com/gemstone/gemfire/test/dunit/VM.java     |  2 +-
 .../test/dunit/tests/BasicDUnitTest.java        | 42 ++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c5a88171/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java
index 8e408dc..1c6ba6e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/VM.java
@@ -259,7 +259,7 @@ public class VM implements Serializable {
    */
   public AsyncInvocation invokeAsync(String name, SerializableRunnableIF r) {
     NamedRunnable nr = new NamedRunnable(name, r);
-    return invokeAsync(r, "run", new Object[0]);
+    return invokeAsync(nr, "run", new Object[0]);
   }
   
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c5a88171/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/BasicDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/BasicDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/BasicDUnitTest.java
index 195d5f4..3a98188 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/BasicDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/BasicDUnitTest.java
@@ -106,6 +106,48 @@ public class BasicDUnitTest extends DistributedTestCase {
     assertEquals(0, vm0num);
     
   }
+  
+  static class BasicDUnitException extends RuntimeException {
+    public BasicDUnitException() {
+    }
+  }
+  
+  public static void throwException() throws BasicDUnitException {
+    throw new BasicDUnitException();
+  }
+
+  public void testInvokeNamedRunnableLambdaAsync() throws Throwable {
+    Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    
+    AsyncInvocation<Integer> async0 = vm0.invokeAsync("throwSomething", () -> BasicDUnitTest.throwException());
+    try {
+      async0.getResult();
+      throw new Error("expected an exception to be thrown");
+    } catch (Exception e) {
+      Throwable cause = e.getCause();
+      if (cause == null) {
+        throw new Error("expected an exception with a cause to be thrown", e);
+      }
+      if ( !(cause.getCause() instanceof BasicDUnitException) ) {
+        throw new Error("expected a BasicDUnitException to be thrown", e.getCause());
+      }
+    }
+  }
+
+  public void testInvokeNamedRunnableLambda() throws Throwable {
+    Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    
+    try {
+      vm0.invoke("throwSomething", () -> BasicDUnitTest.throwException());
+      throw new Error("expected an exception to be thrown");
+    } catch (Exception e) {
+      if ( !(e.getCause() instanceof BasicDUnitException) ) {
+        throw new Error("expected a BasicDUnitException to be thrown", e.getCause());
+      }
+    }
+  }
 
   static class BasicTestException extends RuntimeException {
     BasicTestException() {


[03/54] [abbrv] incubator-geode git commit: GEODE-573: Fix broken image links in javadocs

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6266eb04/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/properties.html
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/properties.html b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/properties.html
new file mode 100755
index 0000000..1cd1b72
--- /dev/null
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/properties.html
@@ -0,0 +1,3937 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<html>
+<head>
+<title>GemFire System Properties</title>
+</head>
+<body>
+<h1>Introduction</h1>
+Please edit this file by hand in order to facilitate merges!
+<p>
+Please keep entries in this file in alphabetical order in order to
+facilitate merging!
+<h1>Java Methods Swept</h1>
+These are the methods that I have found that reference the system properties
+table.  If you can think of others I have missed, add them (alphabetically)
+to this list, perform the sweep using Eclipse and add your results.
+<p>
+<ul>
+<li><code>Boolean#getBoolean(String)</code></li>
+<li><code>Integer#getInteger(String)</code></li>
+<li><code>Integer#getInteger(String, Integer)</code></li>
+<li><code>Integer#getInteger(String, int)</code></li>
+<li><code>Long#getLong(String)</code></li>
+<li><code>Long#getLong(String, Long)</code></li>
+<li><code>Long#getLong(String, long)</code></li>
+<li><code>System#getProperties</code></li>
+<li><code>System#getProperty(String)</code></li>
+<li><code>System#getProperty(String, String)</code></li>
+</ul>
+
+<h1>Miscellaneous</h1>
+
+DistributionConfigImpl constructor prepends <code>gemfire.</code> to each
+valid attribute name, then looks for a System property with that value.  If
+such a property name exists, it overrides any read from a property file or
+any properties passed into the caller.
+<p>
+<code>com.gemstone.gemfire.internal.cache.Oplog</code> looks for properties
+of the form:
+<ul>
+
+<li>fullRegionName + <code>_UNIT_BUFF_SIZE</code></li> -- <em>Integer</em>;
+"Asif: The minimum unit size of the Pool created. The ByteBuffer pools
+present at different indexes will be multiple of this size. Default unit
+buffer size is 1024"
+
+<li>fullRegionName + <code>_MAX_POOL_SIZE</code></li> -- <em>Integer</em>;
+"The initial pool size . Default pool size is zero"
+
+<li>fullRegionName + <code>_WAIT_TIME</code></li> -- <em>Integer</em>;
+"Asif: MAX time in milliseconds for which a thread will wait for a buffer to
+get freed up. If not available in that duration a buffer will be created on
+the fly. The timeout has no meaning if the max pool size is -1( no upper
+bound)"
+</ul>
+<p>
+
+<h1>Properties, in Alphabetical Order</h1>
+
+
+<dl>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>AdminDistributedSystemImpl.TIMEOUT_MS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 60000)
+<p>
+See <code>com.gemstone.gemfire.admin.internal.AdminDistributedSystemImpl#TIMEOUT_MS</code>.
+<p>
+TBA
+</dd>
+
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>AvailablePort.fastRandom</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.AvailablePort</code>.
+<p>
+If true, an instance of <code>java.util.Random</code> is used instead of
+<code>java.security.SecureRandom</code> to randomly select a port.
+<p>
+This property is available in case there is a performance issue involved
+with random port selection.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>AvailablePort.timeout</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 2000)
+<p>
+See <code>com.gemstone.gemfire.internal.AvailablePort#isPortAvailable</code>.
+<p>
+When establishing a JGroups locator, this sets the <code>SO_TIMEOUT</code>
+characteristic on the UDP port that we attempt to test.
+<p>
+Units are in milliseconds.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>Bridge.VERBOSE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+See <code>com.gemstone.gemfire.internal.cache.BridgeServerImpl.#VERBOSE</code>.
+<p>
+Enable verbose logging in the BridgeServer
+<p>
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>BridgeServer.HANDSHAKE_POOL_SIZE</strong></dt>
+<dd>
+<em>Public:</em> yes
+<p>
+<em>Integer</em> (default is 4)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl#HANDSHAKE_POOL_SIZE</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>BridgeServer.MAXIMUM_CHUNK_SIZE</strong></dt>
+<dd>
+<em>Public:</em> yes
+<p>
+<em>Integer</em> (default is 100)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection#maximumChunkSize</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>BridgeServer.MAX_INCOMING_DATA</strong></dt>
+<dd>
+<em>Public:</em> yes?
+<p>
+<em>Integer</em> (default is -1)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection#MAX_INCOMING_DATA</code>.
+<p>
+<pre>
+   Maximum number of concurrent incoming client message bytes that a bridge server will allow.
+   Once a server is working on this number additional incoming client messages
+   will wait until one of them completes or fails.
+   The bytes are computed based in the size sent in the incoming msg header.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>BridgeServer.MAX_INCOMING_MSGS</strong></dt>
+<dd>
+<em>Public:</em> yes?
+<p>
+<em>Integer</em> (default is -1)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection#MAX_INCOMING_MSGS</code>.
+<p>
+<pre>
+   Maximum number of concurrent incoming client messages that a bridge server will allow.
+   Once a server is working on this number additional incoming client messages
+   will wait until one of them completes or fails.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>BridgeServer.SELECTOR</strong></dt>
+<dd>
+<em>Public:</em> jpmc-cbb
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl#DEPRECATED_SELECTOR</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>BridgeServer.SELECTOR_POOL_SIZE</strong></dt>
+<dd>
+<em>Public:</em> jpmc-cbb
+<p>
+<em>Integer</em> (default is 16)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl#DEPRECATED_SELECTOR_POOL_SIZE</code>.
+<p>
+<pre>
+   This system property is only used if max-threads == 0.
+   This is for 5.0.2 backwards compatibility.
+   @deprecated since 5.1 use cache-server max-threads instead
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>BridgeServer.SOCKET_BUFFER_SIZE</strong></dt>
+<dd>
+<em>Public:</em> yes
+<p>
+<em>Integer</em> (default is 32768)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier#socketBufferSize</code>.
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientUpdater#CacheClietnUpdater(String, EndpointImpl, List, LogWriter, boolean, DistributedSystem)</code>.
+<p>
+<pre>
+   The size of the server-to-client communication socket buffers. This can be
+   modified using the BridgeServer.SOCKET_BUFFER_SIZE system property.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>BridgeServer.acceptTimeout</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 2900)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl#acceptTimeout</code>.
+<p>
+Units are in milliseconds.
+<p>
+<pre>
+  Test value for accept timeout
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>BridgeServer.backlog</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 1000)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl</code>
+constructor.
+<p>
+This is the TCP accept backlog for the acceptor thread's listening socket.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>BridgeServer.handShakeTimeout</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 59000)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl#handShakeTimeout</code>.
+<p>
+<pre>
+  Test value for handshake timeout
+</pre>
+<p>
+Units are in milliseconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>CacheServerLauncher.PRINT_LAUNCH_COMMAND</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.CacheServerLauncher#PRINT_LAUNCH_COMMAND</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DataSerializer.DEBUG</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.DataSerializer#DEBUG</code>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DataSerializer.DUMP_SERIALIZED</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.DataSerializer#DUMP_SERIALIZED</code>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributedLockService.VERBOSE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.locks.DLockLogWriter#VERBOSE</code>.
+<p>
+Enables logging for this class.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.DEBUG_JAVAGROUPS</strong></dt>
+<dd>
+<em>Public:</em> yes (general debugging)
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager</code>.
+<p>
+See <code>com.gemstone.org.jgroups.stack.Protocol#trace/<code>.
+<p>
+Enables JGroups-package debug logging.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.DISCONNECT_WAIT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is 10 * 1000)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.InternalDistributedSystem#MAX_DISCONNECT_WAIT</code>.
+<p>
+<pre>
+   This is how much time, in milliseconds to allow a disconnect listener
+   to run before we interrupt it.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.INCOMING_QUEUE_LIMIT</strong></dt>
+<dd>
+<em>Public:</em> jpmc-cbb
+<p>
+<em>Integer</em> (default is 80000)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#INCOMING_QUEUE_LIMIT</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.INCOMING_QUEUE_THROTTLE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is INCOMING_QUEUE_LIMIT * .75)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#INCOMING_QUEUE_THROTTLE</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.JAVAGROUPS_CONFIG</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em>
+<p>
+If multicast is enabled, the default is com/gemstone/gemfire/distributed/internal/javagroups-mcast.txt.
+<p>
+If multicast is not enabled, the default is com/gemstone/gemfire/distributed/internal/javagroups-config.txt.
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
+<p>
+<pre>
+   The system property that specifies the name of a file from which to read
+   Jgroups configuration information
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.MAX_FE_THREADS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer:</em> (default is 16)
+<p>
+Maximum function execution threads.
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#MAX_FE_THREADS</code>.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.MAX_PR_THREADS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 1)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#MAX_PR_THREADS</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.MAX_SERIAL_QUEUE_THREAD</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 20)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#MAX_SERIAL_QUEUE_THREAD</code>.
+<p>
+<pre>
+  Max number of serial Queue executors, in case of multi-serial-queue executor
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.MAX_THREADS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 100)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#MAX_THREADS</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.MAX_WAITING_THREADS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is Integer.MAX_VALUE)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#MAX_WAITING_THREADS</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.OptimizedUpdateByteLimit</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 2000)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.SearchLoadAndWriteProcessor#SMALL_BLOB_SIZE</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.PUSHER_QUEUE_SIZE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 4096)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#PUSHER_QUEUE_SIZE</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.PUSHER_THREADS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 50)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#PUSHER_THREADS</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.SERIAL_QUEUE_BYTE_LIMIT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 40 * 1024 * 1024)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#SERIAL_QUEUE_BYTE_LIMIT</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.SERIAL_QUEUE_SIZE_LIMIT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 20000)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#SERIAL_QUEUE_SIZE_LIMIT</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.SERIAL_QUEUE_SIZE_THROTTLE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is SERIAL_QUEUE_SIZE_LIMIT * THROTTLE_PERCENT)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#SERIAL_QUEUE_THROTTLE</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.SERIAL_QUEUE_THROTTLE_PERCENT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 75)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#THROTTLE_PERCENT</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.STARTUP_TIMEOUT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 15000)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#STARTUP_TIMEOUT</code>.
+<p>
+Units are in milliseconds.  This is how long a Startup message waits before
+it declares the peer to be nonresponsive.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.TIMEOUT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is -1)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#TIMEOUT</code>.
+<p>
+<pre>
+  The number of milliseconds to wait for distribution-related
+  things to happen */
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.TOTAL_SERIAL_QUEUE_BYTE_LIMIT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 80 * 1024 * 1024)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#TOTAL_SERIAL_QUEUE_BYTE_LIMIT</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.TOTAL_SERIAL_QUEUE_THROTTLE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is SERIAL_QUEUE_BYTE_LIMIT * THROTTLE_PERCENT)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#TOTAL_SERIAL_QUEUE_THROTTLE</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.VERBOSE</strong></dt>
+<dd>
+<em>Public:</em> yes (general debugging)
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#VERBOSE</code>.
+<p>
+Enables certain additional (fine-level?) logging.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.VERBOSE_VIEWS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#VERBOSE_VIEWS</code>.
+<p>
+Enables additional info-level logging
+(see <code>#addShunnedMember</code> and <code>#addSurpriseMember</code>).
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.enqueueOrderedMessages</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#INLINE_PROCESS</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.requireAllStartupResponses</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#sendStartupMessage</code>.
+<p>
+Fail distributed system join unless a startup response is received from
+<em>all</em> peers.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.singleSerialExecutor</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#MULTI_SERIAL_EXECUTORS</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DistributionManager.syncEvents</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionManager#SYNC_EVENTS</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DynamicRegionFactory.disablePersistence</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.cache.DynamicRegionFactory#DISABLE_PERSIST_BACKUP</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DynamicRegionFactory.disableRegisterInterest</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.cache.DynamicRegionFactory#DISABLE_REGISTER_INTEREST</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>DynamicRegionFactory.msDelay</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is 250)
+<p>
+See <code>com.gemstone.gemfire.cache.DynamicRegionFactory#regionCreateSleepMillis</code>.
+<p>
+<pre>
+   This controls the delay introduced to try and avoid any race conditions
+   between propagation of newly created Dynamic Regions
+   and the Entries put into them.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>Gateway.EVENT_TIMEOUT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 5 * 60 * 1000)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GatewayImpl.EventWrapper#EVENT_TIMEOUT</code>.
+<p>
+Units are in milliseconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>Gateway.MAXIMUM_SHUTDOWN_PEEKS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 20)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GatewayImpl.#MAXIMUM_SHUTDOWN_PEEKS</code>.
+<p>
+<pre>
+  The number of times to peek on shutdown before giving up and shutting down.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>Gateway.QUEUE_SIZE_THRESHOLD</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 5000)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GatewayImpl.#QUEUE_SIZE_THRESHOLD</code>.
+<p>
+<pre>
+  The queue size threshold used to warn the user. If the queue reaches this
+  size, log a warning.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>Gateway.TOKEN_TIMEOUT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 15000)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GatewayImpl.#TOKEN_TIMEOUT</code>.
+<p>
+<pre>
+  Timeout tokens in the unprocessedEvents map after this many milliseconds.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>GetInitialImage.chunkSize</strong></dt>
+<dd>
+<em>Public:</em> ml-rio
+<p>
+<em>Integer</em> (default is 500 * 1024)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.InitialImageOperation#CHUNK_SIZE_IN_BYTES</code>.
+<p>
+<pre>
+   maximum number of bytes to put in a single message
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>GrantorRequestProcessor.ELDER_CHANGE_SLEEP</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is 100)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.locks.GrantorRequestProcessor#ELDER_CHANGE_SLEEP</code>.
+<p>
+<pre>
+   The number of milliseconds to sleep for elder change if current elder
+   is departing (and already sent shutdown msg) but is still in the View.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>JGroups.SHUN_SUNSET</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 90)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#isShunned</code>.
+<p>
+This is the length of time during which incoming messages from a departed peer
+are regarded as out-of-order messages and are hence ignored (shunned).
+<p>
+Units are in seconds.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>Locator.forceAdminDMType</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.InternalLocator#FORCE_ADMIN_DM_TYPE</code>.
+<p>
+No longer exists as of 7.0.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>Locator.forceLocatorDMType</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+Used internally by the locator. It sets it to true to tell other code
+that the member type should be LOCATOR.
+As of 7.0.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>Locator.inhibitDMBanner</strong></dt>
+<dd>
+<em>Public:</em> ml-rio
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.InternalLocator#INHIBIT_DM_BANNER</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>MAX_WAIT_FOR_SPACE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 20)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.ComplexDiskRegion#MAX_WAIT_FOR_SPACE</code>.
+<p>
+Units are in seconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>StatArchiveReader.dump</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.StatArchiveReader(File[], ValueFilter[], boolean)</code>.
+<p>
+See <code>com.gemstone.gemfire.internal.StatArchiveReader#dump(PrintWriter)</code>.
+<p>
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>StatArchiveReader.dumpall</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.StatArchiveReader(File[], ValueFilter[], boolean)</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>StateFlushOperation.DEBUG</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+<em>Boolean</em>
+<p>
+See <code>com.gemstone.gemfire.internal.cache.StateFlushOperation#DEBUG</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>ack-threshold-exception</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.ReplyProcessor21#THROW_EXCEPTION_ON_TIMEOUT</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>bind.address</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em> (See <code>InetAddress.getByName</code>)
+<p>
+See <code>com.gemstone.org.jgroups.protocols.FD_SOCK#setProperties(Properties)</code>.
+<p>
+See <code>com.gemstone.org.jgroups.protocols.MPING#setProperties(Properties)</code>.
+<p>
+See <code>com.gemstone.org.jgroups.protocols.TP#setProperties(Properties)</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>java.util.concurrent.NanoTimerProvider</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em>
+<p>
+Default is <code>java.util.concurrent.NanoTimerProvider</code>.
+<p>
+See java.util.concurrent.Utils#providerProp</code>.
+<p>
+This is the name of a class that implements the
+<code>java.util.concurrent.helpers.NanoTimer</code>
+interface.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>com.gemstone.gemfire.internal.OSProcess.trace</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em>
+<p>
+See <code>com.gemstone.gemfire.internal.OSProcess#bgexec(String[], File, File, boolean)</code>.
+<p>
+If this property exists and has non-zero length, additional information about
+the executed command is printed to <code>System.out</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>com.gemstone.gemfire.internal.cache.PartitionedRegion-logging</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.PartitionedRegion#initPrInternals</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore-logging (constructor)</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore.PartitionedRegionDataStore(PartitionedRegion)</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>disable-intelligent-msg</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionAdvisor#disabled</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>enable_canonicalization</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.org.jgroups.Message#DISABLE_CANONICALIZATION</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>force.properties</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em>
+<p>
+See <code>com.gemstone.org.jgroups.conf.ConfiguratorFactory class init</code>.
+<p>
+A JGroups configuration string?
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>GemFire.ALWAYS_REPLICATE_UPDATES</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+If true then non-replicate regions will turn a remote update they receive
+on an entry they do not have into a local create.
+By default these updates would have been ignored.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.ALLOW_PERSISTENT_TRANSACTIONS</strong></dt>
+<dd>
+<em>Public:</em> true
+<p>
+<em>Boolean</em> (default is false)
+<p>
+If true then transactions on persistent regions are allowed.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.artificialGatewayDelay</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> -1
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GatewayEventRemoteDispatcher#ARTIFICIAL_DELAY</code>
+<p>
+Introduce artificial delay (in ms) before batch sending to simulate a real WAN link
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.ASCII_STRINGS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.tcp.MsgStreamer#ASCII_STRINGS</code>.
+<p>
+See <code>com.gemstone.gemfire.internal.HeapDataOutputStream#ASCII_STRINGS</code>.
+<p>
+Causes GemFire's implementation of writeUTF to only work for Strings that use the ASCII
+character set. So Strings that use the international characters will be serialized incorrectly.
+If you know your Strings only use ASCII setting this to true can improve your performance if
+you are using writeUTF frequently. Most Strings are serialized using DataSerializer.writeString
+which does not use writeUTF.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.AutoSerializer.SAFE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+If set to true forces the ReflectionBasedAutoSerializer to not use the
+sun.misc.Unsafe code. Using Unsafe optimizes performance but reduces
+portablity.
+By default ReflectionBasedAutoSerializer will attempt to use Unsafe but
+silently not use it if it is not available.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.AutoSerializer.UNSAFE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+If set to true then the ReflectionBasedAutoSerializer will throw
+an exception if it is not able to use the sun.misc.Unsafe code.
+Using Unsafe optimizes performance but reduces portablity.
+By default ReflectionBasedAutoSerializer will attempt to use Unsafe but
+silently not use it if it is not available.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.BUCKET_RECOVERY_DELAY</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is 2)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.PRHAFailureAndRecoveryPRovider#BUCKET_RECOVERY_DELAY</code>.
+<p>
+Mean amount of time, in seconds, to delay before starting to
+recover a bucket.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.BUCKET_RECOVERY_JITTER</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is 200)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.PRHAFailureAndRecoveryPRovider#BUCKET_RECOVERY_JITTER</code>.
+<p>
+<pre>
+   Maximum additional amount of time, in milliseconds, to skew bucket creation, 
+   to stagger recovery and creation in a starting system. 
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.BucketAdvisor.getPrimaryTimeout</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is 1000 * 60)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.BucketAdvisor#GET_PRIMARY_TIMEOUT</code>.
+<p>
+<pre>
+   Specifies the timeout to wait for a primary when calling {@link 
+   #getPrimary()} 
+</pre>
+<p>
+Units are in milliseconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.Cache.ASYNC_EVENT_LISTENERS</strong></dt>
+<dd>
+<em>Public:</em> yes
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GemFireCache#ASYNC_EVENT_LISTENERS</code>.
+<p>
+If true then cache event listeners will be invoked by a background thread.
+By default they are invoked by the same thread that is doing the cache operation.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.Cache.EVENT_QUEUE_LIMIT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 4096)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GemFireCache#EVENT_QUEUE_LIMIT</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.Cache.defaultLockLease</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 120)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GemFireCache#DEFAULT_LOCK_LEASE</code>.
+<p>
+<pre>
+  The default duration (in seconds) of a lease on a distributed lock
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.Cache.defaultLockTimeout</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 60)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GemFireCache#DEFAULT_LOCK_TIMEOUT</code>.
+<p>
+<pre>
+  The default number of seconds to wait for a distributed lock
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.Cache.defaultSearchTimeout</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 300)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GemFireCache#DEFAULT_SEARCH_TIMEOUT</code>.
+<p>
+<pre>
+  The default amount of time to wait for a <code>netSearch</code> to
+  complete
+</pre>
+<p>
+Units are in seconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.Cache.startSerialNumber</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is Integer.MAX_VALUE - 10)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GemFireCache#START_SERIAL_NUMBER</code>.
+<p>
+<pre>
+  Specifies the starting serial number for the {@link #serialNumberSequencer
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.CacheServerLauncher.assignBucketsToPartitions</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.CacheServerLauncher.ASSIGN_BUCKETS</code>.
+<p>
+If a cache server is started using that CacheServerLauncher and this property is set to true, the cache
+server will create all of the buckets when it is started.
+<p>
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.CacheDistributionAdvisor.rolloverThreshold</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 1000)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.CacheDistributionAdvisor#ROLLOVER_THRESHOLD</code>.
+<p>
+<pre>
+  Used to compare profile versioning numbers against 
+  {@link Integer#MAX_VALUE} and {@link Integer#MIN_VALUE} to determine
+  if a rollover has occurred.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.Capacity</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 230000)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.ha.HARegionQueueAttributes#BLOCKING_QUEUE_CAPACITY</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DEBUG_EXPIRATION</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.ExpirationScheduler#DEBUG</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DEFAULT_MAX_OPLOG_SIZE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is 1024 * 1024 * 1024)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.DiskWriteAttributesImpl#DEFAULT_MAX_OPLOG_SIZE</code>.
+<p>
+<pre>
+  default max in bytes
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DLockService.automateFreeResources</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See com.gemstone.gemfire.distributed.internal.locks.DLockService.DLockService(String, DistributedSystem, boolean, boolean, boolean).
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DLockService.LockGrantorId.rolloverMargin</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 10000)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.locks.LockGrantorId#ROLLOVER_MARGIN</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DLockService.debug.disallowLockRequestLoop</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#DEBUG_LOCK_REQUEST_LOOP</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DLockService.debug.disallowLockRequestLoopCount</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 20)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#DEBUG_LOCK_REQUEST_LOOP_COUNT</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DLockService.debug.disallowNotHolder</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#DEBUG_DISALLOW_NOT_HOLDER</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DLockService.debug.enforceSafeExit</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#DEBUG_ENFORCE_SAFE_EXIT</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DLockService.debug.nonGrantorDestroyLoop</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#DEBUG_NONGRANTOR_DESTROY_LOOP</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DLockService.debug.nonGrantorDestroyLoopCount</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 20)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#DEBUG_NONGRANTOR_DESTROY_LOOP_COUNT</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DLockService.notGrantorSleep</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is 2000)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#NOT_GRANTOR_SLEEP</code>.
+<p>
+Units are in milliseconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DistributedLockService.startSerialNumber</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is Integer.MAX_VALUE - 10)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.locks.DLockService#START_SERIAL_NUMBER</code>.
+<p>
+<pre>
+  Specifies the starting serial number for the {@link #serialNumberSequencer}
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DO_EXPENSIVE_VALIDATIONS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.LocalRegion#DO_EXPENSIVE_VALIDATIONS</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DistributionAdvisor.startVersionNumber</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is Integer.MAX_VALUE - 10)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionAdvisor#START_VERSION_NUMBER</code>.
+<p>
+<pre>
+   Specifies the starting version number for the {@link 
+   #profileVersionSequencer}.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.EXPIRY_THREADS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 0)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.ExpiryTask class init</code>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.EXPIRY_UNITS_MS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.LocalRegion#EXPIRY_UNITS_MS</code>.
+<p>
+<pre>
+   Used by unit tests to set expiry to milliseconds instead of the default
+   seconds. Used in ExpiryTask.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.FD_TIMEOUT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is 0)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
+<p>
+If <code>gemfire.useFD</code> is true or this property's value is non-zero,
+the <code>FD</code> protocol is inserted on the JGroups stack.
+<p>
+Furthermore, the <code>MEMBER_TIMEOUT</code> string is substituted with this
+value in the JGroups default config, which in turn sets the
+<code>timeout</code> property in the <code>VERIFY_SUSPECT</code> protocol,
+which otherwise defaults to 2000 milliseconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.IDLE_THREAD_TIMEOUT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 15000)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.PooledExecutorWithDMStats#PooledExecutorWithDMStats(BlockingQueue, int, PoolStatHelper, ThreadFactory)</code>.
+<p>
+Units are in milliseconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.isDedicatedServer</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.CacheServerLauncher.#isDedicatedCacheServer</code>
+<p>
+Tell admin API whether the member is a dedicated cache server
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.memoryEventTolerance</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default for Sun/Oracle is 1 and for others 5)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.control.InternalResourceManager.#MEMORY_EVENT_TOLERANCE</code>
+<p>
+Number of memory events that ResourceManager will tolerate before throwing a LME. Useful with JVM 1.7
+</dd>
+
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.MAX_PENDING_CANCELS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 10000)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.ExpirationScheduler#MAX_PENDING_CANCELS</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.MIN_BUCKET_SIZE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 1)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.partitioned.SizedBasedLoadProbe.#MIN_BUCKET_SIZE</code>
+<p>
+Allows setting the minimum bucket size to be used during rebalance
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.DISABLE_MOVE_PRIMARIES_ON_STARTUP</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+If true then pr primary buckets will not be balanced when a new member is started.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.MessageTimeToLive</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 180)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.ha.HARegionQueue#REGION_ENTRY_EXPIRY_TIME</code>.
+<p>
+<pre>
+   Constant used to set region entry expiry time using system property.
+</pre>
+<p>
+Units are in seconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.ON_DISCONNECT_CLEAR_PDXTYPEIDS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.cache.client.internal.PoolImpl</code>
+<p>
+Clear pdxType ids when client disconnects from servers
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.PRDebug</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.admin.GemFireMonitorService#processGetValCommand</code>.
+<p>
+See <code>com.gemstone.gemfire.admin.remote.RemoteCacheInfo.RemoteCacheInfo(GemFireCache)</code>.
+<p>
+See <code>com.gemstone.gemfire.admin.remote.RootRegionResponse#create(DistributionManager, InternalDistributedMember)</code>.
+<p>
+See <code>com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore#createBucketRegion(int)</code>.
+<p>
+See <code>com.gemstone.gemfire.internal.cache.PartitionedRegionHelper#getPRConfigRegion(Region, Cache)</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.PREFER_DESERIALIZED</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.CachedDeserializableFactory#PREFER_DESERIALIZED</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.PREFER_SERIALIZED</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<P>
+See <code>com.gemstone.gemfire.internal.cache.CachedDeserializableFactory.#PREFER_DESERIALIZED</code>
+<p>
+Enable storing the values in serialized form
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.PRSanityCheckDisabled</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.partitioned.PRSanityCheckMessage#schedule</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.PRSanityCheckInterval</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 5000)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.partitioned.PRSanityCheckMessage#schedule</code>.
+<p>
+Units are in milliseconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.PartitionedRegionRandomSeed</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (defaults to NanoTimer.getTime())
+<p>
+See <code>com.gemstone.gemfire.internal.cache.PartitionedRegion#rand</code>.
+<p>
+Seed for the random number generator in this class.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.Query.COMPILED_QUERY_CLEAR_TIME</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (defaults to 10 * 60 * 1000)
+<p>
+See <code>com.gemstone.gemfire.cache.query.internal.DefaultQuery.#COMPILED_QUERY_CLEAR_TIME</code>
+<p>
+Frequency of clean up compiled queries
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.Query.VERBOSE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<p>
+See <code>com.gemstone.gemfire.cache.query.internal.DefaultQuery.#QUERY_VERBOSE</code><em>Boolean</em> (defaults to false)
+<p>
+Enable verbose logging in the query execution
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.QueryService.QueryHeterogeneousObjects</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (defaults to true)
+<p>
+See <code>com.gemstone.gemfire.cache.query.internal.DefaultQueryService.#QUERY_HETEROGENEOUS_OBJECTS</code>
+<p>
+Allow query on region with heterogeneous objects
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.randomizeOnMember</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (defaults to false)
+<p>
+See <code>com.gemstone.gemfire.cache.execute.internal.FunctionServiceManager.#RANDOM_onMember</code>
+<p>
+When set, onMember execution will be executed on a random member.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.RegionAdvisor.volunteeringThreadCount</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 1)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.partitioned.RegionAdvisor#VOLUNTERING_THREAD_COUNT</code>.
+<p>
+<pre>
+  Number of threads allowed to concurrently volunteer for bucket primary.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.VIEW_BUNDLING_WAIT_TIME</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 150)
+<p>
+See <code>com.gemstone.org.jgroups.protocols.pbcast.GMS#BUNDLE_WAITTIME</code>.
+<p>
+<pre>
+     GemStoneAddition - amount of time to wait for additional join/leave
+     requests before processing.  Set gemfire.VIEW_BUNDLING_WAIT_TIME to
+     the number of milliseconds.  Defaults to 150ms.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.VM_OWNERSHIP_WAIT_TIME</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is Long.MAX_VALUE)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.PartitionedRegion#VM_OWNERSHIP_WAIT_TIME</code>
+<p>
+<pre>
+  Time to wait for for acquiring distributed lock ownership
+</pre>
+<p>
+Time is specified in milliseconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.asynchronous-gateway-distribution-enabled</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GatewayHubImpl#USE_ASYNCHRONOUS_DISTRIBUTION</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.bridge.disableShufflingOfEndpoints</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.ConnectionProxyImpl#disableShufflingOfEndpoints</code>.
+<p>
+<pre>
+   A debug flag, which can be toggled by tests to disable/enable shuffling of
+   the endpoints list
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.bridge.suppressIOExceptionLogging</strong></dt>
+<dd>
+<em>Public:</em> jpmc-jets
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>ConnectionProxyImpl</code>,
+<code>ServerConnection</code>, and
+<code>ServerMonitor</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.BridgeServer.FORCE_LOAD_UPDATE_FREQUENCY</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> 10
+<p>
+See <code>com.gemstone.gemfire.internal.cache.BridgeServerImpl.#FORCE_LOAD_UPDATE_FREQUENCY</code>
+<p>
+How often to force a BridgeServer load message to be sent
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.BucketRegion.alwaysFireLocalListeners</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> default is false
+<p>
+See <code>com.gemstone.gemfire.internal.cache.BucketRegion.#FORCE_LOCAL_LISTENERS_INVOCATION</code>
+<p>
+Enable invocation of listeners in both primary and secondary buckets
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.Cache.MAX_QUERY_EXECUTION_TIME</strong></dt>
+<dd>
+<em>Public:</em> true
+<p>
+<em>Integer</em> default is -1
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GemFireCacheImpl.#MAX_QUERY_EXECUTION_TIME</code>
+<p>
+Limit the max query execution time (ms)
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.CLIENT_FUNCTION_TIMEOUT</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> default is 0
+<p>
+See <code>com.gemstone.gemfire.cache.client.internal.ConnectioImpl.#CLIENT_FUNCTION_TIMEOUT</code>
+<p>
+Timeout to set for client function execution
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.clientMonitorLogFile</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em> (default is unset, to use System.out)
+<p>
+See <code>com.gemstone.gemfire.admin.GemFireClientAdminTool#logFileName</code>.
+<p>
+This is a file name.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.clientSocketFactory</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em>
+<p>
+See <code>com.gemstone.gemfire.internal.SocketCreator</code>
+<p>
+Non-standard Socket creator
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.cq.EXECUTE_QUERY_DURING_INIT</strong></dt>
+<dd>
+<em>Public:</em> true
+<p>
+<em>Boolean</em> true
+<p>
+See <code>com.gemstone.gemfire.cache.query.internal.CqService.#EXECUTE_QUERY_DURING_INIT</code>
+<p>
+When set to false, avoid query execution during CQ when initial results are not required
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.debug</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.SharedLibrary#getName</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.debug-frag2</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.org.jgroups.protocols.FRAG2#DEBUG_FRAG2</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.disableAccessTimeUpdateOnPut</strong></dt>
+<dd>
+<em>Public:</em> true
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.AbstractRegionEntry.#DISABLE_ACCESS_TIME_UPDATE_ON_PUT</code>
+<p>
+Disable access time updates on put event
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.disable-event-old-value</strong></dt>
+<dd>
+<em>Public:</em> jpmc-cbb
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.EntryEventImpl#EVENT_OLD_VALUE</code>.
+<p>
+Discussing EVENT_OLD_VALUE = !Boolean.getBoolean():
+<pre>
+   If true (the default) then preserve old values in events.
+   If false then mark non-null values as being NOT_AVAILABLE.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.disablePartitionedRegionBucketAck</strong></dt>
+<dd>
+<em>Public:</em> true
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.PartitionedRegion.#DISABLE_SECONDARY_BUCKET_ACK</code>
+<p>
+Enable no-ack replication in bucket regions
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.disable-udp-direct-ack</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.DistributedCacheOperation#UDP_DISABLE_DIRECT_ACK</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.disableNotificationWarnings</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy#LOG_DROPPED_MSGS</code>.
+<p>
+Discussing LOG_DROPPED_MSGS = !Boolean.getBoolean():
+<pre>
+   Defaults to true; meaning do some logging of dropped client notification
+   messages. Set the system property to true to cause dropped messages to NOT
+   be logged.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.disableShutdownHook</strong></dt>
+<dd>
+<em>Public:</em> true
+<p>
+<em>Boolean</em> (default is false)
+<p>
+If true then the shutdown hooks of the DistributedSystem, Locator, and Agent
+are not run on shutdown. This was added for bug 38407.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.disallowMcastDefaults</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+Used by unit tests to make sure the GemFire mcast-port has been configured
+to a non-default value.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.disk.recoverValues</strong></dt>
+<dd>
+<em>Public:</em> jpmc-cbb
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.SimpleDiskRegion</code>.
+<p>
+<pre>
+  Whether to get the values from disk to memory on recovery
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.EXPIRATIONS_CAUSE_CONFLICTS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.LocalRegion.#EXPIRATIONS_CAUSE_CONFLICTS</code>
+<p>
+Allow expirations to be done by multiple threads, avoiding the 
+pendingExpires list (set in conjunction with gemfire.EXPIRY_THREADS)
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.enableCpuTime</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+This property causes the per thread stats to also measure cpu time.
+This property is ignored unless "gemfire.enableThreadStats" is also set to true.
+See java.lang.management.ThreadMXBean.setThreadCpuTimeEnabled(boolean)
+for more information.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.enableContentionTime</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+This property causes the per thread stats to also measure contention.
+This property is ignored unless "gemfire.enableThreadStats" is also set to true.
+See java.lang.management.ThreadMXBean.setThreadContentionMonitoringEnabled(boolean)
+for more information.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.enableThreadStats</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+This property causes the per thread stats to be collected.
+See java.lang.management.ThreadMXBean
+for more information.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.fast-member-timeout</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 1000)
+<p>
+See <code>com.gemstone.org.jgroups.protocols.VERIFY_SUSPECT#suspect</code>.
+<p>
+<pre>
+  artificially age the entry for faster processing
+</pre>
+<p>
+Units are in milliseconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.gateway-conserve-sockets-allowed</strong></dt>
+<dd>
+<em>Public:</em> yes
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.GatewayHubImpl#ALLOW_CONSERVE_SOCKETS</code>.
+<p>
+<pre>
+   A boolean that defines whether the value of the conserve-sockets property
+   in the gemfire.properties file is preserved. By default, the value in
+   gemfire.properties is overridden so that queue ordering is preserved. If
+   ALLOW_CONSERVE_SOCKETS=true, then the conserve-sockets property is
+   used and queue ordering may not be preserved. This property can be set
+   using the System property called 'gemfire.gateway-conserve-sockets-allowed'.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.gateway-queue-no-ack</strong></dt>
+<dd>
+<em>Public:</em> yes
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.SingleWriteSingleReadRegionQueue#NO_ACK</code>.
+<p>
+<pre>
+   Whether the <code>Gateway</code> queue should be no-ack instead of ack.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.GatewayReceiver.ApplyRestries</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+If true causes the GatewayReceiver will apply batches it has already received.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.gateway.ApplyRetries</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection#APPLY_RETRIES</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.GetInitialImage.CHUNK_PERMITS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 16)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.InitialImageOperation.#CHUNK_PERMITS</code>
+<p>
+Allowed number of in-flight initial image chunks. This property controls how many requests for GII chunks can be handled simultaneously.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.GetInitialImage.MAX_PARALLEL_GIIS</strong></dt>
+<dd>
+<em>Public:</em> true
+<p>
+<em>Integer</em> (default is 5)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.InitialImageOperation.#MAX_PARALLEL_GIIS </code>
+<p>
+Allowed number of GIIs in parallel. This property controls how many regions can do GII simultaneously. Each replicated region and partitioned region bucket counts against this number.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.haltOnAssertFailure</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.Assert#debug</code>.
+<p>
+Causes VM to hang on assertion failure (to allow a debugger to be attached)
+instead of exiting the process.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.jg-can_bind_to_mcast_addr</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+On OSes that support it bind to the mcast_addr to prevent traffic on 
+different addresses, but on the same port.
+Setting to true can avoid cross address chatter.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.launcher.registerSignalHandlers</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+Causes the code used by gfsh to launch a server or locator to install
+signal handlers using sun.misc.Signal.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.lightLocators</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.gui.RemoteCommandManager#getLocatorStart</code>.
+<p>
+Adds the "-lightweight" argument when creating the locator.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.loadLibrary.debug</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.PureJavaMode#debug</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.locatorXms</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em>
+<p>
+See <code>com.gemstone.gemfire.internal.gui.RemoteCommandManager#getLocatorStart</code>.
+<p>
+See <code>com.gemstone.gemfire.internal.gui.StartStopManager#startLocalLocator</code>.
+<p>
+A JVM property, esp. "-Xms150m".
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.locatorXmx</strong></dt>
+<em>String</em>
+<p>
+<dd>
+<em>Public:</em> false
+<p>
+See <code>com.gemstone.gemfire.internal.gui.RemoteCommandManager#getLocatorStart</code>.
+<p>
+See <code>com.gemstone.gemfire.internal.gui.StartStopManager#startLocalLocator</code>.
+<p>
+A JVM property, esp. "-Xmx400m"
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.locators</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em>
+<p>
+See the constructor for <code>com.gemstone.gemfire.distributed.internal.InternalLocator</code>.
+<p>
+If this property is not found in gemfire.properties, the system property
+of the same name is used.
+</dd>
+
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.lru.maxSearchEntries</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is -1)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.lru.NewLRUClockHand#maxEntries</code>.
+<p>
+This is the maximum number of "good enough" entries to pass over for eviction
+before settling on the next acceptable entry.  This prevents excessive cache
+processing to find a candidate for eviction.
+<p>
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.order-pr-gets</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.partitioned.GetMessage#ORDER_PR_GETS</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.partitionedRegionRetryTimeout</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 60 * 60 * 1000)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.PartitionedRegion#retryTimeout</code>
+<p>
+<pre>
+  The maximum milliseconds for retrying operations
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.PRQueryProcessor.numThreads</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> 1+ (default is 2)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.PRQueryProcessor#executeQuery</code>
+<p>
+<pre>
+  The number of concurrent threads to use within a single VM to execute queries
+  on a Partitioned Region. If set to 1 (or less) then queries are run
+  sequentially with a single thread.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.pureJavaMode</strong></dt>
+<dd>
+<em>Public:</em> true
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.PureJavaMode class init</code>.
+<p>
+Force use of "pure" Java mode (native libraries will not be loaded)
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.SPECIAL_DURABLE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.cache.client.internal.PoolImpl.#SPECIAL_DURABLE</code>
+<p>
+Makes multiple durable subscriptions from same client unique. on java client ensures only a single server proxy is created but will limit the client to a single active client pool at a time
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.statsDisabled</strong></dt>
+<dd>
+<em>Public:</em> true
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.InternalDistributedSystem#statsDisabled</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.statusPollingDelay</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is 5000)
+<p>
+See <code>com.gemstone.gemfire.admin.GemFireClientAdminTool#_statusPollingDelay</code>.
+<p>
+Units are in milliseconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.syncWrites</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em>
+<p>
+See <code>com.gemstone.gemfire.internal.cache.Oplog#SYNC_WRITES</code>.
+<p>
+<pre>
+   This system property instructs that writes be synchronously written to disk
+   and not to file system. (Use rwd instead of rw - RandomAccessFile property)
+</pre>
+<p>
+TBA
+</dd>
+	
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.TcpServer.MAX_POOL_SIZE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em>
+<p>
+<pre>
+   This property limits the number of threads that the locator will
+	use for processing gossip messages and server location
+	requests.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.useFD</strong></dt>
+<dd>
+<em>Public:</em> true
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.validateMessageSize</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionConfig#VALIDATE</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfire.validateMessageSizeCeiling</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 8 * 1024 * 1024)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.DistributionConfig#VALIDATE_CEILING</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemfirePropertyFile</strong></dt>
+<dd>
+<em>Public:</em> yes
+<p>
+<em>String</em>
+<p>
+See <code>com.gemstone.gemfire.distributed.DistributedSystem#PROPERTY_FILE</code>.
+<p>
+<pre>
+     The <code>PROPERTY_FILE</code> is the name of the
+     property file that the connect method will check for when
+     it looks for a property file.
+     The file will be searched for, in order, in the following directories:
+     <ol>
+     <li> the current directory
+     <li> the home directory
+     <li> the class path
+     </ol>
+     Only the first file found will be used.
+     <p>
+     The default value of PROPERTY_FILE is
+     <code>"gemfire.properties"</code>.  However if the
+     "gemfirePropertyFile" system property is set then its value is
+     the value of PROPERTY_FILE. If this value is a relative file
+     system path then the above search is done.  If it is an absolute
+     file system path then that file must exist; no search for it is
+     done.
+     @since 5.0
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gemstone.MAX_BUCKET_GRAB_ATTEMPTS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 20)
+<p>
+See <code>com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore.BucketRecoverer#grabBuckets</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gfAgentDebug</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em>
+<p>
+See <code>com.gemstone.gemfire.admin.jmx.internal.AgentImpl#checkDebug</code>.
+<p>
+<pre>
+  Enables mx4j tracing if Agent debugging is enabled.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gfAgentPropertyFile</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em>
+<p>
+See <code>com.gemstone.gemfire.admin.jmx.internal.AgentConfigImpl#retrievePropertyFile</code>.
+<p>
+<pre>
+   The <code>propertyFile</code> is the name of the property file that will 
+   be loaded on startup of the Agent.
+   <p>
+   The file will be searched for, in order, in the following directories:
+   <ol>
+   <li> the current directory
+   <li> the home directory
+   <li> the class path
+   </ol>
+   Only the first file found will be used.
+   <p>
+   The default value of propertyFile is <code>"agent.properties"</code>. However 
+   if the "gfAgentPropertyFile" system property is set then its value is the 
+   value of propertyFile. If this value is a relative file system path then 
+   the above search is done. If its an absolute file system path then that 
+   file must exist; no search for it is done.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gfc.propertyfile.init</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em>
+<p>
+See <code>com.gemstone.gemfire.internal.gui.Service#initProps()</code>.
+<p>
+This is name of a <code>Properties</code> file read at startup.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>gfc.propertyfile.onclose</strong></dt>
+<em>String</em>
+<p>
+See <code>com.gemstone.gemfire.internal.gui.Service#saveProps</code>.
+<dd>
+<em>Public:</em> false
+<p>
+This is the name of a <code>Properties</code> file to which some properties
+are saved a close.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>ignore.bind.address</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.org.jgroups.protocols.MPING#setProperties(Properties)</code>.
+<p>
+See <code>com.gemstone.org.jgroups.util.Util#isBindAddressPropertyIgnored</code>.
+<p>
+If <code>true</code>, the value of the
+<code>bind.address</code> property is ignored.
+<p>
+This is used in MPING, FD_SOCK, and TP.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>install</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.gui.NavigationPane#NavigationPane()</code>.
+<p>
+See <code>com.gemstone.gemfire.internal.gui.Service#Service()</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>java.net.preferIPv6Addresses</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.org.jgroups.util.Util#getFirstNonLoopbackAddress</code>.
+<p>
+TBA
+<p>
+Is this a standard Java property?
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>jboss.partition.udpGroup</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em> (See <code>InetAddress.getByName</code>)
+<p>
+See <code>com.gemstone.org.jgroups.protocols.UDP#setProperties</code>.
+<p>
+<pre>
+  The multicast address used for sending and receiving packets 
+</pre>
+If you manage to get here without setting mcast_addr_name, the default
+is 228.8.8.8.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>jboss.partition.udpPort</strong></dt>
+<em>Integer</em>
+<p>
+See <code>com.gemstone.org.jgroups.protocols.UDP#setProperties</code>.
+<dd>
+<em>Public:</em> false
+<p>
+<p>
+<pre>
+  The multicast port used for sending and receiving packets
+</pre>
+<p>
+If you manage to get here without setting mcast_port, the default value is 7600.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>jta.VERBOSE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em>
+<p>
+See <code>com.gemstone.gemfire.internal.jta.GlobalTransaction#VERBOSE</code>.
+<p>
+See <code>com.gemstone.gemfire.internal.jta.TransactionManagerImpl#VERBOSE</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>jta.defaultTimeout</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 600)
+<p>
+See <code>com.gemstone.gemfire.internal.jta.TransactionManagerImpl#DEFAULT_TRANSACTION_TIMEOUT</code>.
+<p>
+Units are in seconds.
+<p>
+TBA Is this a standard JTA property?
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>local_addr.timeout</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is 30000)
+<p>
+See <code>com.gemstone.org.jgroups.JChannel#LOCAL_ADDR_TIMEOUT</code>.
+<p>
+Units are in milliseconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>mergelogs.TRIM_TIMESTAMPS</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.LogFileParser#TRIM_TIMESTAMPS</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>org.apache.commons.logging.log</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em> (default is org.apache.commons.logging.impl.SimpleLog)
+<p>
+See <code>com.gemstone.gemfire.admin.jmx.internal.AgentImpl class init</code>.
+<p>
+This is the name of a class.
+<p>
+This property is also used by commons-logging.jar (and
+discussed below).  It is called out here
+because of its explicit use in the JMX Agent.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>osStatsDisabled</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.GemFireStatSampler#osStatsDisabled</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.DEBUG</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.tcp.TCPConduit#DEBUG</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.DEBUG_FAIL_FIRST</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.org.jgroups.protocols.pbcast.ClientGmsImpl#join(Address)</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.VERBOSE</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.tcp.TCPConduit#QUIET</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.ackSenderThread</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.org.jgroups.protocols.UNICAST#start</code>.
+<p>
+Creates an <code>AckSender</code> thread.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.backlog</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 50)
+<p>
+See <code>com.gemstone.gemfire.internal.tcp.TCPConduit#BACKLOG</code>.
+<p>
+<pre>
+  backlog is the "accept" backlog configuration parameter all
+  conduits server socket */
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.batchBufferSize</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 1024 * 1024)
+<p>
+See <code>com.gemstone.gemfire.internal.tcp.Connection#BATCH_BUFFER_SIZE</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.batchFlushTime</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> in JGroups, <em>Integer</em> in Connection.
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code> (default is 20).
+<p>
+See <code>com.gemstone.gemfire.internal.tcp.Connection#BATCH_FLUSH_MS</code>.
+(Default is 50)
+<p>
+Replaces <code>BUNDLING_TIMEOUT</code> in the JGroups config template.
+This in turn sets the <code>max_bundle_timeout</code> property in the
+<code>TP</code> JGroups protocol:
+<p>
+<pre>
+    Max number of milliseconds until queued messages are sent. Messages are
+    sent when max_bundle_size or
+    max_bundle_timeout has been exceeded (whichever occurs faster)
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.batchSends</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.internal.tcp.Connection#BATCH_SENDS</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.debugConnect</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.defaultConcurrencyLevel</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is the number of processors on current machine,
+but no less than 2)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.direct.DirectChannel#DEFAULT_CONCURRENCY_LEVEL</code>.
+<p>
+<pre>
+   Return how many concurrent operations should be allowed by default.
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.defaultLogLevel</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>String</em> (one of "config", "fine", "finer", or "finest")
+<p>
+See <code>com.gemstone.gemfire.internal.tcp.TCPConduit#getLogger</code>.
+<p>
+Used only if this class needs to create a logger.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.directAckTimeout</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 15000)
+<p>
+See <code>com.gemstone.org.jgroups.protocols.DirAck#DIRACK_TIMEOUT</code>.
+<p>
+<pre>
+  warning timer period for log message while waiting for acks
+</pre>
+<p>
+Units are in milliseconds.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.disableBatching</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (default is false)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
+<p>
+If true, sets <code>ENABLE_BUNDLING</code> to false and
+<code>BUNDLING_TIMEOUT</code> to 30 in the JGroups config template; otherwise
+it sets <code>ENABLE_BUNDLING</code> to true and <code>BUNDLING_TIMEOUT</code>
+to <code>p2p.batchFlushTime</code> (30 if not set).
+<p>
+<code>ENABLE_BUNDLING</code> maps to the <code>enable_bundling</code> property
+in <code>UDP</code>, and <code>BUNDLING_TIMEOUT</code> maps to the 
+<code>max_bundle_timeout</code> property in <code>UDP</code>.
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.disableDirAckBypass</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (defaults to false)
+<p>
+See <code>com.gemstone.org.jgroups.protocols.DirAck#DIRACK_BYPASS</code>.
+<p>
+See <code>com.gemstone.org.jgroups.protocols.TP#dirackBypass</code>.
+<p>
+<pre>
+   set -Dp2p.disableDirAckBypass=true to disengage bypassing most of the stack
+   on outgoing messages
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.disableSocketWrite</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Boolean</em> (defaults to false)
+<p>
+See <code>com.gemstone.gemfire.internal.tcp.Connection#SOCKET_WRITE_DISABLED</code>.
+<p>
+<pre>
+  use to test message prep overhead (no socket write).
+  WARNING: turning this on completely disables distribution of batched sends
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.disconnectDelay</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 3000)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#destroyMember</code>.
+<p>
+TBA Workaround for bug 34010: small pause inserted before closing
+reader threads for a departed member.
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.discoveryProbes</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Integer</em> (default is 2)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
+<p>
+This substitutes the <code>NUM_PING_REQUESTS</code> field in the JGroups
+config template, which in turn sets the <code>num_ping_requests</code> property
+in the <code>Discovery</code> protocol.
+<p>
+<pre>
+Number of GET_MBRS_REQ messages to be sent (min=1), distributed over timeout ms
+</pre>
+<p>
+TBA
+</dd>
+
+<!-- -------------------------------------------------------  -->
+<dt><strong>p2p.discoveryTimeout</strong></dt>
+<dd>
+<em>Public:</em> false
+<p>
+<em>Long</em> (default is 1000)
+<p>
+See <code>com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager#createChannel</code>.
+<p>
+Sets the <code>DISCOVERY_TIMEOUT</code> field in the JGroups template, which
+in turn sets the <code>timeout</code> property in the <code>Discovery</

<TRUNCATED>


[14/54] [abbrv] incubator-geode git commit: GEODE-1049 Added wait criteria to get internalDistributedSystem instance.

Posted by je...@apache.org.
GEODE-1049 Added wait criteria to get internalDistributedSystem instance.

Test is looking for InternalDistributedSystem Instance, but it access before
it get initialize. Thus added waiting criteria for that.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/2e00d5d6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/2e00d5d6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/2e00d5d6

Branch: refs/heads/feature/GEODE-17-2
Commit: 2e00d5d61730c11a65d21189bd9b52c9ef058632
Parents: c5d8ea7
Author: Hitesh Khamesra <hk...@pivotal.io>
Authored: Fri Mar 11 17:18:18 2016 -0800
Committer: Hitesh Khamesra <hk...@pivotal.io>
Committed: Tue Mar 15 10:07:48 2016 -0700

----------------------------------------------------------------------
 .../gms/membership/GMSJoinLeaveTestHelper.java  | 24 ++++++++++++++++++++
 1 file changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2e00d5d6/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java
index 493c625..17409a4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveTestHelper.java
@@ -21,6 +21,8 @@ import com.gemstone.gemfire.distributed.internal.DM;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
 import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
 import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
 
 public class GMSJoinLeaveTestHelper {
 
@@ -43,6 +45,24 @@ public class GMSJoinLeaveTestHelper {
     throw new RuntimeException("This should not have happened. There should be a JoinLeave for every DS");
   }
 
+  private static void waitCriterion() {
+    WaitCriterion waitCriterion = new WaitCriterion() {
+      public boolean done() {
+        try {
+          return getIDS() != null;
+        } catch (Exception e) {
+          e.printStackTrace();
+        }
+        return false; // NOTREACHED
+      }
+
+      public String description() {
+        return "Distributed system is null";
+      }
+    };
+    Wait.waitForCriterion(waitCriterion, 10 * 1000, 200, true);
+  }
+  
   private static GMSJoinLeave getGmsJoinLeave() {
     InternalDistributedSystem distributedSystem = getInternalDistributedSystem();
     DM dm = distributedSystem.getDM();
@@ -56,6 +76,10 @@ public class GMSJoinLeaveTestHelper {
   }
 
   private static InternalDistributedSystem getInternalDistributedSystem() {
+    waitCriterion();
+    return getIDS();
+  }
+  private static InternalDistributedSystem getIDS() {
     InternalDistributedSystem distributedSystem = InternalDistributedSystem.getAnyInstance();
     if (distributedSystem == null) {
       Locator locator = Locator.getLocator();


[27/54] [abbrv] incubator-geode git commit: GEODE-1101: rename SimpleMemoryAllocator to MemoryAllocator

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternJUnitTest.java
deleted file mode 100644
index c61f2f4..0000000
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternJUnitTest.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.offheap;
-
-import static org.junit.Assert.*;
-import static com.googlecode.catchexception.CatchException.*;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-import junit.framework.TestCase;
-
-/**
- * Tests fill pattern validation for the {@link SimpleMemoryAllocatorImpl}.
- * @author rholmes
- */
-@Category(UnitTest.class)
-public class SimpleMemoryAllocatorFillPatternJUnitTest {
-  
-  /** Size of single test slab.*/
-  private static final int SLAB_SIZE = 1024 * 1024 * 50;
-  
-  /** Canned data for write operations. */
-  private static final byte[] WRITE_BYTES = new String("Some string data.").getBytes();
-  
-  /** Chunk size for basic huge allocation test. */
-  private static final int HUGE_CHUNK_SIZE = 1024 * 200;
-  
-  /** The number of chunks to allocate in order to force compaction. */
-  private static final int COMPACTION_CHUNKS = 3;
-  
-  /** Our slab size divided in three (with some padding for safety). */
-  private static final int COMPACTION_CHUNK_SIZE = (SLAB_SIZE / COMPACTION_CHUNKS) - 1024;
-  
-  /** This should force compaction when allocated. */
-  private static final int FORCE_COMPACTION_CHUNK_SIZE = COMPACTION_CHUNK_SIZE * 2;
-
-  /** Our test victim. */
-  private SimpleMemoryAllocatorImpl allocator = null;
-  
-  /** Our test victim's memory slab. */
-  private SlabImpl slab = null;
-
-  /**
-   * Enables fill validation and creates the test victim.
-   */
-  @Before
-  public void setUp() throws Exception {
-    System.setProperty("gemfire.validateOffHeapWithFill", "true");
-    this.slab = new SlabImpl(SLAB_SIZE);
-    this.allocator = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{this.slab});
-  }
-
-  /**
-   * Frees off heap memory.
-   */
-  @After
-  public void tearDown() throws Exception {
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-    System.clearProperty("gemfire.validateOffHeapWithFill");
-  }
-
-  /**
-   * This tests the fill pattern for a single tiny Chunk allocation.
-   * @throws Exception
-   */
-  @Test
-  public void testFillPatternBasicForTinyAllocations() throws Exception {
-    doFillPatternBasic(1024);
-  }
-  
-  /**
-   * This tests the fill pattern for a single huge Chunk allocation.
-   * @throws Exception
-   */
-  @Test
-  public void testFillPatternBasicForHugeAllocations() throws Exception {
-    doFillPatternBasic(HUGE_CHUNK_SIZE);
-  }
-  
-  private void doFillPatternBasic(final int chunkSize) {
-    /*
-     * Pull a chunk off the fragment.  This will have no fill because
-     * it is a "fresh" chunk.
-     */
-    OffHeapStoredObject chunk = (OffHeapStoredObject) this.allocator.allocate(chunkSize);
-
-    /*
-     * Chunk should have valid fill from initial fragment allocation.
-     */
-    chunk.validateFill();
-         
-    // "Dirty" the chunk so the release has something to fill over
-    chunk.writeDataBytes(OffHeapStoredObject.MIN_CHUNK_SIZE + 1, WRITE_BYTES);
-
-    // This should free the Chunk (ref count == 1)
-    chunk.release();
-
-    /*
-     * This chunk should have a fill because it was reused from the
-     * free list (assuming no fragmentation at this point...)
-     */
-    chunk = (OffHeapStoredObject) this.allocator.allocate(chunkSize);
-    
-    // Make sure we have a fill this time
-    chunk.validateFill();
-    
-    // Give the fill code something to write over during the release
-    chunk.writeDataBytes(OffHeapStoredObject.MIN_CHUNK_SIZE + 1, WRITE_BYTES);
-    chunk.release();
-
-    // Again, make sure the release implemented the fill
-    chunk.validateFill();
-
-    // "Dirty up" the free chunk
-    chunk.writeDataBytes(OffHeapStoredObject.MIN_CHUNK_SIZE + 1, WRITE_BYTES);
-    
-    catchException(chunk).validateFill();
-    assertTrue(caughtException() instanceof IllegalStateException);
-    assertEquals("Fill pattern violated for chunk " + chunk.getAddress() + " with size " + chunk.getSize(), caughtException().getMessage());
-    
-  }
-
-  /**
-   * This tests that fill validation is working properly on newly created fragments after
-   * a compaction.
-   * @throws Exception
-   */
-  @Test
-  public void testFillPatternAfterCompaction() throws Exception {
-    /*
-     * Stores our allocated memory.
-     */
-    OffHeapStoredObject[] allocatedChunks = new OffHeapStoredObject[COMPACTION_CHUNKS];
-    
-    /*
-     * Use up most of our memory
-     * Our memory looks like [      ][      ][      ]
-     */
-    for(int i =0;i < allocatedChunks.length;++i) {
-      allocatedChunks[i] = (OffHeapStoredObject) this.allocator.allocate(COMPACTION_CHUNK_SIZE);
-      allocatedChunks[i].validateFill();
-    }
-
-    /*
-     * Release some of our allocated chunks.
-     */
-    for(int i=0;i < 2;++i) {
-      allocatedChunks[i].release();
-      allocatedChunks[i].validateFill();      
-    }
-    
-    /*
-     * Now, allocate another chunk that is slightly larger than one of
-     * our initial chunks.  This should force a compaction causing our
-     * memory to look like [            ][      ].
-     */
-    OffHeapStoredObject slightlyLargerChunk = (OffHeapStoredObject) this.allocator.allocate(FORCE_COMPACTION_CHUNK_SIZE);
-    
-    /*
-     * Make sure the compacted memory has the fill validation.
-     */
-    slightlyLargerChunk.validateFill();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
deleted file mode 100644
index 135aba2..0000000
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
+++ /dev/null
@@ -1,594 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.offheap;
-
-import static org.junit.Assert.*;
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.contrib.java.lang.system.RestoreSystemProperties;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.OutOfOffHeapMemoryException;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.internal.logging.NullLogWriter;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class SimpleMemoryAllocatorJUnitTest {
-  @Rule
-  public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
-
-  private static int round(int multiple, int v) {
-    return ((v+multiple-1)/multiple)*multiple;
-  }
-  @Test
-  public void testNullGetAllocator() {
-    try {
-      SimpleMemoryAllocatorImpl.getAllocator();
-      fail("expected CacheClosedException");
-    } catch (CacheClosedException expected) {
-    }
-  }
-  @Test
-  public void testConstructor() {
-    try {
-      SimpleMemoryAllocatorImpl.createForUnitTest(null, null, null);
-      fail("expected IllegalArgumentException");
-    } catch (IllegalArgumentException expected) {
-    }
-  }
-  @Test
-  public void testCreate() {
-    System.setProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "false");
-    {
-      NullOutOfOffHeapMemoryListener listener = new NullOutOfOffHeapMemoryListener();
-      NullOffHeapMemoryStats stats = new NullOffHeapMemoryStats();
-      try {
-        SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats, 10, 950, 100, new SlabFactory() {
-     @Override
-     public Slab create(int size) {
-        throw new OutOfMemoryError("expected");
-     }
-    });
-      } catch (OutOfMemoryError expected) {
-      }
-      assertTrue(listener.isClosed());
-      assertTrue(stats.isClosed());
-     }
-    {
-      NullOutOfOffHeapMemoryListener listener = new NullOutOfOffHeapMemoryListener();
-      NullOffHeapMemoryStats stats = new NullOffHeapMemoryStats();
-      int MAX_SLAB_SIZE = 100;
-      try {
-        SlabFactory factory = new SlabFactory() {
-          private int createCount = 0;
-          @Override
-          public Slab create(int size) {
-            createCount++;
-            if (createCount == 1) {
-              return new SlabImpl(size);
-            } else {
-              throw new OutOfMemoryError("expected");
-            }
-          }
-        };
-        SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats, 10, 950, MAX_SLAB_SIZE, factory);
-      } catch (OutOfMemoryError expected) {
-      }
-      assertTrue(listener.isClosed());
-      assertTrue(stats.isClosed());
-    }
-    {
-      NullOutOfOffHeapMemoryListener listener = new NullOutOfOffHeapMemoryListener();
-      NullOffHeapMemoryStats stats = new NullOffHeapMemoryStats();
-      SlabFactory factory = new SlabFactory() {
-        @Override
-        public Slab create(int size) {
-          return new SlabImpl(size);
-        }
-      };
-      MemoryAllocator ma = 
-        SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats, 10, 950, 100, factory);
-      try {
-        assertFalse(listener.isClosed());
-        assertFalse(stats.isClosed());
-        ma.close();
-        assertTrue(listener.isClosed());
-        assertFalse(stats.isClosed());
-        listener = new NullOutOfOffHeapMemoryListener();
-        NullOffHeapMemoryStats stats2 = new NullOffHeapMemoryStats();
-        {
-          SlabImpl slab = new SlabImpl(1024);
-          try {
-            SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats2, new SlabImpl[]{slab});
-          } catch (IllegalStateException expected) {
-            assertTrue("unexpected message: " + expected.getMessage(), 
-                expected.getMessage().equals("attempted to reuse existing off-heap memory even though new off-heap memory was allocated"));
-          } finally {
-            slab.free();
-          }
-          assertFalse(stats.isClosed());
-          assertTrue(listener.isClosed());
-          assertTrue(stats2.isClosed());
-        }
-        listener = new NullOutOfOffHeapMemoryListener();
-        stats2 = new NullOffHeapMemoryStats();
-        MemoryAllocator ma2 = SimpleMemoryAllocatorImpl.createForUnitTest(listener, stats2, 10, 950, 100, factory);
-        assertSame(ma, ma2);
-        assertTrue(stats.isClosed());
-        assertFalse(listener.isClosed());
-        assertFalse(stats2.isClosed());
-        stats = stats2;
-        ma.close();
-        assertTrue(listener.isClosed());
-        assertFalse(stats.isClosed());
-      } finally {
-        SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-      }
-      assertTrue(stats.isClosed());
-    }
-  }
-  @Test
-  public void testBasics() {
-    int BATCH_SIZE = 1;
-    int TINY_MULTIPLE = FreeListManager.TINY_MULTIPLE;
-    int HUGE_MULTIPLE = FreeListManager.HUGE_MULTIPLE;
-    int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
-    int maxTiny = FreeListManager.MAX_TINY-perObjectOverhead;
-    int minHuge = maxTiny+1;
-    int TOTAL_MEM = (maxTiny+perObjectOverhead)*BATCH_SIZE /*+ (maxBig+perObjectOverhead)*BATCH_SIZE*/ + round(TINY_MULTIPLE, minHuge+1+perObjectOverhead)*BATCH_SIZE + (TINY_MULTIPLE+perObjectOverhead)*BATCH_SIZE /*+ (MIN_BIG_SIZE+perObjectOverhead)*BATCH_SIZE*/ + round(TINY_MULTIPLE, minHuge+perObjectOverhead+1);
-    SlabImpl slab = new SlabImpl(TOTAL_MEM);
-    try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      assertEquals(TOTAL_MEM, ma.getFreeMemory());
-      assertEquals(TOTAL_MEM, ma.freeList.getFreeFragmentMemory());
-      assertEquals(0, ma.freeList.getFreeTinyMemory());
-      assertEquals(0, ma.freeList.getFreeHugeMemory());
-      StoredObject tinymc = ma.allocate(maxTiny);
-      assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
-      assertEquals(round(TINY_MULTIPLE, maxTiny+perObjectOverhead)*(BATCH_SIZE-1), ma.freeList.getFreeTinyMemory());
-      StoredObject hugemc = ma.allocate(minHuge);
-      assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, minHuge+perObjectOverhead)/*-round(BIG_MULTIPLE, maxBig+perObjectOverhead)*/-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
-      long freeSlab = ma.freeList.getFreeFragmentMemory();
-      long oldFreeHugeMemory = ma.freeList.getFreeHugeMemory();
-      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*(BATCH_SIZE-1), oldFreeHugeMemory);
-      hugemc.release();
-      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead), ma.freeList.getFreeHugeMemory()-oldFreeHugeMemory);
-      assertEquals(TOTAL_MEM/*-round(BIG_MULTIPLE, maxBig+perObjectOverhead)*/-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
-      assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
-      long oldFreeTinyMemory = ma.freeList.getFreeTinyMemory();
-      tinymc.release();
-      assertEquals(round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.freeList.getFreeTinyMemory()-oldFreeTinyMemory);
-      assertEquals(TOTAL_MEM, ma.getFreeMemory());
-      // now lets reallocate from the free lists
-      tinymc = ma.allocate(maxTiny);
-      assertEquals(oldFreeTinyMemory, ma.freeList.getFreeTinyMemory());
-      assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
-      hugemc = ma.allocate(minHuge);
-      assertEquals(oldFreeHugeMemory, ma.freeList.getFreeHugeMemory());
-      assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, minHuge+perObjectOverhead)/*-round(BIG_MULTIPLE, maxBig+perObjectOverhead)*/-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
-      hugemc.release();
-      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead), ma.freeList.getFreeHugeMemory()-oldFreeHugeMemory);
-      assertEquals(TOTAL_MEM/*-round(BIG_MULTIPLE, maxBig+perObjectOverhead)*/-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
-      assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
-      tinymc.release();
-      assertEquals(round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.freeList.getFreeTinyMemory()-oldFreeTinyMemory);
-      assertEquals(TOTAL_MEM, ma.getFreeMemory());
-      // None of the reallocates should have come from the slab.
-      assertEquals(freeSlab, ma.freeList.getFreeFragmentMemory());
-      tinymc = ma.allocate(1);
-      assertEquals(round(TINY_MULTIPLE, 1+perObjectOverhead), tinymc.getSize());
-      assertEquals(freeSlab-(round(TINY_MULTIPLE, 1+perObjectOverhead)*BATCH_SIZE), ma.freeList.getFreeFragmentMemory());
-      freeSlab = ma.freeList.getFreeFragmentMemory();
-      tinymc.release();
-      assertEquals(round(TINY_MULTIPLE, maxTiny+perObjectOverhead)+(round(TINY_MULTIPLE, 1+perObjectOverhead)*BATCH_SIZE), ma.freeList.getFreeTinyMemory()-oldFreeTinyMemory);
-      
-      hugemc = ma.allocate(minHuge+1);
-      assertEquals(round(TINY_MULTIPLE, minHuge+1+perObjectOverhead), hugemc.getSize());
-      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*(BATCH_SIZE-1), ma.freeList.getFreeHugeMemory());
-      hugemc.release();
-      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*BATCH_SIZE, ma.freeList.getFreeHugeMemory());
-      hugemc = ma.allocate(minHuge);
-      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*(BATCH_SIZE-1), ma.freeList.getFreeHugeMemory());
-      if (BATCH_SIZE > 1) {
-        StoredObject hugemc2 = ma.allocate(minHuge);
-        assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*(BATCH_SIZE-2), ma.freeList.getFreeHugeMemory());
-        hugemc2.release();
-        assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*(BATCH_SIZE-1), ma.freeList.getFreeHugeMemory());
-      }
-      hugemc.release();
-      assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*BATCH_SIZE, ma.freeList.getFreeHugeMemory());
-      // now that we do compaction the following allocate works.
-      hugemc = ma.allocate(minHuge + HUGE_MULTIPLE + HUGE_MULTIPLE-1);
-    } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-    }
-  }
-  
-  @Test
-  public void testChunkCreateDirectByteBuffer() {
-    SlabImpl slab = new SlabImpl(1024*1024);
-    try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      ByteBuffer bb = ByteBuffer.allocate(1024);
-      for (int i=0; i < 1024; i++) {
-        bb.put((byte) i);
-      }
-      bb.position(0);
-      OffHeapStoredObject c = (OffHeapStoredObject) ma.allocateAndInitialize(bb.array(), false, false);
-      assertEquals(1024, c.getDataSize());
-      if (!Arrays.equals(bb.array(), c.getRawBytes())) {
-        fail("arrays are not equal. Expected " + Arrays.toString(bb.array()) + " but found: " + Arrays.toString(c.getRawBytes()));
-      }
-      ByteBuffer dbb = c.createDirectByteBuffer();
-      assertEquals(true, dbb.isDirect());
-      assertEquals(bb, dbb);
-    } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-    }
-  }
-  
-  @Test
-  public void testDebugLog() {
-    SimpleMemoryAllocatorImpl.debugLog("test debug log", false);
-    SimpleMemoryAllocatorImpl.debugLog("test debug log", true);
-  }
-  @Test
-  public void testGetLostChunks() {
-    SlabImpl slab = new SlabImpl(1024*1024);
-    try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      assertEquals(Collections.emptyList(), ma.getLostChunks());
-    } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-    }
-  }
-  @Test
-  public void testFindSlab() {
-    final int SLAB_SIZE = 1024*1024;
-    SlabImpl slab = new SlabImpl(SLAB_SIZE);
-    try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      assertEquals(0, ma.findSlab(slab.getMemoryAddress()));
-      assertEquals(0, ma.findSlab(slab.getMemoryAddress()+SLAB_SIZE-1));
-      try {
-        ma.findSlab(slab.getMemoryAddress()-1);
-        fail("expected IllegalStateException");
-      } catch (IllegalStateException expected) {
-      }
-      try {
-        ma.findSlab(slab.getMemoryAddress()+SLAB_SIZE);
-        fail("expected IllegalStateException");
-      } catch (IllegalStateException expected) {
-      }
-    } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-    }
-  }
-  @Test
-  public void testValidateAddressAndSize() {
-    final int SLAB_SIZE = 1024*1024;
-    SlabImpl slab = new SlabImpl(SLAB_SIZE);
-    try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      try {
-        SimpleMemoryAllocatorImpl.validateAddress(0L);
-        fail("expected IllegalStateException");
-      } catch (IllegalStateException expected) {
-        assertEquals("Unexpected exception message: " + expected.getMessage(), true, expected.getMessage().contains("addr was smaller than expected"));
-      }
-      try {
-        SimpleMemoryAllocatorImpl.validateAddress(1L);
-        fail("expected IllegalStateException");
-      } catch (IllegalStateException expected) {
-        assertEquals("Unexpected exception message: " + expected.getMessage(), true, expected.getMessage().contains("Valid addresses must be in one of the following ranges:"));
-      }
-      SimpleMemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress(), SLAB_SIZE, false);
-      SimpleMemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress(), SLAB_SIZE, true);
-      SimpleMemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress(), -1, true);
-      try {
-        SimpleMemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress()-1, SLAB_SIZE, true);
-        fail("expected IllegalStateException");
-      } catch (IllegalStateException expected) {
-        assertEquals("Unexpected exception message: " + expected.getMessage(), true, expected.getMessage().equals(" address 0x" + Long.toString(slab.getMemoryAddress()-1, 16) + " does not address the original slab memory"));
-      }
-      try {
-        SimpleMemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress(), SLAB_SIZE+1, true);
-        fail("expected IllegalStateException");
-      } catch (IllegalStateException expected) {
-        assertEquals("Unexpected exception message: " + expected.getMessage(), true, expected.getMessage().equals(" address 0x" + Long.toString(slab.getMemoryAddress()+SLAB_SIZE, 16) + " does not address the original slab memory"));
-      }
-    } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-    }
-  }
-  @Test
-  public void testMemoryInspection() {
-    final int SLAB_SIZE = 1024*1024;
-    SlabImpl slab = new SlabImpl(SLAB_SIZE);
-    try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      MemoryInspector inspector = ma.getMemoryInspector();
-      assertNotNull(inspector);
-      assertEquals(null, inspector.getFirstBlock());
-      assertEquals(Collections.emptyList(), inspector.getSnapshot());
-      assertEquals(Collections.emptyList(), inspector.getAllocatedBlocks());
-      assertEquals(null, inspector.getBlockAfter(null));
-      inspector.createSnapshot();
-      // call this twice for code coverage
-      inspector.createSnapshot();
-      try {
-        assertEquals(inspector.getAllBlocks(), inspector.getSnapshot());
-        MemoryBlock firstBlock = inspector.getFirstBlock();
-        assertNotNull(firstBlock);
-        assertEquals(1024*1024, firstBlock.getBlockSize());
-        assertEquals("N/A", firstBlock.getDataType());
-        assertEquals(-1, firstBlock.getFreeListId());
-        assertTrue(firstBlock.getAddress() > 0);
-        assertNull(firstBlock.getNextBlock());
-        assertEquals(0, firstBlock.getRefCount());
-        assertEquals(0, firstBlock.getSlabId());
-        assertEquals(MemoryBlock.State.UNUSED, firstBlock.getState());
-        assertFalse(firstBlock.isCompressed());
-        assertFalse(firstBlock.isSerialized());
-        assertEquals(null, inspector.getBlockAfter(firstBlock));
-      } finally {
-        inspector.clearSnapshot();
-      }
-    } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-    }
-  }
-
-  @Test
-  public void testClose() {
-    System.setProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "false");
-    SlabImpl slab = new SlabImpl(1024*1024);
-    boolean freeSlab = true;
-    SlabImpl[] slabs = new SlabImpl[]{slab};
-    try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), slabs);
-      ma.close();
-      ma.close();
-      System.setProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "true");
-      try {
-        ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), slabs);
-        ma.close();
-        freeSlab = false;
-        ma.close();
-      } finally {
-        System.clearProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY);
-      }
-    } finally {
-      if (freeSlab) {
-        SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-      }
-    }
-    
-  }
-  
-  @Test
-  public void testCompaction() {
-    final int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
-    final int BIG_ALLOC_SIZE = 150000;
-    final int SMALL_ALLOC_SIZE = BIG_ALLOC_SIZE/2;
-    final int TOTAL_MEM = BIG_ALLOC_SIZE;
-    SlabImpl slab = new SlabImpl(TOTAL_MEM);
-    try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      StoredObject bmc = ma.allocate(BIG_ALLOC_SIZE-perObjectOverhead);
-      try {
-        StoredObject smc = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
-        fail("Expected out of memory");
-      } catch (OutOfOffHeapMemoryException expected) {
-      }
-      bmc.release();
-      assertEquals(TOTAL_MEM, ma.freeList.getFreeMemory());
-      StoredObject smc1 = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
-      StoredObject smc2 = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
-      smc2.release();
-      assertEquals(TOTAL_MEM-SMALL_ALLOC_SIZE, ma.freeList.getFreeMemory());
-      try {
-        bmc = ma.allocate(BIG_ALLOC_SIZE-perObjectOverhead);
-        fail("Expected out of memory");
-      } catch (OutOfOffHeapMemoryException expected) {
-      }
-      smc1.release();
-      assertEquals(TOTAL_MEM, ma.freeList.getFreeMemory());
-      bmc = ma.allocate(BIG_ALLOC_SIZE-perObjectOverhead);
-      bmc.release();
-      assertEquals(TOTAL_MEM, ma.freeList.getFreeMemory());
-      ArrayList<StoredObject> mcs = new ArrayList<StoredObject>();
-      for (int i=0; i < BIG_ALLOC_SIZE/(8+perObjectOverhead); i++) {
-        mcs.add(ma.allocate(8));
-      }
-      checkMcs(mcs);
-      assertEquals(0, ma.freeList.getFreeMemory());
-      try {
-        ma.allocate(8);
-        fail("expected out of memory");
-      } catch (OutOfOffHeapMemoryException expected) {
-      }
-      mcs.remove(0).release(); // frees 8+perObjectOverhead
-      assertEquals(8+perObjectOverhead, ma.freeList.getFreeMemory());
-      mcs.remove(0).release(); // frees 8+perObjectOverhead
-      assertEquals((8+perObjectOverhead)*2, ma.freeList.getFreeMemory());
-      ma.allocate(16).release(); // allocates and frees 16+perObjectOverhead; still have perObjectOverhead
-      assertEquals((8+perObjectOverhead)*2, ma.freeList.getFreeMemory());
-      mcs.remove(0).release(); // frees 8+perObjectOverhead
-      assertEquals((8+perObjectOverhead)*3, ma.freeList.getFreeMemory());
-      mcs.remove(0).release(); // frees 8+perObjectOverhead
-      assertEquals((8+perObjectOverhead)*4, ma.freeList.getFreeMemory());
-      // At this point I should have 8*4 + perObjectOverhead*4 of free memory
-      ma.allocate(8*4+perObjectOverhead*3).release();
-      assertEquals((8+perObjectOverhead)*4, ma.freeList.getFreeMemory());
-      mcs.remove(0).release(); // frees 8+perObjectOverhead
-      assertEquals((8+perObjectOverhead)*5, ma.freeList.getFreeMemory());
-      // At this point I should have 8*5 + perObjectOverhead*5 of free memory
-      try {
-        ma.allocate((8*5+perObjectOverhead*4)+1);
-        fail("expected out of memory");
-      } catch (OutOfOffHeapMemoryException expected) {
-      }
-      mcs.remove(0).release(); // frees 8+perObjectOverhead
-      assertEquals((8+perObjectOverhead)*6, ma.freeList.getFreeMemory());
-      checkMcs(mcs);
-      // At this point I should have 8*6 + perObjectOverhead*6 of free memory
-      StoredObject mc24 = ma.allocate(24);
-      checkMcs(mcs);
-      assertEquals((8+perObjectOverhead)*6 - (24+perObjectOverhead), ma.freeList.getFreeMemory());
-      // At this point I should have 8*3 + perObjectOverhead*5 of free memory
-      StoredObject mc16 = ma.allocate(16);
-      checkMcs(mcs);
-      assertEquals((8+perObjectOverhead)*6 - (24+perObjectOverhead) - (16+perObjectOverhead), ma.freeList.getFreeMemory());
-      // At this point I should have 8*1 + perObjectOverhead*4 of free memory
-      mcs.add(ma.allocate(8));
-      checkMcs(mcs);
-      assertEquals((8+perObjectOverhead)*6 - (24+perObjectOverhead) - (16+perObjectOverhead) - (8+perObjectOverhead), ma.freeList.getFreeMemory());
-      // At this point I should have 8*0 + perObjectOverhead*3 of free memory
-      StoredObject mcDO = ma.allocate(perObjectOverhead*2);
-      checkMcs(mcs);
-      // At this point I should have 8*0 + perObjectOverhead*0 of free memory
-      assertEquals(0, ma.freeList.getFreeMemory());
-      try {
-        ma.allocate(1);
-        fail("expected out of memory");
-      } catch (OutOfOffHeapMemoryException expected) {
-      }
-      checkMcs(mcs);
-      assertEquals(0, ma.freeList.getFreeMemory());
-      mcDO.release();
-      assertEquals((perObjectOverhead*3), ma.freeList.getFreeMemory());
-      mcs.remove(mcs.size()-1).release();
-      assertEquals((perObjectOverhead*3)+(8+perObjectOverhead), ma.freeList.getFreeMemory());
-      mc16.release();
-      assertEquals((perObjectOverhead*3)+(8+perObjectOverhead)+(16+perObjectOverhead), ma.freeList.getFreeMemory());
-      mc24.release();
-      assertEquals((perObjectOverhead*3)+(8+perObjectOverhead)+(16+perObjectOverhead)+(24+perObjectOverhead), ma.freeList.getFreeMemory());
-      
-      long freeMem = ma.freeList.getFreeMemory();
-      for (StoredObject mc: mcs) {
-        mc.release();
-        assertEquals(freeMem+(8+perObjectOverhead), ma.freeList.getFreeMemory());
-        freeMem += (8+perObjectOverhead);
-      }
-      mcs.clear();
-      assertEquals(TOTAL_MEM, ma.freeList.getFreeMemory());
-      bmc = ma.allocate(BIG_ALLOC_SIZE-perObjectOverhead);
-      bmc.release();
-    } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-    }
-  }
-  
-  long expectedMemoryUsage;
-  boolean memoryUsageEventReceived;
-  @Test
-  public void testUsageEventListener() {
-    final int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
-    final int SMALL_ALLOC_SIZE = 1000;
-    SlabImpl slab = new SlabImpl(3000);
-    try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      MemoryUsageListener listener = new MemoryUsageListener() {
-        @Override
-        public void updateMemoryUsed(final long bytesUsed) {
-          SimpleMemoryAllocatorJUnitTest.this.memoryUsageEventReceived = true;
-          assertEquals(SimpleMemoryAllocatorJUnitTest.this.expectedMemoryUsage, bytesUsed);
-        }
-      };
-      ma.addMemoryUsageListener(listener);
-      
-      this.expectedMemoryUsage = SMALL_ALLOC_SIZE;
-      this.memoryUsageEventReceived = false;
-      StoredObject smc = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
-      assertEquals(true, this.memoryUsageEventReceived);
-      
-      this.expectedMemoryUsage = SMALL_ALLOC_SIZE * 2;
-      this.memoryUsageEventReceived = false;
-      smc = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
-      assertEquals(true, this.memoryUsageEventReceived);
-      
-      MemoryUsageListener unaddedListener = new MemoryUsageListener() {
-        @Override
-        public void updateMemoryUsed(final long bytesUsed) {
-          throw new IllegalStateException("Should never be called");
-        }
-      };
-      ma.removeMemoryUsageListener(unaddedListener);
-      
-      ma.removeMemoryUsageListener(listener);
-      
-      ma.removeMemoryUsageListener(unaddedListener);
-
-      this.expectedMemoryUsage = SMALL_ALLOC_SIZE * 2;
-      this.memoryUsageEventReceived = false;
-      smc = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
-      assertEquals(false, this.memoryUsageEventReceived);
-      
-    } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-    }
-  }
-  private void checkMcs(ArrayList<StoredObject> mcs) {
-    for (StoredObject mc: mcs) {
-      assertEquals(8+8, mc.getSize());
-    }
-  }
-  
-  @Test
-  public void testOutOfOffHeapMemory() {
-    final int perObjectOverhead = OffHeapStoredObject.HEADER_SIZE;
-    final int BIG_ALLOC_SIZE = 150000;
-    final int SMALL_ALLOC_SIZE = BIG_ALLOC_SIZE/2;
-    final int TOTAL_MEM = BIG_ALLOC_SIZE;
-    final SlabImpl slab = new SlabImpl(TOTAL_MEM);
-    final AtomicReference<OutOfOffHeapMemoryException> ooom = new AtomicReference<OutOfOffHeapMemoryException>();
-    final OutOfOffHeapMemoryListener oooml = new OutOfOffHeapMemoryListener() {
-      @Override
-      public void outOfOffHeapMemory(OutOfOffHeapMemoryException cause) {
-        ooom.set(cause);
-      }
-      @Override
-      public void close() {
-      }
-    };
-    try {
-      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.createForUnitTest(oooml, new NullOffHeapMemoryStats(), new SlabImpl[]{slab});
-      // make a big allocation
-      StoredObject bmc = ma.allocate(BIG_ALLOC_SIZE-perObjectOverhead);
-      assertNull(ooom.get());
-      // drive the ma to ooom with small allocations
-      try {
-        StoredObject smc = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead);
-        fail("Expected out of memory");
-      } catch (OutOfOffHeapMemoryException expected) {
-      }
-      assertNotNull(ooom.get());
-      assertTrue(ooom.get().getMessage().contains("Out of off-heap memory. Could not allocate size of "));
-    } finally {
-      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java
index d444865..681bec0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TinyMemoryBlockJUnitTest.java
@@ -39,7 +39,7 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class TinyMemoryBlockJUnitTest {
 
-  private SimpleMemoryAllocatorImpl ma;
+  private MemoryAllocatorImpl ma;
   private OutOfOffHeapMemoryListener ooohml;
   private OffHeapMemoryStats stats;
 
@@ -50,7 +50,7 @@ public class TinyMemoryBlockJUnitTest {
   };
 
   private static class TestableFreeListManager extends FreeListManager {
-    TestableFreeListManager(SimpleMemoryAllocatorImpl ma, final Slab[] slabs) {
+    TestableFreeListManager(MemoryAllocatorImpl ma, final Slab[] slabs) {
       super (ma, slabs);
     }
   }
@@ -73,12 +73,12 @@ public class TinyMemoryBlockJUnitTest {
   public void setUp() throws Exception {
     ooohml = mock(OutOfOffHeapMemoryListener.class);
     stats = mock(OffHeapMemoryStats.class);
-    ma = (SimpleMemoryAllocatorImpl) SimpleMemoryAllocatorImpl.createForUnitTest(ooohml, stats, slabs);
+    ma = (MemoryAllocatorImpl) MemoryAllocatorImpl.createForUnitTest(ooohml, stats, slabs);
   }
 
   @After
   public void tearDown() throws Exception {
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    MemoryAllocatorImpl.freeOffHeapMemory();
   }
 
   protected Object getValue() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TxReleasesOffHeapOnCloseJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TxReleasesOffHeapOnCloseJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TxReleasesOffHeapOnCloseJUnitTest.java
index 2bc5759..d8999fe 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TxReleasesOffHeapOnCloseJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TxReleasesOffHeapOnCloseJUnitTest.java
@@ -49,7 +49,7 @@ public class TxReleasesOffHeapOnCloseJUnitTest {
   @Test
   public void testTxReleasesOffHeapOnClose() {
     createCache();
-    SimpleMemoryAllocatorImpl sma = SimpleMemoryAllocatorImpl.getAllocator();
+    MemoryAllocatorImpl sma = MemoryAllocatorImpl.getAllocator();
     RegionFactory rf = cache.createRegionFactory();
     rf.setOffHeap(true);
     Region r = rf.create("testTxReleasesOffHeapOnClose");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java
index 8380f57..28e0439 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java
@@ -23,7 +23,7 @@ import java.nio.ByteBuffer;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.offheap.OffHeapStoredObject;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSource;
 import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSourceFactory;
@@ -34,7 +34,7 @@ public class OffHeapByteBufferByteSourceJUnitTest extends OffHeapByteSourceJUnit
   
   @Override
   protected ByteSource createByteSource(byte[] bytes) {
-    StoredObject so = SimpleMemoryAllocatorImpl.getAllocator().allocateAndInitialize(bytes, false, false);
+    StoredObject so = MemoryAllocatorImpl.getAllocator().allocateAndInitialize(bytes, false, false);
     if (so instanceof OffHeapStoredObject) {
       OffHeapStoredObject c = (OffHeapStoredObject) so;
       ByteBuffer bb = c.createDirectByteBuffer();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/82faa8af/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
index 2111f79..7946b7e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
@@ -23,7 +23,7 @@ import org.junit.experimental.categories.Category;
 import com.gemstone.gemfire.internal.offheap.OffHeapStoredObject;
 import com.gemstone.gemfire.internal.offheap.NullOffHeapMemoryStats;
 import com.gemstone.gemfire.internal.offheap.NullOutOfOffHeapMemoryListener;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.SlabImpl;
 import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSource;
@@ -36,12 +36,12 @@ public class OffHeapByteSourceJUnitTest extends ByteSourceJUnitTest {
 
   @Before
   public void setUp() throws Exception {
-    SimpleMemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
+    MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{new SlabImpl(1024*1024)});
   }
 
   @After
   public void tearDown() throws Exception {
-    SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    MemoryAllocatorImpl.freeOffHeapMemory();
   }
 
   @Override
@@ -51,7 +51,7 @@ public class OffHeapByteSourceJUnitTest extends ByteSourceJUnitTest {
   
   @Override
   protected ByteSource createByteSource(byte[] bytes) {
-    StoredObject so = SimpleMemoryAllocatorImpl.getAllocator().allocateAndInitialize(bytes, false, false);
+    StoredObject so = MemoryAllocatorImpl.getAllocator().allocateAndInitialize(bytes, false, false);
     if (so instanceof OffHeapStoredObject) {
       // bypass the factory to make sure that OffHeapByteSource is tested
       return new OffHeapByteSource(so);