protected DistributedRegion createAndDefineRegion(boolean isConcurrencyChecksEnabled, RegionAttributes ra, InternalRegionArguments ira, GemFireCacheImpl cache) { DistributedRegion region = new DistributedRegion("testRegion", ra, null, cache, ira); if (isConcurrencyChecksEnabled) { region.enableConcurrencyChecks(); } // since it is a real region object, we need to tell mockito to monitor it region = spy(region); doNothing().when(region).distributeUpdate(any(), anyLong(), anyBoolean(), anyBoolean(), any(), anyBoolean()); doNothing().when(region).distributeDestroy(any(), any()); doNothing().when(region).distributeInvalidate(any()); doNothing().when(region).distributeUpdateEntryVersion(any()); return region; }
@Override protected DistributedRegion createAndDefineRegion(boolean isConcurrencyChecksEnabled, RegionAttributes ra, InternalRegionArguments ira, GemFireCacheImpl cache) { DistributedRegion region = new DistributedRegion("testRegion", ra, null, cache, ira); if (isConcurrencyChecksEnabled) { region.enableConcurrencyChecks(); } // since it is a real region object, we need to tell mockito to monitor it region = spy(region); doNothing().when(region).distributeUpdate(any(), anyLong(), anyBoolean(), anyBoolean(), any(), anyBoolean()); doNothing().when(region).distributeDestroy(any(), any()); doNothing().when(region).distributeInvalidate(any()); doNothing().when(region).distributeUpdateEntryVersion(any()); return region; }
region = new LocalRegion(name, attrs, null, this, internalRegionArgs); } else { region = new DistributedRegion(name, attrs, null, this, internalRegionArgs);
? new LocalRegion(subregionName, regionAttributes, this, this.cache, internalRegionArgs) : new DistributedRegion(subregionName, regionAttributes, this, this.cache, internalRegionArgs);