public RefusalReason canDelete(Bucket bucket, DistributionManager distributionManager) {
    // This code only applies to Clusters.
    String myRedundancyZone = distributionManager.getRedundancyZone(memberId);

    if (myRedundancyZone == null) {
      // Not using redundancy zones, so...
      return RefusalReason.NONE;
    }

    for (Member member : bucket.getMembersHosting()) {
      // Don't look at yourself because you are not redundant for yourself
      if (member.getMemberId().equals(getMemberId())) {
        continue;
      }

      String memberRedundancyZone = distributionManager.getRedundancyZone(member.memberId);
      if (memberRedundancyZone == null) {
        // Not using redundancy zones, so...
        continue;
      }

      // Does the member redundancy zone match my redundancy zone?
      // if so we are not the last in the redundancy zone.
      if (memberRedundancyZone.equals(myRedundancyZone)) {
        return RefusalReason.NONE;
      }
    }

    return RefusalReason.LAST_MEMBER_IN_ZONE;
  }
Check to see if the member is the last copy of the bucket in the redundancy zone

@param bucket -- bucket to be deleted from the member
@param distributionManager -- used to check members of redundancy zones
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/rebalance/model/Member.java