Interface EdgesBuilder

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

    public interface EdgesBuilder
    extends com.alibaba.fastffi.CXXPointer
    EdgeBuilder is designed for building and writing a collection of edges.
    • Method Detail

      • 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.
      • clear

        void clear()
        Clear the edges in this EdgessBuilder.
      • addEdge

        Status addEdge​(Edge e,
                       ValidateLevel validateLevel)
        Add an edge to the collection.

        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 adj_list type is valid, and the data in builder is not saved;

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

        Parameters:
        e - The edge to add.
        validateLevel - The validate level for this operation, which is the builder's validate level by default.
        Returns:
        Status: ok or Status::Invalid error.
      • addEdge

        Status addEdge​(Edge e)
        Add an edge to the collection.
        Parameters:
        e - The edge to add.
        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 edges in the collection.
        Returns:
        The current number of edges in the collection.
      • dump

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