@Override
  public void close() {
    super.close();

    synchronized (this) {
      // synchronize to ensure no new
      for (Key key : snapshots.keySet()) {
        key.cancel();
      }

      pollingService.shutdown();
      fileSystemState.unregister(this);
    }
  }
Map of keys to the most recent directory snapshot for each key.
jimfs/src/main/java/com/google/common/jimfs/PollingWatchService.java