@Override public void endPutAll(long start) { this.stats.incInt(putallsId, 1); if (enableClockStats) { this.stats.incLong(putallTimeId, getStatTime() - start); } this.cachePerfStats.endPutAll(start); }
/** * Characterization test: Note that the only way to increment {@code putalls} is to invoke * {@code endPutAll}. */ @Test public void endPutAllIncrementsDestroys() { cachePerfStats.endPutAll(0); assertThat(statistics.getInt(putallsId)).isEqualTo(1); }
/** * Characterization test: {@code putAlls} currently wraps to negative from max integer value. */ @Test public void putAllsWrapsFromMaxIntegerToNegativeValue() { statistics.incInt(putallsId, Integer.MAX_VALUE); cachePerfStats.endPutAll(0); assertThat(cachePerfStats.getPutAlls()).isNegative(); }
@Override public void putAll(Map map, Object aCallbackArgument) { long startPut = CachePerfStats.getStatTime(); final DistributedPutAllOperation putAllOp = newPutAllOperation(map, aCallbackArgument); if (putAllOp != null) { try { basicPutAll(map, putAllOp, null); } finally { putAllOp.getBaseEvent().release(); putAllOp.freeOffHeapResources(); } } getCachePerfStats().endPutAll(startPut); }
public VersionedObjectList basicImportPutAll(Map map, boolean skipCallbacks) { long startPut = CachePerfStats.getStatTime(); @Released EntryEventImpl event = EntryEventImpl.create(this, Operation.PUTALL_CREATE, null, null, null, true, getMyId(), !skipCallbacks); try { DistributedPutAllOperation putAllOp = new DistributedPutAllOperation(event, map.size(), false); try { VersionedObjectList result = basicPutAll(map, putAllOp, null); getCachePerfStats().endPutAll(startPut); return result; } finally { putAllOp.freeOffHeapResources(); } } finally { event.release(); } }
try { VersionedObjectList result = basicPutAll(map, putAllOp, retryVersions); getCachePerfStats().endPutAll(startPut); return result; } finally {