public class InternalMNode extends MNode
| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<String,IMNode> |
children
use in Measurement Node so it's protected suppress warnings reason: volatile for double
synchronized check
This will be a ConcurrentHashMap instance
|
protected Template |
schemaTemplate |
| 构造器和说明 |
|---|
InternalMNode(IMNode parent,
String name)
Constructor of MNode.
|
| 限定符和类型 | 方法和说明 |
|---|---|
IMNode |
addChild(IMNode child)
Add a child to the current mnode.
|
void |
addChild(String name,
IMNode child)
add a child to current mnode
|
void |
deleteChild(String name)
delete a child
|
static InternalMNode |
deserializeFrom(MNodePlan plan) |
IMNode |
getChild(String name)
get the child with the name
|
Map<String,IMNode> |
getChildren() |
Template |
getSchemaTemplate() |
Template |
getUpperTemplate()
get upper template of this node, remember we get nearest template alone this node to root
|
boolean |
hasChild(String name)
check whether the MNode has a child with the name
|
boolean |
isUseTemplate() |
void |
replaceChild(String oldChildName,
IMNode newChildNode)
Replace a child of this mnode.
|
void |
serializeTo(MLogWriter logWriter) |
void |
setChildren(Map<String,IMNode> children) |
void |
setSchemaTemplate(Template schemaTemplate) |
void |
setUseTemplate(boolean useTemplate) |
equals, getAsEntityMNode, getAsMeasurementMNode, getAsStorageGroupMNode, getFullPath, getName, getParent, getPartialPath, hashCode, isEmptyInternal, isEntity, isMeasurement, isStorageGroup, setFullPath, setName, setParent, toStringprotected transient volatile Map<String,IMNode> children
This will be a ConcurrentHashMap instance
protected Template schemaTemplate
public boolean hasChild(String name)
public void addChild(String name, IMNode child)
name - child's namechild - child's nodepublic IMNode addChild(IMNode child)
This method will not take the child's name as one of the inputs and will also make this Mnode be child node's parent. All is to reduce the probability of mistaken by users and be more convenient for users to use. And the return of this method is used to conveniently construct a chain of time series for users.
child - child's nodepublic void deleteChild(String name)
public void replaceChild(String oldChildName, IMNode newChildNode)
oldChildName - measurement namenewChildNode - new child nodepublic Template getUpperTemplate()
public Template getSchemaTemplate()
public void setSchemaTemplate(Template schemaTemplate)
public boolean isUseTemplate()
isUseTemplate 在接口中 IMNodeisUseTemplate 在类中 MNodepublic void setUseTemplate(boolean useTemplate)
public void serializeTo(MLogWriter logWriter) throws IOException
IOExceptionpublic static InternalMNode deserializeFrom(MNodePlan plan)
Copyright © 2022 The Apache Software Foundation. All rights reserved.