@Override
  public void processLoadSnapshot(File snapshotDir) throws TException, IOException {
    File snapshotFile = new File(snapshotDir, SNAPSHOT_FILENAME);
    if (!snapshotFile.exists() || !snapshotFile.isFile()) {
      LOGGER.error(
          "Failed to load snapshot of TTLInfo, snapshot file [{}] does not exist.",
          snapshotFile.getAbsolutePath());
      return;
    }
    lock.writeLock().lock();
    try (FileInputStream fileInputStream = new FileInputStream(snapshotFile);
        BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream)) {
      ttlCache.clear();
      ttlCache.deserialize(bufferedInputStream);
    } catch (IllegalPathException e) {
      throw new IOException(e);
    } finally {
      lock.writeLock().unlock();
    }
  }
Get the maximum ttl of the subtree of the corresponding database.

@param database the path of the database.
@return the maximum ttl of the subtree of the corresponding database. return NULL_TTL if the
    TTL is not set or the database does not exist.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/TTLInfo.java