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- TheVertexProgrammessage 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 providedTraversalthat 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 underlyingMessengerimplementation. 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 Description static classMessageScope.Local.ReverseTraversalSupplierA helper class that can be used to generate the reverse traversal of the traversal within aMessageScope.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 Description BiFunction<M,Edge,M>edgeFunctionSupplier<? extends Traversal<Vertex,Edge>>incidentTraversal
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)BiFunction<M,Edge,M>getEdgeFunction()Supplier<? extends Traversal<Vertex,Edge>>getIncidentTraversal()inthashCode()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)
-
-
-
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()
-
-