private void disconnect() throws CacheException {
    r = null;
    if (c != null) {
      c.close();
      c = null;
    }
    if (ds != null) {
      ds.disconnect();
      ds = null;
    }
  }
This class makes sure that instantatiors are persisted to disk and can be recovered.
geode-core/src/integrationTest/java/org/apache/geode/DiskInstantiatorsJUnitTest.java