Class HgkvFileBuilderImpl
- java.lang.Object
-
- org.apache.hugegraph.computer.core.store.file.hgkvfile.builder.HgkvFileBuilderImpl
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,HgkvFileBuilder
public class HgkvFileBuilderImpl extends java.lang.Object implements HgkvFileBuilder
-
-
Constructor Summary
Constructors Constructor Description HgkvFileBuilderImpl(org.apache.hugegraph.computer.core.config.Config config, java.lang.String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(KvEntry entry)Add kv entry to file.voidclose()longdataLength()Return the size of entry in bytes that has been written.voidfinish()Finish build file.intheaderLength()Return the size of header.longindexLength()Return the size of index block length.longsizeOfEntry(KvEntry entry)Return size of new entry.
-
-
-
Method Detail
-
add
public void add(KvEntry entry) throws java.io.IOException
Description copied from interface:HgkvFileBuilderAdd kv entry to file.- Specified by:
addin interfaceHgkvFileBuilder- Throws:
java.io.IOException
-
sizeOfEntry
public long sizeOfEntry(KvEntry entry)
Description copied from interface:HgkvFileBuilderReturn size of new entry.- Specified by:
sizeOfEntryin interfaceHgkvFileBuilder
-
finish
public void finish() throws java.io.IOExceptionDescription copied from interface:HgkvFileBuilderFinish build file.- Specified by:
finishin interfaceHgkvFileBuilder- Throws:
java.io.IOException
-
dataLength
public long dataLength()
Description copied from interface:HgkvFileBuilderReturn the size of entry in bytes that has been written.- Specified by:
dataLengthin interfaceHgkvFileBuilder
-
indexLength
public long indexLength()
Description copied from interface:HgkvFileBuilderReturn the size of index block length.- Specified by:
indexLengthin interfaceHgkvFileBuilder
-
headerLength
public int headerLength()
Description copied from interface:HgkvFileBuilderReturn the size of header.- Specified by:
headerLengthin interfaceHgkvFileBuilder
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-