private PersistentHashMap<String, T> createMap(final File file) throws IOException {
    return new PersistentHashMap<>(file.toPath(), EnumeratorStringDescriptor.INSTANCE, new DataExternalizer<>() {
      @Override
      public void save(@NotNull final DataOutput out, final T value) throws IOException {
        StateCache.this.write(value, out);
      }

      @Override
      public T read(@NotNull final DataInput in) throws IOException {
        return StateCache.this.read(in);
      }
    });
  }
private PersistentHashMap<String, T> createMap(final File file)