Class Template


  • public class Template
    extends java.lang.Object
    The template instance constructed within session is SUGGESTED to be a flat measurement template, which has no internal nodes inside a template.

    For example, template(s1, s2, s3) is a flat measurement template, while template2(GPS.x, GPS.y, s1) is not.

    Tree-structured template, which is contrary to flat measurement template, may not be supported in further version of IoTDB

    • Constructor Summary

      Constructors 
      Constructor Description
      Template​(java.lang.String name)  
      Template​(java.lang.String name, boolean isShareTime)  
    • Constructor Detail

      • Template

        public Template​(java.lang.String name,
                        boolean isShareTime)
      • Template

        public Template​(java.lang.String name)
    • Method Detail

      • getName

        public java.lang.String getName()
      • isShareTime

        public boolean isShareTime()
      • setShareTime

        public void setShareTime​(boolean shareTime)
      • addToTemplate

        public void addToTemplate​(TemplateNode child)
                           throws org.apache.iotdb.rpc.StatementExecutionException
        Throws:
        org.apache.iotdb.rpc.StatementExecutionException
      • deleteFromTemplate

        public void deleteFromTemplate​(java.lang.String name)
                                throws org.apache.iotdb.rpc.StatementExecutionException
        Throws:
        org.apache.iotdb.rpc.StatementExecutionException
      • serialize

        public void serialize​(java.io.OutputStream baos)
                       throws java.io.IOException
        Serialize: templateName[string] isShareTime[boolean]
        Throws:
        java.io.IOException