Class 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
      void add​(KvEntry entry)
      Add kv entry to file.
      void close()  
      long dataLength()
      Return the size of entry in bytes that has been written.
      void finish()
      Finish build file.
      int headerLength()
      Return the size of header.
      long indexLength()
      Return the size of index block length.
      long sizeOfEntry​(KvEntry entry)
      Return size of new entry.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HgkvFileBuilderImpl

        public HgkvFileBuilderImpl​(org.apache.hugegraph.computer.core.config.Config config,
                                   java.lang.String path)
                            throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • add

        public void add​(KvEntry entry)
                 throws java.io.IOException
        Description copied from interface: HgkvFileBuilder
        Add kv entry to file.
        Specified by:
        add in interface HgkvFileBuilder
        Throws:
        java.io.IOException
      • finish

        public void finish()
                    throws java.io.IOException
        Description copied from interface: HgkvFileBuilder
        Finish build file.
        Specified by:
        finish in interface HgkvFileBuilder
        Throws:
        java.io.IOException
      • dataLength

        public long dataLength()
        Description copied from interface: HgkvFileBuilder
        Return the size of entry in bytes that has been written.
        Specified by:
        dataLength in interface HgkvFileBuilder
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException