private void createRegion(final boolean accessor) {
    PartitionAttributesFactory<String, Integer> paf = new PartitionAttributesFactory<>();
    paf.setRedundantCopies(REDUNDANT_COPIES);
    if (accessor) {
      paf.setLocalMaxMemory(0);
    }
    paf.setTotalNumBuckets(TOTAL_NUM_BUCKETS);

    RegionFactory<String, Integer> regionFactory = cacheRule.getCache().createRegionFactory();
    regionFactory.setDataPolicy(DataPolicy.PARTITION);
    regionFactory.setPartitionAttributes(paf.create());

    regionFactory.create(regionName);
  }
This test case checks that a closed PR (accessor/datastore) can be recreated.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionCloseDistributedTest.java