boolean destroyPartitionedRegionLocally(boolean removeFromDisk) {
    synchronized (this) {
      if (isLocallyDestroyed) {
        return false;
      }
      locallyDestroyingThread = Thread.currentThread();
      isLocallyDestroyed = true;
    }
    if (logger.isDebugEnabled()) {
      logger.debug("destroyPartitionedRegionLocally: Starting destroy for PR = {}", this);
    }
    try {
      synchronized (prIdToPR) {
        prIdToPR.remove(getPRId());
      }
      redundancyProvider.shutdown(); // see bug 41094
      if (dataStore != null) {
        dataStore.cleanUp(false, removeFromDisk);
      }
    } finally {
      getRegionAdvisor().close();
      getPrStats().close();
      cache.getInternalResourceManager(false).removeResourceListener(this);
      locallyDestroyingThread = null;
      if (logger.isDebugEnabled()) {
        logger.debug("destroyPartitionedRegionLocally: Ending destroy for PR = {}", this);
      }
    }
    return true;
  }
This method is used to destroy this partitioned region data and its associated store and
removal of its PartitionedRegionID from local prIdToPR map. This method is called from
destroyPartitionedRegion Method and removes the entry from prIdMap and cleans the data store
buckets. It first checks whether this PartitionedRegion is already locally destroyed. If it is,
this call returns, else if process with the removal from prIdMap and dataStore cleanup.

@return wether local destroy happened

@see #destroyPartitionedRegion(RegionEventImpl)
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java