public void pinTsFileResource(final TsFileResource resource, final boolean withMods)
      throws IOException {
    increaseFileReference(resource.getTsFile(), true, resource);
    if (withMods && resource.getExclusiveModFile().exists()) {
      increaseFileReference(resource.getExclusiveModFile().getFile(), false, null);
    }
  }
Cache maps of the TsFile for further use.

@return {@code true} if the maps are successfully put into cache or already cached. {@code
    false} if they can not be cached.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFileResourceManager.java