Class NodeCentricContext<CONFIG extends PregelConfig>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int degree()
      Returns the degree (number of relationships) of the currently processed node.
      void forEachDistinctNeighbor​(long nodeId, java.util.function.LongConsumer targetConsumer)
      Calls the consumer once for each neighbor of the given node.
      void forEachDistinctNeighbor​(java.util.function.LongConsumer targetConsumer)
      Calls the consumer once for each neighbor of the currently processed node.
      void forEachNeighbor​(long nodeId, java.util.function.LongConsumer targetConsumer)
      Calls the consumer for each neighbor of the given node.
      void forEachNeighbor​(java.util.function.LongConsumer targetConsumer)
      Calls the consumer for each neighbor of the currently processed node.
      boolean isMultiGraph()
      Indicates whether the input graph is a multi-graph.
      long nodeCount()
      Number of nodes in the input graph.
      long nodeId()
      The identifier of the node that is currently processed.
      long relationshipCount()
      Number of relationships in the input graph.
      void setNodeId​(long nodeId)
      Used internally by the framework to set the currently processed node.
      void setNodeValue​(java.lang.String key, double value)
      Sets a node double value for given the node schema key.
      void setNodeValue​(java.lang.String key, double[] value)
      Sets a node long value for given the node schema key.
      void setNodeValue​(java.lang.String key, long value)
      Sets a node long value for given the node schema key.
      void setNodeValue​(java.lang.String key, long[] value)
      Sets a node long value for given the node schema key.
      • Methods inherited from class java.lang.Object

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

      • setNodeId

        public void setNodeId​(long nodeId)
        Used internally by the framework to set the currently processed node.
      • nodeId

        public long nodeId()
        The identifier of the node that is currently processed.
      • setNodeValue

        public void setNodeValue​(java.lang.String key,
                                 double value)
        Sets a node double value for given the node schema key.
        Parameters:
        key - node schema key
        value - property value
      • setNodeValue

        public void setNodeValue​(java.lang.String key,
                                 long value)
        Sets a node long value for given the node schema key.
        Parameters:
        key - node schema key
        value - property value
      • setNodeValue

        public void setNodeValue​(java.lang.String key,
                                 long[] value)
        Sets a node long value for given the node schema key.
        Parameters:
        key - node schema key
        value - property value
      • setNodeValue

        public void setNodeValue​(java.lang.String key,
                                 double[] value)
        Sets a node long value for given the node schema key.
        Parameters:
        key - node schema key
        value - property value
      • degree

        public int degree()
        Returns the degree (number of relationships) of the currently processed node.
      • forEachNeighbor

        public void forEachNeighbor​(java.util.function.LongConsumer targetConsumer)
        Calls the consumer for each neighbor of the currently processed node.
      • forEachNeighbor

        public void forEachNeighbor​(long nodeId,
                                    java.util.function.LongConsumer targetConsumer)
        Calls the consumer for each neighbor of the given node.
      • forEachDistinctNeighbor

        public void forEachDistinctNeighbor​(java.util.function.LongConsumer targetConsumer)
        Calls the consumer once for each neighbor of the currently processed node.
      • forEachDistinctNeighbor

        public void forEachDistinctNeighbor​(long nodeId,
                                            java.util.function.LongConsumer targetConsumer)
        Calls the consumer once for each neighbor of the given node.