Class TTLManager

java.lang.Object
org.apache.iotdb.confignode.manager.TTLManager

public class TTLManager extends Object
  • Constructor Details

  • Method Details

    • setTTL

      public TSStatus setTTL(DatabaseSchemaPlan databaseSchemaPlan, boolean isGeneratedByPipe) throws IllegalPathException
      Set ttl when creating database.
      Throws:
      IllegalPathException
    • setTTL

      public TSStatus setTTL(SetTTLPlan setTTLPlan, boolean isGeneratedByPipe)
    • unsetTTL

      public TSStatus unsetTTL(SetTTLPlan setTTLPlan, boolean isGeneratedByPipe)
    • showTTL

      public DataSet showTTL(ShowTTLPlan showTTLPlan)
    • getAllTTL

      public Map<String,Long> getAllTTL()
    • getTTLCount

      public int getTTLCount()
    • getDatabaseMaxTTL

      public long getDatabaseMaxTTL(String database)
      Get the maximum ttl of the subtree of the corresponding database.
      Parameters:
      database - the path of the database.
      Returns:
      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.
    • setTTL

      public void setTTL(Map<String,Long> databaseTTLMap) throws IllegalPathException
      Only used for upgrading from old database-level ttl to device-level ttl.
      Throws:
      IllegalPathException