@Override
  @CanIgnoreReturnValue
  public Key register(Watchable watchable, Iterable<? extends WatchEvent.Kind<?>> eventTypes)
      throws IOException {
    JimfsPath path = checkWatchable(watchable);

    Key key = super.register(path, eventTypes);

    Snapshot snapshot = takeSnapshot(path);

    synchronized (this) {
      snapshots.put(key, snapshot);
      if (pollingFuture == null) {
        startPolling();
      }
    }

    return key;
  }
Map of keys to the most recent directory snapshot for each key.
jimfs/src/main/java/com/google/common/jimfs/PollingWatchService.java