Interface ParallelEngine

    • Field Detail

      • logger

        static final org.slf4j.Logger logger
    • Method Detail

      • forEachVertex

        default void forEachVertex​(VertexRange<Long> vertices,
                                   int threadNum,
                                   ExecutorService executor,
                                   BiConsumer<Vertex<Long>,​Integer> consumer)
        Iterate over vertices in VertexRange, applying lambda functions on each vertex.
        Parameters:
        vertices - VertexRange obj contains querying vertices
        threadNum - number of thread to use
        executor - ThreadPoolExecutor to use
        consumer - a BiConsumer(lambda function) takes vertex and thread id as input, perform the desired operation.
        See Also:
        BiConsumer, ThreadPoolExecutor
      • forEachVertex

        default <MSG_T extends PrimitiveMessage> void forEachVertex​(VertexRange<Long> vertices,
                                                                    int threadNum,
                                                                    ExecutorService executor,
                                                                    VertexSet vertexSet,
                                                                    TriConsumer<Vertex<Long>,​Integer,​PrimitiveMessage> consumer,
                                                                    Supplier<MSG_T> msgSupplier)
        Parallel sending messages, with a TriConsumer and msg Supplier
        Parameters:
        vertices - VertexRange obj contains querying vertices.
        threadNum - number of threads to use.
        executor - ThreadPoolExecutor to use.
        vertexSet - A vertex set, marking querying vertices as true, others false.
        consumer - a lambda function representing the per-vertex operation.
        msgSupplier - supplier for msg creation.
        See Also:
        BiConsumer, ThreadPoolExecutor
      • forEachVertex

        default void forEachVertex​(VertexRange<Long> vertices,
                                   int threadNum,
                                   ExecutorService executor,
                                   VertexSet vertexSet,
                                   BiConsumer<Vertex<Long>,​Integer> consumer)
        Apply consumer for each vertex in vertices, in a parallel schema
        Parameters:
        vertices - VertexRange obj contains querying vertices.
        threadNum - number of threads to use.
        executor - ThreadPoolExecutor to use.
        vertexSet - A vertex set, marking querying vertices as true, others false.
        consumer - a lambda function representing the per-vertex operation.
        See Also:
        BiConsumer, ThreadPoolExecutor
      • forEachVertexSendMsg

        default void forEachVertexSendMsg​(VertexRange<Long> vertices,
                                          int threadNum,
                                          ExecutorService executor,
                                          VertexSet vertexSet,
                                          TriConsumer<Vertex<Long>,​Integer,​DoubleMsg> consumer,
                                          Supplier<DoubleMsg> msgSupplier)
        Iterate over vertices in VertexRange, applying lambda functions on each vertex, and send msg with msg created from message supplier
        Parameters:
        vertices - VertexRange obj contains querying vertices
        threadNum - number of thread to use
        executor - ThreadPoolExecutor to use
        vertexSet - vertexset .
        consumer - a BiConsumer(lambda function) takes vertex and thread id as input, perform the desired operation.
        msgSupplier - message creator.
        See Also:
        BiConsumer, ThreadPoolExecutor
      • forEachVertexSendMsg

        default void forEachVertexSendMsg​(VertexRange<Long> vertices,
                                          int threadNum,
                                          ExecutorService executor,
                                          TriConsumer<Vertex<Long>,​Integer,​DoubleMsg> consumer,
                                          Supplier<DoubleMsg> msgSupplier)
        Iterate over vertices in VertexRange(without vertex set), applying lambda functions on each vertex, and send msg with msg created from message supplier
        Parameters:
        vertices - VertexRange obj contains querying vertices
        threadNum - number of thread to use
        executor - ThreadPoolExecutor to use
        consumer - a BiConsumer(lambda function) takes vertex and thread id as input, perform the desired operation.
        msgSupplier - message creator.
        See Also:
        BiConsumer, ThreadPoolExecutor
      • forEachLabelVertex

        default void forEachLabelVertex​(VertexRange<Long> vertices,
                                        int vertexLabelId,
                                        int threadNum,
                                        ExecutorService executor,
                                        VertexSet vertexSet,
                                        TriConsumer<Vertex<Long>,​Integer,​Integer> consumer)
        Apply Triconsumer for each vertex in vertices, in a parallel schema. Used in property graph-app where the vertex id label is needed.
        Parameters:
        vertices - VertexRange obj contains querying vertices.
        vertexLabelId - vertex label id.
        threadNum - number of threads to use.
        executor - ThreadPoolExecutor to use.
        vertexSet - A vertex set, marking querying vertices as true, others false.
        consumer - a lambda function representing the per-vertex operation.
        See Also:
        BiConsumer, ThreadPoolExecutor
      • forEachLabelVertex

        default void forEachLabelVertex​(VertexRange<Long> vertices,
                                        int vertexLabelId,
                                        int threadNum,
                                        ExecutorService executor,
                                        TriConsumer<Vertex<Long>,​Integer,​Integer> consumer)
        Apply Triconsumer for each vertex in vertices, without checking the vertexSet in a parallel schema. Used in property graph-app where the vertex id label is needed.
        Parameters:
        vertices - VertexRange obj contains querying vertices.
        vertexLabelId - vertex label id.
        threadNum - number of threads to use.
        executor - ThreadPoolExecutor to use.
        consumer - a lambda function representing the per-vertex operation.
        See Also:
        BiConsumer, ThreadPoolExecutor