org.apache.tinkerpop.gremlin.process.computer

## Class MessageScope.Local<M>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.computer.MessageScope
  - - org.apache.tinkerpop.gremlin.process.computer.MessageScope.Local<M>

- Type Parameters:
    `M` - The `VertexProgram` message class
  Enclosing class:
    MessageScope

      public static final class MessageScope.Local<M>
      extends MessageScope

  A Local message is directed to an adjacent (or "memory adjacent") vertex. The adjacent vertex set is defined by the provided `Traversal` that dictates how to go from the sending vertex to the receiving vertex. This is the preferred message scope as it can potentially be optimized by the underlying `Messenger` implementation. The preferred optimization is to not distribute a message object to all adjacent vertices. Instead, allow the recipients to read a single message object stored at the "sending" vertex. This is possible via `Traversal.reverse()`. This optimizations greatly reduces the amount of data created in the computation.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MessageScope.Local.ReverseTraversalSupplier` A helper class that can be used to generate the reverse traversal of the traversal within a `MessageScope.Local`.

    - ### Nested classes/interfaces inherited from class org.apache.tinkerpop.gremlin.process.computer.MessageScope

      `MessageScope.Global, MessageScope.Local<M>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `BiFunction<M,Edge,M>` | `edgeFunction`
    `Supplier<? extends Traversal<Vertex,Edge>>` | `incidentTraversal`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)`
    `BiFunction<M,Edge,M>` | `getEdgeFunction()`
    `Supplier<? extends Traversal<Vertex,Edge>>` | `getIncidentTraversal()`
    `int` | `hashCode()`
    `static <M> MessageScope.Local<M>` | `of(Supplier<? extends Traversal<Vertex,Edge>> incidentTraversal)`
    `static <M> MessageScope.Local<M>` | `of(Supplier<? extends Traversal<Vertex,Edge>> incidentTraversal, BiFunction<M,Edge,M> edgeFunction)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### incidentTraversal

          public final Supplier<? extends Traversal<Vertex,Edge>> incidentTraversal

    - #### edgeFunction

          public final BiFunction<M,Edge,M> edgeFunction

  - ### Method Detail

    - #### of

          public static <M> MessageScope.Local<M> of(Supplier<? extends Traversal<Vertex,Edge>> incidentTraversal)

    - #### of

          public static <M> MessageScope.Local<M> of(Supplier<? extends Traversal<Vertex,Edge>> incidentTraversal,
                                                     BiFunction<M,Edge,M> edgeFunction)

    - #### getEdgeFunction

          public BiFunction<M,Edge,M> getEdgeFunction()

    - #### getIncidentTraversal

          public Supplier<? extends Traversal<Vertex,Edge>> getIncidentTraversal()

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.