@Override protected boolean operateOnRegion(CacheEvent event, ClusterDistributionManager dm) throws EntryNotFoundException { boolean sendReply = true; DistributedRegion region = (DistributedRegion) event.getRegion(); region.getCachePerfStats().incTombstoneGCCount(); FilterInfo routing = null; if (this.filterRouting != null) { routing = this.filterRouting.getFilterInfo(region.getMyId()); } region.expireTombstones(this.regionGCVersions, this.eventID, routing); this.appliedOperation = true; return sendReply; }
@Before public void setup() { event = mock(EntryEventImpl.class); region = mock(DistributedRegion.class); RegionAttributes attr = mock(RegionAttributes.class); CachePerfStats stats = mock(CachePerfStats.class); when(event.isOriginRemote()).thenReturn(false); when(stats.endPut(anyLong(), eq(false))).thenReturn(0L); message = new UpdateOperation.UpdateMessage(); message.event = event; when(region.isAllEvents()).thenReturn(true); when(region.getAttributes()).thenReturn(attr); when(region.isUsedForPartitionedRegionBucket()).thenReturn(false); when(region.getDataPolicy()).thenReturn(DataPolicy.REPLICATE); when(region.getConcurrencyChecksEnabled()).thenReturn(true); when(region.getCachePerfStats()).thenReturn(stats); when(attr.getDataPolicy()).thenReturn(DataPolicy.REPLICATE); when(event.getOperation()).thenReturn(Operation.CREATE); }
if (this.members == null && missingRequiredRoles.isEmpty()) { isMissingRequiredRoles = false; getCachePerfStats().incReliableRegionsMissing(-1); if (getMembershipAttributes().getLossAction().isAllAccess()) getCachePerfStats().incReliableRegionsMissingFullAccess(-1); // rahul else if (getMembershipAttributes().getLossAction().isLimitedAccess()) getCachePerfStats().incReliableRegionsMissingLimitedAccess(-1); else if (getMembershipAttributes().getLossAction().isNoAccess()) getCachePerfStats().incReliableRegionsMissingNoAccess(-1);
if (this.members == null && !isMissingRequiredRoles) { isMissingRequiredRoles = true; getCachePerfStats().incReliableRegionsMissing(1); if (getMembershipAttributes().getLossAction().isAllAccess()) getCachePerfStats().incReliableRegionsMissingFullAccess(1); // rahul else if (getMembershipAttributes().getLossAction().isLimitedAccess()) getCachePerfStats().incReliableRegionsMissingLimitedAccess(1); else if (getMembershipAttributes().getLossAction().isNoAccess()) getCachePerfStats().incReliableRegionsMissingNoAccess(1);
@Override boolean cacheWriteBeforeRegionDestroy(RegionEventImpl event) throws CacheWriterException, TimeoutException { boolean result = false; if (event.getOperation().isDistributed()) { CacheWriter localWriter = basicGetWriter(); Set netWriteRecipients = localWriter == null ? this.distAdvisor.adviseNetWrite() : null; if (localWriter != null || netWriteRecipients != null && !netWriteRecipients.isEmpty()) { final long start = getCachePerfStats().startCacheWriterCall(); try { SearchLoadAndWriteProcessor processor = SearchLoadAndWriteProcessor.getProcessor(); try { processor.initialize(this, "preDestroyRegion", null); processor.doNetWrite(event, netWriteRecipients, localWriter, SearchLoadAndWriteProcessor.BEFOREREGIONDESTROY); result = true; } finally { processor.release(); } } finally { getCachePerfStats().endCacheWriterCall(start); } } serverRegionDestroy(event); } return result; }
&& !event.inhibitAllNotifications()) { final boolean isNewKey = event.getOperation().isCreate(); final long start = getCachePerfStats().startCacheWriterCall(); try { SearchLoadAndWriteProcessor processor = SearchLoadAndWriteProcessor.getProcessor(); getCachePerfStats().endCacheWriterCall(start);
final long start = getCachePerfStats().startCacheWriterCall(); try { event.setOldValueFromRegion(); getCachePerfStats().endCacheWriterCall(start);
/** * Distribute Tombstone garbage-collection information to all peers with storage */ protected EventID distributeTombstoneGC(Set<Object> keysRemoved) { this.getCachePerfStats().incTombstoneGCCount(); EventID eventId = new EventID(getSystem()); DistributedTombstoneOperation gc = DistributedTombstoneOperation.gc(this, eventId); gc.distribute(); notifyClientsOfTombstoneGC(getVersionVector().getTombstoneGCVector(), keysRemoved, eventId, null); return eventId; }
getCachePerfStats().incReliableRegionsMissing(1); if (getMembershipAttributes().getLossAction().isAllAccess()) getCachePerfStats().incReliableRegionsMissingFullAccess(1); // rahul else if (getMembershipAttributes().getLossAction().isLimitedAccess()) getCachePerfStats().incReliableRegionsMissingLimitedAccess(1); else if (getMembershipAttributes().getLossAction().isNoAccess()) getCachePerfStats().incReliableRegionsMissingNoAccess(1); getCachePerfStats().incReliableRegionsMissing(-1); if (getMembershipAttributes().getLossAction().isAllAccess()) getCachePerfStats().incReliableRegionsMissingFullAccess(-1); // rahul else if (getMembershipAttributes().getLossAction().isLimitedAccess()) getCachePerfStats().incReliableRegionsMissingLimitedAccess(-1); else if (getMembershipAttributes().getLossAction().isNoAccess()) getCachePerfStats().incReliableRegionsMissingNoAccess(-1); getCachePerfStats().incReliableRegionsMissing(1); if (getMembershipAttributes().getLossAction().isAllAccess()) getCachePerfStats().incReliableRegionsMissingFullAccess(1); // rahul else if (getMembershipAttributes().getLossAction().isLimitedAccess()) getCachePerfStats().incReliableRegionsMissingLimitedAccess(1); else if (getMembershipAttributes().getLossAction().isNoAccess()) getCachePerfStats().incReliableRegionsMissingNoAccess(1);
when(lr.getCacheDistributionAdvisor()).thenReturn(advisor); when(lr.getDistributionManager()).thenReturn(dm); when(lr.getCachePerfStats()).thenReturn(stats); when(lr.getScope()).thenReturn(Scope.DISTRIBUTED_ACK); when(lr.getCancelCriterion()).thenReturn(mock(CancelCriterion.class));
private void putNewValueInRegion(boolean isCreate, EntryEventImpl clientEvent, long lastModified, EntryEventImpl event) { RegionEntry re = null; // Set eventId. Required for interested clients. event.setNewEventId(cache.getDistributedSystem()); long startPut = CachePerfStats.getStatTime(); validateKey(event.getKey()); // this next step also distributes the object to other processes, if necessary try { re = basicPutEntry(event, lastModified); // Update client event with latest version tag from re. if (re != null && clientEvent != null) { clientEvent.setVersionTag(event.getVersionTag()); } if (!isTX()) { getCachePerfStats().endPut(startPut, event.isOriginRemote()); } } catch (ConcurrentCacheModificationException e) { // the cache was modified while we were searching for this entry and // the netsearch result was elided. Return the current value from the cache updateEventWithCurrentRegionEntry(event, clientEvent); } catch (CacheWriterException cwe) { if (logger.isDebugEnabled()) { logger.debug("findObjectInSystem: writer exception putting entry {} : {}", event, cwe); } } if (isCreate) { recordMiss(re, event.getKey()); } }
long giiStart = this.region.getCachePerfStats().startGetInitialImage(); InternalDistributedMember provider = null; Thread.currentThread().interrupt(); region.getCancelCriterion().checkCancelInProgress(ie); this.region.getCachePerfStats().endNoGIIDone(giiStart); return GIIStatus.NO_GII; this.region.getCachePerfStats().endGetInitialImage(giiStart); if (this.isDeltaGII) { this.region.getCachePerfStats().incDeltaGIICompleted(); this.region.getCachePerfStats().endNoGIIDone(giiStart);
final CachePerfStats stats = this.region.getCachePerfStats(); ImageState imgState = this.region.getImageState();