private void destroyPartitionedRegion(RegionEventImpl event) {
    final RegionLock rl = getRegionLock();
    boolean isLocked = false;

    boolean removeFromDisk = !event.getOperation().isClose();
    try {
      logger.info("Partitioned Region {} with prId={} is being destroyed.",
          new Object[] {getFullPath(), getPRId()});
      if (!event.isOriginRemote()) {
        try {
          rl.lock();
          isLocked = true;
        } catch (CancelException ignore) {
          // ignore
        }
        if (!destroyPartitionedRegionGlobally(event)) {
          if (destroyPartitionedRegionLocally(removeFromDisk)) {
            sendLocalDestroyRegionMessage(event);
          }
        }
      } else {
        PartitionRegionConfig prConfig = null;
        try {
          prConfig = getPRRoot().get(getRegionIdentifier());
        } catch (CancelException ignore) {
          // ignore; metadata not accessible
        }
        if (!checkIfAlreadyDestroyedOrOldReference() && null != prConfig
            && !prConfig.getIsDestroying()) {
          try {
            rl.lock();
            isLocked = true;
          } catch (CancelException ignore) {
            // ignore
          }
          if (!destroyPartitionedRegionGlobally(event)) {
            if (destroyPartitionedRegionLocally(removeFromDisk)) {
              sendLocalDestroyRegionMessage(event);
            }
          }
        } else {
          if (destroyPartitionedRegionLocally(removeFromDisk)) {
            sendLocalDestroyRegionMessage(event);
          }
        }
      }
      logger.info("Partitioned Region {} with prId={} is destroyed.",
          new Object[] {getFullPath(), getPRId()});
    } finally {
      try {
        if (isLocked) {
          rl.unlock();
        }
      } catch (Exception es) {
        logger.info("Caught exception while trying to unlock during Region destruction.",
            es);
      }
    }
  }
This method actually destroys the local accessor and data store. This method is invoked from
the postDestroyRegion method of LocalRegion {@link LocalRegion}, which is overridden in
PartitionedRegion This method is invoked from postDestroyRegion method. If origin is local:
<br>
Takes region lock <br>
Removes prId from PRIDMap <br>
Does data store cleanup (removal of bucket regions) <br>
Sends destroyRegionMessage to other nodes <br>
Removes it from allPartitionedRegions <br>
Destroys bucket2node region

@param event the RegionEvent that triggered this operation

@see #destroyPartitionedRegionLocally(boolean)
@see #destroyPartitionedRegionGlobally(RegionEventImpl)
@see #destroyCleanUp(RegionEventImpl, int[])
@see DestroyPartitionedRegionMessage
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java