public long startPartitionMessageProcessing() { this.stats.incInt(partitionMessagesReceivedId, 1); return startTime(); }
@Override public boolean remove(Object key, Object value, Object callbackArg) { final long startTime = PartitionedRegionStats.startTime(); try { return super.remove(key, value, callbackArg); } finally { this.prStats.endDestroy(startTime); } }
public void finishIncompleteBucketCreation(int bucketId) { String partitionName = null; final long startTime = PartitionedRegionStats.startTime(); if (this.prRegion.isFixedPartitionedRegion()) { FixedPartitionAttributesImpl fpa = PartitionedRegionHelper.getFixedPartitionAttributesForBucket(this.prRegion, bucketId); partitionName = fpa.getPartitionName(); } createBucketAtomically(bucketId, 0, startTime, true, partitionName); }
final long startTime = PartitionedRegionStats.startTime();
final long startTime = PartitionedRegionStats.startTime();
/** * @param access true if caller wants last accessed time updated * @param allowTombstones - whether a tombstone can be returned */ @Override protected Region.Entry<?, ?> nonTXGetEntry(KeyInfo keyInfo, boolean access, boolean allowTombstones) { final long startTime = PartitionedRegionStats.startTime(); final Object key = keyInfo.getKey(); try { int bucketId = keyInfo.getBucketId(); if (bucketId == KeyInfo.UNKNOWN_BUCKET) { bucketId = PartitionedRegionHelper.getHashKey(this, Operation.GET_ENTRY, key, null, null); keyInfo.setBucketId(bucketId); } InternalDistributedMember targetNode = getOrCreateNodeForBucketRead(bucketId); return getEntryInBucket(targetNode, bucketId, key, access, allowTombstones); } finally { this.prStats.endGetEntry(startTime); } }
/** * Returns whether there is a valid (non-null) value present for the specified key, locally or * remotely. This method is equivalent to: * * <pre> * Entry e = getEntry(key); * return e != null && e.getValue() != null; * </pre> * * This method does not consult localCache, even if enabled. * * @param key the key to check for a valid value * @return true if there is an entry in this region for the specified key and it has a valid value * OVERRIDES */ @Override public boolean containsValueForKey(Object key) { // checkClosed(); checkReadiness(); validateKey(key); final long startTime = PartitionedRegionStats.startTime(); boolean containsValueForKey = false; try { containsValueForKey = getDataView().containsValueForKey(getKeyInfo(key), this); } finally { this.prStats.endContainsValueForKey(startTime); } return containsValueForKey; }
@Override public void basicDestroy(final EntryEventImpl event, final boolean cacheWrite, final Object expectedOldValue) throws TimeoutException, EntryNotFoundException, CacheWriterException { final long startTime = PartitionedRegionStats.startTime(); try { if (event.getEventId() == null) { event.setNewEventId(this.cache.getDistributedSystem()); } discoverJTA(); getDataView().destroyExistingEntry(event, cacheWrite, expectedOldValue); } catch (RegionDestroyedException rde) { if (!rde.getRegionFullPath().equals(getFullPath())) { // Handle when a bucket is destroyed throw new RegionDestroyedException(toString(), getFullPath(), rde); } } finally { this.prStats.endDestroy(startTime); } }
final Object key = keyInfo.getKey(); final Object aCallbackArgument = keyInfo.getCallbackArg(); final long startTime = PartitionedRegionStats.startTime(); try { int bucketId = keyInfo.getBucketId();
@Override public void basicInvalidate(EntryEventImpl event) throws EntryNotFoundException { final long startTime = PartitionedRegionStats.startTime(); try { if (event.getEventId() == null) { event.setNewEventId(this.cache.getDistributedSystem()); } discoverJTA(); getDataView().invalidateExistingEntry(event, isInitialized(), false); } catch (RegionDestroyedException rde) { if (!rde.getRegionFullPath().equals(getFullPath())) { // Handle when a bucket is destroyed throw new RegionDestroyedException(toString(), getFullPath(), rde); } } finally { this.prStats.endInvalidate(startTime); } return; }
Object expectedOldValue, boolean requireOldValue, long lastModified, boolean overwriteDestroyed) throws TimeoutException, CacheWriterException { final long startTime = PartitionedRegionStats.startTime(); boolean result = false; final DistributedPutAllOperation putAllOp_save = event.setPutAllOperation(null);
@Override protected boolean nonTXContainsKey(KeyInfo keyInfo) { final long startTime = PartitionedRegionStats.startTime(); boolean contains = false; try { int bucketId = keyInfo.getBucketId(); if (bucketId == KeyInfo.UNKNOWN_BUCKET) { bucketId = PartitionedRegionHelper.getHashKey(this, Operation.CONTAINS_KEY, keyInfo.getKey(), keyInfo.getValue(), keyInfo.getCallbackArg()); keyInfo.setBucketId(bucketId); } Integer bucketIdInt = bucketId; InternalDistributedMember targetNode = getOrCreateNodeForBucketRead(bucketId); // targetNode null means that this key is not in the system. if (targetNode != null) { contains = containsKeyInBucket(targetNode, bucketIdInt, keyInfo.getKey(), false); } } finally { this.prStats.endContainsKey(startTime); } return contains; }
final long startTime = PartitionedRegionStats.startTime();
final long startTime = PartitionedRegionStats.startTime();
protected void createMissingBuckets(PartitionedRegion region) { PartitionedRegion parentRegion = ColocationHelper.getColocatedRegion(region); if (parentRegion == null) { return; } // Fix for 48954 - Make sure the parent region has created missing buckets // before we create missing buckets for this child region. createMissingBuckets(parentRegion); for (int i = 0; i < region.getTotalNumberOfBuckets(); i++) { if (parentRegion.getRegionAdvisor().getBucketAdvisor(i).getBucketRedundancy() != region .getRegionAdvisor().getBucketAdvisor(i).getBucketRedundancy()) { /* if (leaderRegion.getRegionAdvisor().isStorageAssignedForBucket(i)) { */ final long startTime = PartitionedRegionStats.startTime(); region.getRedundancyProvider().createBucketAtomically(i, 0, startTime, true, null); } } } }
final long startTime = PartitionedRegionStats.startTime(); if (isDataStore()) { ret = this.redundancyProvider.createBucketAtomically(bucketId, size, startTime, false,