Class MergeStep<S,​E,​C>

    • Method Detail

      • getMergeTraversal

        public Traversal.Admin<S,​Map> getMergeTraversal()
        Gets the traversal that will be used to provide the Map that will be used to search for elements. This Map also will be used as the default data set to be used to create the element if the search is not successful.
      • getOnCreateTraversal

        public Traversal.Admin<S,​Map> getOnCreateTraversal()
        Gets the traversal that will be used to provide the Map that will be used to create elements that do not match the search criteria of getMergeTraversal().
      • getOnMatchTraversal

        public Traversal.Admin<S,​Map<String,​?>> getOnMatchTraversal()
        Gets the traversal that will be used to provide the Map that will be used to modify elements that match the search criteria of getMergeTraversal().
      • isStart

        public boolean isStart()
        Determines if this is a start step.
      • isFirst

        public boolean isFirst()
        Determine if this is the first pass through processNextStart().
      • isUsingPartitionStrategy

        public boolean isUsingPartitionStrategy()
      • getGraph

        protected Graph getGraph()
      • reset

        public void reset()
        Description copied from interface: Step
        Reset the state of the step such that it has no incoming starts. Internal states are to be reset, but any sideEffect data structures are not to be recreated.
        Specified by:
        reset in interface Step<S,​E>
        Overrides:
        reset in class FlatMapStep<S,​E>
      • getRequirements

        public Set<TraverserRequirement> getRequirements()
        Description copied from interface: Step
        Provide the necessary TraverserRequirement that must be met by the traverser in order for the step to function properly. The provided default implements returns an empty set.
        Specified by:
        getRequirements in interface Step<S,​E>
        Returns:
        the set of requirements
      • clone

        public MergeStep<S,​E,​C> clone()
        Description copied from interface: Step
        Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication. When cloning a step, it is important that the steps, the cloned step is equivalent to the state of the step when Step.reset() is called. Moreover, the previous and next steps should be set to EmptyStep.
        Specified by:
        clone in interface Step<S,​E>
        Overrides:
        clone in class AbstractStep<S,​E>
        Returns:
        The cloned step
      • validate

        protected void validate​(Map map,
                                boolean ignoreTokens)
      • validate

        protected static void validate​(Map map,
                                       boolean ignoreTokens,
                                       Set allowedTokens,
                                       String op)
      • validateNoOverrides

        protected void validateNoOverrides​(Map<?,​?> mergeMap,
                                           Map<?,​?> onCreateMap)
        Prohibit overrides to the existence criteria (id/label/from/to) in onCreate.
      • searchVertices

        protected CloseableIterator<Vertex> searchVertices​(Map search)
        Translate the Map into a g.V() traversal against the supplied graph. Graph providers will presumably optimize this traversal to use whatever indices are present and appropriate for efficiency. Callers are responsible for closing this iterator when finished.
      • getAllowedTokens

        protected abstract Set getAllowedTokens()