Class MockSchemaFile
- java.lang.Object
-
- org.apache.iotdb.db.metadata.mtree.store.disk.schemafile.MockSchemaFile
-
- All Implemented Interfaces:
ISchemaFile
public class MockSchemaFile extends java.lang.Object implements ISchemaFile
-
-
Constructor Summary
Constructors Constructor Description MockSchemaFile(org.apache.iotdb.commons.path.PartialPath storageGroupPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voidclose()voiddelete(IMNode targetNode)IMNodegetChildNode(IMNode parent, java.lang.String childName)java.util.Iterator<IMNode>getChildren(IMNode parent)IMNodeinit()Get the storage group node, with its segment address of 0.voidsync()booleanupdateStorageGroupNode(IStorageGroupMNode sgNode)Modify header of schema file corresponding to the storage group node synchronouslyvoidwriteMNode(IMNode parent)Only storage group node along with its descendents could be flushed into schema file.
-
-
-
Method Detail
-
init
public IMNode init()
Description copied from interface:ISchemaFileGet the storage group node, with its segment address of 0.- Specified by:
initin interfaceISchemaFile- Returns:
- node instance, template name as hash code
-
updateStorageGroupNode
public boolean updateStorageGroupNode(IStorageGroupMNode sgNode) throws java.io.IOException
Description copied from interface:ISchemaFileModify header of schema file corresponding to the storage group node synchronously- Specified by:
updateStorageGroupNodein interfaceISchemaFile- Parameters:
sgNode- node to be updated- Returns:
- true if success
- Throws:
java.io.IOException
-
getChildNode
public IMNode getChildNode(IMNode parent, java.lang.String childName)
- Specified by:
getChildNodein interfaceISchemaFile
-
getChildren
public java.util.Iterator<IMNode> getChildren(IMNode parent)
- Specified by:
getChildrenin interfaceISchemaFile
-
writeMNode
public void writeMNode(IMNode parent)
Description copied from interface:ISchemaFileOnly storage group node along with its descendents could be flushed into schema file.- Specified by:
writeMNodein interfaceISchemaFile
-
delete
public void delete(IMNode targetNode)
- Specified by:
deletein interfaceISchemaFile
-
sync
public void sync()
- Specified by:
syncin interfaceISchemaFile
-
close
public void close()
- Specified by:
closein interfaceISchemaFile
-
clear
public void clear()
- Specified by:
clearin interfaceISchemaFile
-
-