public static void schedule(final PartitionedRegion pr) {
    if (!Boolean.getBoolean(GeodeGlossary.GEMFIRE_PREFIX + "PRSanityCheckDisabled")) {
      final DistributionManager dm = pr.getDistributionManager();
      // RegionAdvisor ra = pr.getRegionAdvisor();
      // final Set recipients = ra.adviseAllPRNodes();
      DistributedRegion prRoot =
          (DistributedRegion) PartitionedRegionHelper.getPRRoot(pr.getCache(), false);
      if (prRoot == null) {
        return;
      }
      final Set recipients = prRoot.getDistributionAdvisor().adviseGeneric();
      if (recipients.size() <= 0) {
        return;
      }
      final PRSanityCheckMessage delayedInstance =
          new PRSanityCheckMessage(recipients, pr.getPRId(), null, pr.getRegionIdentifier());
      delayedInstance.setTransactionDistributed(pr.getCache().getTxManager().isDistributed());
      PRSanityCheckMessage instance =
          new PRSanityCheckMessage(recipients, pr.getPRId(), null, pr.getRegionIdentifier());
      instance.setTransactionDistributed(pr.getCache().getTxManager().isDistributed());
      dm.putOutgoing(instance);
      int sanityCheckInterval = Integer
          .getInteger(GeodeGlossary.GEMFIRE_PREFIX + "PRSanityCheckInterval", 5000);
      if (sanityCheckInterval != 0) {
        final SystemTimer tm = new SystemTimer(dm.getSystem());
        SystemTimer.SystemTimerTask st = new SystemTimer.SystemTimerTask() {
          @Override
          public void run2() {
            try {
              if (!pr.isLocallyDestroyed && !pr.isClosed && !pr.isDestroyed()) {
                dm.putOutgoing(delayedInstance);
              }
            } catch (CancelException cce) {
              // cache is closed - can't send the message
            } finally {
              tm.cancel();
            }
          }
        };
        tm.schedule(st, sanityCheckInterval);
      }
    }
  }
Send a sanity check message and schedule a timer to send another one in
gemfire.PRSanityCheckInterval (default 5000) milliseconds. This can be enabled with
gemfire.PRSanityCheckEnabled=true.
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PRSanityCheckMessage.java