protected void updateMemoryStats(final long memoryDelta) {
    partitionedRegion.getPrStats().incBytesInUse(memoryDelta);
    final long locBytes = bytesInUse.addAndGet(memoryDelta);

    // only check for exceeding local max memory if we're not evicting entries.
    if (partitionedRegion.isEntryEvictionPossible()) {
      return;
    }

    if (exceededLocalMaxMemoryLimit) { // previously over limit
      if (locBytes <= maximumLocalBytes) { // not over limit now
        exceededLocalMaxMemoryLimit = false;
        logger.info(
            "Partitioned Region {} is at or below local maximum memory configuration {} Mb, current size is {} Mb",
            partitionedRegion.getFullPath(),
            partitionedRegion.getLocalMaxMemory(),
            locBytes / PartitionedRegionHelper.BYTES_PER_MB);
      }
    } else { // previously not over limit
      if (locBytes > maximumLocalBytes) { // over limit now
        exceededLocalMaxMemoryLimit = true;
        logger.warn(
            "Partitioned Region {} has exceeded local maximum memory configuration {} Mb, current size is {} Mb",
            partitionedRegion.getFullPath(),
            partitionedRegion.getLocalMaxMemory(),
            locBytes / PartitionedRegionHelper.BYTES_PER_MB);
      }
    }
  }
Puts the object with the given key locally. <br>
Step: <br>
1) It finds out the bucket region for the bucket id. <br>
2) If from step 1 it gets null, that means the bucket is re-mapped. <br>
3) If it finds the bucket region from step 1, it tries to put the key-value on the region. <br>
4) updateBucket2Size if bucket is on more than 1 node or else bucket listeners would take care
of size update. <br>

@param bucketId the bucket id of the key
@param event the operation event
@param ifNew whether a create must be performed
@param ifOld whether an existing entry must be updated
@param lastModified time stamp for update operations
@throws ForceReattemptException if bucket region is null
@throws PrimaryBucketException if the bucket in this data store is not the primary bucket
@return true if put happened
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java