code: public void snapshot() {
      snapshotPoolGroups =
          new ArrayList<PoolGroupSchedulable>(nameToPoolGroup.values());
      for (PoolGroupSchedulable poolGroup : snapshotPoolGroups) {
        poolGroup.snapshot();
      }
      scheduleQueue = null;
      preemptQueue = null;
  
      // Load the configured pools for stats and cm.jsp
      // (needs to modify nameToPoolGroup)
      Collection<PoolInfo> configuredPoolInfos =
          configManager.getConfiguredPoolInfos();
      if (configuredPoolInfos != null) {
        for (PoolInfo poolInfo : configuredPoolInfos) {
          getPoolSchedulable(poolInfo);
        }
      }
    }
docs: Take snapshots for all pools groups and sessions.