Class TemplateManager
- java.lang.Object
-
- org.apache.iotdb.db.metadata.template.TemplateManager
-
public class TemplateManager extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendSchemaTemplate(AppendTemplatePlan plan)voidcheckIsTemplateCompatible(Template template, IMNode node)voidclear()voidcreateSchemaTemplate(CreateTemplatePlan plan)voiddropSchemaTemplate(DropTemplatePlan plan)voidforceLog()java.util.Set<java.lang.String>getAllTemplateName()static TemplateManagergetInstance()TemplategetTemplate(java.lang.String templateName)TemplategetTemplateFromHash(int hashcode)java.util.Map<java.lang.String,Template>getTemplateMap()voidinit()voidmarkSchemaRegion(Template template, java.lang.String storageGroup, org.apache.iotdb.commons.consensus.SchemaRegionId schemaRegionId)voidpruneSchemaTemplate(PruneTemplatePlan plan)voidsetTemplateMap(java.util.Map<java.lang.String,Template> templateMap)voidunmarkSchemaRegion(Template template, java.lang.String storageGroup, org.apache.iotdb.commons.consensus.SchemaRegionId schemaRegionId)voidunmarkStorageGroup(Template template, java.lang.String storageGroup)
-
-
-
Method Detail
-
getInstance
public static TemplateManager getInstance()
-
init
public void init() throws java.io.IOException- Throws:
java.io.IOException
-
createSchemaTemplate
public void createSchemaTemplate(CreateTemplatePlan plan) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
dropSchemaTemplate
public void dropSchemaTemplate(DropTemplatePlan plan) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
appendSchemaTemplate
public void appendSchemaTemplate(AppendTemplatePlan plan) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
pruneSchemaTemplate
public void pruneSchemaTemplate(PruneTemplatePlan plan) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
getTemplate
public Template getTemplate(java.lang.String templateName) throws UndefinedTemplateException
- Throws:
UndefinedTemplateException
-
getTemplateFromHash
public Template getTemplateFromHash(int hashcode) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
setTemplateMap
public void setTemplateMap(java.util.Map<java.lang.String,Template> templateMap)
-
getTemplateMap
public java.util.Map<java.lang.String,Template> getTemplateMap()
-
getAllTemplateName
public java.util.Set<java.lang.String> getAllTemplateName()
-
checkIsTemplateCompatible
public void checkIsTemplateCompatible(Template template, IMNode node) throws org.apache.iotdb.commons.exception.MetadataException
- Throws:
org.apache.iotdb.commons.exception.MetadataException
-
markSchemaRegion
public void markSchemaRegion(Template template, java.lang.String storageGroup, org.apache.iotdb.commons.consensus.SchemaRegionId schemaRegionId)
-
unmarkSchemaRegion
public void unmarkSchemaRegion(Template template, java.lang.String storageGroup, org.apache.iotdb.commons.consensus.SchemaRegionId schemaRegionId)
-
unmarkStorageGroup
public void unmarkStorageGroup(Template template, java.lang.String storageGroup)
-
forceLog
public void forceLog()
-
clear
public void clear() throws java.io.IOException- Throws:
java.io.IOException
-
-