@Override void updateSizeOnRemove(Object key, int oldSize) { this.partitionedRegion.getPrStats().incDataStoreEntryCount(-1); updateBucket2Size(oldSize, 0, SizeOp.DESTROY); }
@Override void updateSizeOnCreate(Object key, int newSize) { this.partitionedRegion.getPrStats().incDataStoreEntryCount(1); updateBucket2Size(0, newSize, SizeOp.CREATE); }
public Object call() throws Exception { Cache c = getCache(); PartitionedRegion pr = (PartitionedRegion) c.getRegion(prPrefix); assertEquals(0, pr.getPrStats().getLowRedundancyBucketCount()); return Boolean.TRUE; } };
public Object call() throws Exception { Cache c = getCache(); PartitionedRegion pr = (PartitionedRegion) c.getRegion(prPrefix); assertEquals(1, pr.getPrStats().getLowRedundancyBucketCount()); return Boolean.TRUE; } };
@Override protected void sendReply(InternalDistributedMember member, int procId, DM dm, ReplyException ex, PartitionedRegion pr, long startTime) { if (pr != null && startTime > 0) { pr.getPrStats().endPartitionMessagesProcessing(startTime); } InvalidateReplyMessage.send(member, procId, getReplySender(dm), ex, this); }
public void run() { Cache cache = getCache(); PartitionedRegion region = (PartitionedRegion) cache.getRegion("region1"); PartitionedRegionStats stats = region.getPrStats(); CachePerfStats cachePerfStats = region.getCachePerfStats(); assertEquals(expectedCount, stats.getDataStoreEntryCount()); assertEquals(expectedCount, cachePerfStats.getEntries()); } };
@Override protected void sendReply(InternalDistributedMember member, int procId, DM dm, ReplyException ex, PartitionedRegion pr, long startTime) { if (pr != null && startTime > 0) { pr.getPrStats().endPartitionMessagesProcessing(startTime); } InvalidateReplyMessage.send(member, procId, getReplySender(dm), ex, this.versionTag); }
/** * update stats */ private void updateStatsForPut(long startPut) { getCachePerfStats().endPut(startPut, false); if(this.partitionedRegionForBucket != null){ this.partitionedRegionForBucket.getPrStats().endPut(startPut); } }
public void run() { Cache cache = getCache(); PartitionedRegion region = (PartitionedRegion) cache.getRegion("region1"); PartitionedRegionStats stats = region.getPrStats(); CachePerfStats cachePerfStats = region.getCachePerfStats(); assertEquals(expectedCount, stats.getTotalNumBuckets()); } };
@Override protected final boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion region, long startTime) throws ForceReattemptException { // this is executing in the WAITING_POOL_EXECUTOR try { region.getRedundancyProvider().endBucketCreationLocally(bucketId, newPrimary); } finally { region.getPrStats().endPartitionMessagesProcessing(startTime); } return false; }
/** Send a generic ReplyMessage. This is in a method so that subclasses can override the reply message type * @param pr the Partitioned Region for the message whose statistics are incremented * @param startTime the start time of the operation in nanoseconds * @see PutMessage#sendReply */ protected void sendReply(InternalDistributedMember member, int procId, DM dm, ReplyException ex, PartitionedRegion pr, long startTime) { if (pr != null && startTime > 0) { pr.getPrStats().endPartitionMessagesProcessing(startTime); } ReplyMessage.send(member, procId, ex, getReplySender(dm), this, pr != null && pr.isInternalRegion()); }
/** Send a generic ReplyMessage. This is in a method so that subclasses can override the reply message type * @param pr the Partitioned Region for the message whose statistics are incremented * @param startTime the start time of the operation in nanoseconds * @see PutMessage#sendReply */ protected void sendReply(InternalDistributedMember member, int procId, DM dm, ReplyException ex, PartitionedRegion pr, long startTime) { if (pr != null && startTime > 0) { pr.getPrStats().endPartitionMessagesProcessing(startTime); } ReplyMessage.send(member, procId, ex, getReplySender(dm), pr != null && pr.isInternalRegion()); }
@Override protected void sendReply(InternalDistributedMember member, int procId, DM dm, ReplyException ex, PartitionedRegion pr, long startTime) { if (pr != null) { if (startTime > 0) { pr.getPrStats().endPartitionMessagesProcessing(startTime); } if (!pr.getConcurrencyChecksEnabled() && this.versions != null) { this.versions.clear(); } } RemoveAllReplyMessage.send(member, procId, getReplySender(dm), this.result, this.versions, ex); }
@Override protected final boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion region, long startTime) throws ForceReattemptException { PartitionedRegionDataStore dataStore = region.getDataStore(); boolean moved = dataStore.moveBucket(this.bucketId, this.source,true); region.getPrStats().endPartitionMessagesProcessing(startTime); MoveBucketReplyMessage.send( getSender(), getProcessorId(), dm, null, moved); return false; }
@Override protected final boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion region, long startTime) throws ForceReattemptException { PartitionedRegionDataStore dataStore = region.getDataStore(); boolean moved = dataStore.moveBucket(this.bucketId, this.source,true); region.getPrStats().endPartitionMessagesProcessing(startTime); MoveBucketReplyMessage.send( getSender(), getProcessorId(), dm, null, moved); return false; }
protected void sendReply(InternalDistributedMember member, int procId, DM dm, ReplyException ex, PartitionedRegion pr, long startTime, EntryEventImpl ev) { if (pr != null && startTime > 0) { pr.getPrStats().endPartitionMessagesProcessing(startTime); pr.getCancelCriterion().checkCancelInProgress(null); // bug 39014 - don't send a positive response if we may have failed } PutReplyMessage.send(member, procId, getReplySender(dm), result, getOperation(), ex, this, ev); }
protected void sendReply(InternalDistributedMember member, int procId, DM dm, ReplyException ex, PartitionedRegion pr, long startTime, EntryEventImpl ev) { if (pr != null && startTime > 0) { pr.getPrStats().endPartitionMessagesProcessing(startTime); pr.getCancelCriterion().checkCancelInProgress(null); // bug 39014 - don't send a positive response if we may have failed } PutReplyMessage.send(member, procId, getReplySender(dm), result, getOperation(), ex, this, ev); }
@Override protected final boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion region, long startTime) throws ForceReattemptException { BucketAdvisor bucketAdvisor = region.getRegionAdvisor().getBucketAdvisor(this.bucketId); bucketAdvisor.deposePrimary(); region.getPrStats().endPartitionMessagesProcessing(startTime); DeposePrimaryBucketReplyMessage.send( getSender(), getProcessorId(), dm, (ReplyException)null); return false; }
@Override protected final boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion region, long startTime) throws ForceReattemptException { BucketAdvisor bucketAdvisor = region.getRegionAdvisor().getBucketAdvisor(this.bucketId); bucketAdvisor.deposePrimary(); region.getPrStats().endPartitionMessagesProcessing(startTime); DeposePrimaryBucketReplyMessage.send( getSender(), getProcessorId(), dm, (ReplyException)null); return false; }
@Override protected void sendReply(InternalDistributedMember member, int procId, DM dm, ReplyException ex, PartitionedRegion pr, long startTime) { if (pr != null && startTime > 0) { pr.getPrStats().endPartitionMessagesProcessing(startTime); } if (ex == null) { DestroyReplyMessage.send(getSender(), getReplySender(dm), this.processorId, this.versionTag, pr != null && pr.isInternalRegion()); } else { ReplyMessage.send(getSender(), this.processorId, ex, getReplySender(dm), pr != null && pr.isInternalRegion()); } }