public ShowTTLResp showTTL(ShowTTLPlan plan) {
    ShowTTLResp resp = new ShowTTLResp();
    Map<String, Long> pathTTLMap = new HashMap<>();
    lock.readLock().lock();
    try {
      PartialPath pathPattern = new PartialPath(plan.getPathPattern());
      for (Map.Entry<String[], Long> entry : ttlCache.getAllTTLs().entrySet()) {
        if (pathPattern.matchFullPath(entry.getKey())) {
          pathTTLMap.put(
              String.join(String.valueOf(IoTDBConstant.PATH_SEPARATOR), entry.getKey()),
              entry.getValue());
        }
      }
    } finally {
      lock.readLock().unlock();
    }
    resp.setPathTTLMap(pathTTLMap);
    resp.setStatus(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()));
    return resp;
  }
Only used for upgrading from database level ttl to device level ttl.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/TTLInfo.java