@Override public void basicDestroyPart3(RegionEntry re, EntryEventImpl event, boolean inTokenMode, boolean duringRI, boolean invokeCallbacks, Object expectedOldValue) { distributeDestroy(event, expectedOldValue); super.basicDestroyPart3(re, event, inTokenMode, duringRI, invokeCallbacks, expectedOldValue); }
@Override protected void verifyDistributeDestroy(DistributedRegion region, EntryEventImpl event, int cnt) { region.basicDestroy(event, false, null); // verify the result if (cnt > 0) { verify(region, times(cnt)).distributeDestroy(eq(event), any()); } else { verify(region, never()).distributeDestroy(eq(event), any()); } }
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; }
distributeDestroy(event, expectedOldValue); event.invokeCallbacks(this, true, false);