@Override public void incRetries() { this.stats.incInt(retriesId, 1); this.cachePerfStats.incRetries(); }
private void retryIfIsRemovedPhase2() { if (regionEntry.isRemovedPhase2()) { focusedRegionMap.getEntryMap().remove(event.getKey(), regionEntry); internalRegion.getCachePerfStats().incRetries(); retry = true; doContinue = true; } }
@Test public void incRetriesIncrementsRetries() { cachePerfStats.incRetries(); assertThat(statistics.getInt(retriesId)).isEqualTo(1); }
@Test public void txApplyDestroyRetries_givenOldRegionEntryWithRemovedPhase2() { givenLocalRegion(); givenConcurrencyChecks(); givenOldRegionEntry(); inTokenMode = true; when(oldRegionEntry.isRemovedPhase2()).thenReturn(true).thenReturn(false); doTxApplyDestroy(); verify(cachePerfStats, times(1)).incRetries(); verify(entryMap, times(1)).remove(eq(key), same(oldRegionEntry)); }
/** * @return true if the entry is in the final stage of removal */ private boolean isRegionEntryRemoved() { final RegionEntry re = getRegionEntry(); if (re.isRemovedPhase2()) { getOwner().getCachePerfStats().incRetries(); getRegionMap().getEntryMap().remove(getEvent().getKey(), re); return true; } else { return false; } } }
/** * Characterization test: {@code retries} currently wraps to negative from max integer value. */ @Test public void retriesWrapsFromMaxIntegerToNegativeValue() { statistics.incInt(retriesId, Integer.MAX_VALUE); cachePerfStats.incRetries(); assertThat(cachePerfStats.getRetries()).isNegative(); }
synchronized (oldRegionEntry) { if (oldRegionEntry.isRemovedPhase2()) { internalRegion.getCachePerfStats().incRetries(); focusedRegionMap.getEntryMap().remove(event.getKey(), oldRegionEntry); oldRegionEntry = focusedRegionMap.putEntryIfAbsent(event.getKey(), newRegionEntry);
if (oldRe.isRemoved() && !oldRe.isTombstone()) { if (_isOwnerALocalRegion()) { _getOwner().getCachePerfStats().incRetries();
synchronized (oldRe) { if (oldRe.isRemovedPhase2()) { owner.getCachePerfStats().incRetries(); getEntryMap().remove(key, oldRe); oldRe = putEntryIfAbsent(key, newRe);
synchronized (oldRe) { if (oldRe.isRemovedPhase2()) { owner.getCachePerfStats().incRetries(); getEntryMap().remove(key, oldRe); oldRe = putEntryIfAbsent(key, newRe);
synchronized (oldRe) { if (oldRe.isRemovedPhase2()) { owner.getCachePerfStats().incRetries(); getEntryMap().remove(key, oldRe); oldRe = putEntryIfAbsent(key, newRe);
owner.getCachePerfStats().incRetries(); getEntryMap().remove(event.getKey(), oldRe); oldRe = putEntryIfAbsent(event.getKey(), newRe);