/** * update stats */ private void updateStatsForPut(long startPut) { getCachePerfStats().endPut(startPut, false); }
/** * update stats */ private void updateStatsForPut(long startPut) { getCachePerfStats().endPut(startPut, false); if(this.partitionedRegionForBucket != null){ this.partitionedRegionForBucket.getPrStats().endPut(startPut); } }
/** * @param start the timestamp taken when the operation started * @param isUpdate true if the put was an update (origin remote) */ @Override public long endPut(long start, boolean isUpdate) { long total = 0; if (isUpdate) { stats.incInt(updatesId, 1); if (enableClockStats) { total = getStatTime()-start; stats.incLong(updateTimeId, total); } } else { stats.incInt(putsId, 1); if (enableClockStats) { total = getStatTime()-start; stats.incLong(putTimeId, total); } } this.cachePerfStats.endPut(start, isUpdate); return total; }
/** * @param start the timestamp taken when the operation started * @param isUpdate true if the put was an update (origin remote) */ @Override public long endPut(long start, boolean isUpdate) { long total = 0; if (isUpdate) { stats.incInt(updatesId, 1); if (enableClockStats) { total = getStatTime()-start; stats.incLong(updateTimeId, total); } } else { stats.incInt(putsId, 1); if (enableClockStats) { total = getStatTime()-start; stats.incLong(putTimeId, total); } } this.cachePerfStats.endPut(start, isUpdate); return total; }
public final void validatedCreate(EntryEventImpl event, long startPut) throws TimeoutException, EntryExistsException, CacheWriterException { try { if (event.getEventId() == null && generateEventID()) { event.setNewEventId(cache.getDistributedSystem()); } assert event.isFetchFromHDFS() : "validatedPut() should have been called"; // Fix for 42448 - Only make create with null a local invalidate for // normal regions. Otherwise, it will become a distributed invalidate. if (getDataPolicy() == DataPolicy.NORMAL) { event.setLocalInvalid(true); } if (!basicPut(event, true, // ifNew false, // ifOld null, // expectedOldValue true // requireOldValue TODO txMerge why is oldValue required for // create? I think so that the EntryExistsException will have it. )) { throw new EntryExistsException(event.getKey().toString(), event.getOldValue()); } else { if (!getDataView(event).isDeferredStats()) { getCachePerfStats().endPut(startPut, false); } } } finally { event.release(); } }
public final void validatedCreate(EntryEventImpl event, long startPut) throws TimeoutException, EntryExistsException, CacheWriterException { try { if (event.getEventId() == null && generateEventID()) { event.setNewEventId(cache.getDistributedSystem()); } assert event.isFetchFromHDFS() : "validatedPut() should have been called"; // Fix for 42448 - Only make create with null a local invalidate for // normal regions. Otherwise, it will become a distributed invalidate. if (getDataPolicy() == DataPolicy.NORMAL) { event.setLocalInvalid(true); } discoverJTA(); if (!basicPut(event, true, // ifNew false, // ifOld null, // expectedOldValue true // requireOldValue TODO txMerge why is oldValue required for // create? I think so that the EntryExistsException will have it. )) { throw new EntryExistsException(event.getKey().toString(), event.getOldValue()); } else { if (!getDataView().isDeferredStats()) { getCachePerfStats().endPut(startPut, false); } } } finally { event.release(); } }
getCachePerfStats().endPut(startPut, false);
} else { if (!getDataView().isDeferredStats()) { getCachePerfStats().endPut(startPut, false);
getCachePerfStats().endPut(startPut, false);
boolean overwriteDestroyed = true; //okay to overwrite the DESTROYED token if (basicUpdate(event, ifNew, ifOld, lastModified, overwriteDestroyed)) { getCachePerfStats().endPut(startPut, event.isOriginRemote());
if (basicUpdate(event, ifNew, ifOld, lastModified, overwriteDestroyed, true)) { getCachePerfStats().endPut(startPut, event.isOriginRemote());
} else { if (!getDataView(tx).isDeferredStats()) { getCachePerfStats().endPut(startPut, false);
getCachePerfStats().endPut(startPut, false);
getCachePerfStats().endPut(startPut, false);
clientEvent.setVersionTag(event.getVersionTag()); getCachePerfStats().endPut(startPut, false); this.stopper.checkCancelInProgress(null); return success;
boolean requireOldValue = true; boolean succeeded = basicPut(event, ifNew, ifOld, null, requireOldValue); getCachePerfStats().endPut(startPut, false); this.stopper.checkCancelInProgress(null); clientEvent.isConcurrencyConflict(event.isConcurrencyConflict());
clientEvent.setVersionTag(event.getVersionTag()); getCachePerfStats().endPut(startPut, false); this.stopper.checkCancelInProgress(null); return success;
boolean requireOldValue = true; // need the old value if the create fails boolean basicPut = basicPut(event, ifNew, ifOld, null, requireOldValue); getCachePerfStats().endPut(startPut, false); this.stopper.checkCancelInProgress(null);
boolean requireOldValue = true; boolean succeeded = basicPut(event, ifNew, ifOld, null, requireOldValue); getCachePerfStats().endPut(startPut, false); this.stopper.checkCancelInProgress(null); clientEvent.isConcurrencyConflict(event.isConcurrencyConflict());
if (success) { clientEvent.setVersionTag(event.getVersionTag()); getCachePerfStats().endPut(startPut, event.isOriginRemote());