public int getTTLCount() {
    lock.readLock().lock();
    try {
      return ttlCache.getTtlCount();
    } finally {
      lock.readLock().unlock();
    }
  }
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