Interface VerticesBuilder

  • All Superinterfaces:
    com.alibaba.fastffi.CXXPointer, com.alibaba.fastffi.FFIPointer, com.alibaba.fastffi.FFIType

    public interface VerticesBuilder
    extends com.alibaba.fastffi.CXXPointer
    VertexBuilder is designed for building and writing a collection of vertices.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  VerticesBuilder.Factory  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Status addVertex​(Vertex v)
      Add a vertex with the given index.
      Status addVertex​(Vertex v, @com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long index)
      Add a vertex with the given index.
      Status addVertex​(Vertex v, @com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long index, ValidateLevel validateLevel)
      Add a vertex with the given index.
      void clear()
      Clear the vertices in this VerciesBuilder.
      Status dump()
      Dump the collection into files.
      @com.alibaba.fastffi.FFINameAlias("GetNum"),@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long getNum()
      Get the current number of vertices in the collection.
      ValidateLevel getValidateLevel()
      Get the validate level.
      void setValidateLevel​(ValidateLevel validateLevel)
      Set the validate level.
      • Methods inherited from interface com.alibaba.fastffi.CXXPointer

        delete
      • Methods inherited from interface com.alibaba.fastffi.FFIPointer

        getAddress
    • Method Detail

      • clear

        void clear()
        Clear the vertices in this VerciesBuilder.
      • setValidateLevel

        void setValidateLevel​(ValidateLevel validateLevel)
        Set the validate level.
        Parameters:
        validateLevel - The validate level to set.
      • getValidateLevel

        ValidateLevel getValidateLevel()
        Get the validate level.
        Returns:
        The validate level of this writer.
      • addVertex

        Status addVertex​(Vertex v,
                         @com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long index,
                         ValidateLevel validateLevel)
        Add a vertex with the given index.

        The validate_level for this operation could be:

        ValidateLevel::default_validate: to use the validate_level of the builder, which set through the constructor or the SetValidateLevel method;

        ValidateLevel::no_validate: without validation;

        ValidateLevel::weak_validate: to validate if the start index and the vertex index is valid, and the data in builder is not saved;

        ValidateLevel::strong_validate: besides weak_validate, also validate the schema of the vertex is consistent with the info defined.

        Parameters:
        v - The vertex to add.
        index - The given index, -1 means the next unused index.
        validateLevel - The validate level for this operation, which is the builder's validate level by default.
        Returns:
        Status: ok or Status::Invalid error.
      • addVertex

        Status addVertex​(Vertex v)
        Add a vertex with the given index.
        Parameters:
        v - The vertex to add.
        Returns:
        Status: ok or Status::Invalid error.
      • addVertex

        Status addVertex​(Vertex v,
                         @com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long index)
        Add a vertex with the given index.
        Parameters:
        v - The vertex to add.
        index - The given index, -1 means the next unused index.
        Returns:
        Status: ok or Status::Invalid error.
      • getNum

        @com.alibaba.fastffi.FFINameAlias("GetNum"),@com.alibaba.fastffi.FFITypeAlias("graphar::IdType") long getNum()
        Get the current number of vertices in the collection.
        Returns:
        The current number of vertices in the collection.
      • dump

        Status dump()
        Dump the collection into files.
        Returns:
        Status: ok or error.