Class MemMTreeStore
- java.lang.Object
-
- org.apache.iotdb.db.metadata.mtree.store.MemMTreeStore
-
- All Implemented Interfaces:
IMTreeStore
public class MemMTreeStore extends java.lang.Object implements IMTreeStore
This is a memory-based implementation of IMTreeStore. All MNodes are stored in memory.
-
-
Constructor Summary
Constructors Constructor Description MemMTreeStore(org.apache.iotdb.commons.path.PartialPath rootPath, boolean isStorageGroup)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IMNodeaddChild(IMNode parent, java.lang.String childName, IMNode child)voidclear()booleancreateSnapshot(java.io.File snapshotDir)voiddeleteChild(IMNode parent, java.lang.String childName)IMNodegetChild(IMNode parent, java.lang.String name)IMNodeIteratorgetChildrenIterator(IMNode parent)IMNodegetRoot()booleanhasChild(IMNode parent, java.lang.String name)static MemMTreeStoreloadFromSnapshot(java.io.File snapshotDir, java.util.function.Consumer<IMeasurementMNode> measurementProcess)voidpin(IMNode node)voidsetAlias(IMeasurementMNode measurementMNode, java.lang.String alias)IEntityMNodesetToEntity(IMNode node)IMNodesetToInternal(IEntityMNode entityMNode)voidunPin(IMNode node)voidunPinPath(IMNode node)voidupdateMNode(IMNode node)
-
-
-
Method Detail
-
getRoot
public IMNode getRoot()
- Specified by:
getRootin interfaceIMTreeStore
-
hasChild
public boolean hasChild(IMNode parent, java.lang.String name)
- Specified by:
hasChildin interfaceIMTreeStore
-
getChild
public IMNode getChild(IMNode parent, java.lang.String name)
- Specified by:
getChildin interfaceIMTreeStore
-
getChildrenIterator
public IMNodeIterator getChildrenIterator(IMNode parent)
- Specified by:
getChildrenIteratorin interfaceIMTreeStore
-
addChild
public IMNode addChild(IMNode parent, java.lang.String childName, IMNode child)
- Specified by:
addChildin interfaceIMTreeStore
-
deleteChild
public void deleteChild(IMNode parent, java.lang.String childName)
- Specified by:
deleteChildin interfaceIMTreeStore
-
updateMNode
public void updateMNode(IMNode node)
- Specified by:
updateMNodein interfaceIMTreeStore
-
setToEntity
public IEntityMNode setToEntity(IMNode node)
- Specified by:
setToEntityin interfaceIMTreeStore
-
setToInternal
public IMNode setToInternal(IEntityMNode entityMNode)
- Specified by:
setToInternalin interfaceIMTreeStore
-
setAlias
public void setAlias(IMeasurementMNode measurementMNode, java.lang.String alias)
- Specified by:
setAliasin interfaceIMTreeStore
-
pin
public void pin(IMNode node)
- Specified by:
pinin interfaceIMTreeStore
-
unPin
public void unPin(IMNode node)
- Specified by:
unPinin interfaceIMTreeStore
-
unPinPath
public void unPinPath(IMNode node)
- Specified by:
unPinPathin interfaceIMTreeStore
-
clear
public void clear()
- Specified by:
clearin interfaceIMTreeStore
-
createSnapshot
public boolean createSnapshot(java.io.File snapshotDir)
- Specified by:
createSnapshotin interfaceIMTreeStore
-
loadFromSnapshot
public static MemMTreeStore loadFromSnapshot(java.io.File snapshotDir, java.util.function.Consumer<IMeasurementMNode> measurementProcess) throws java.io.IOException
- Throws:
java.io.IOException
-
-