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().
      • configure

        public void configure​(Object... keyValues)
        Description copied from interface: Configuring
        Accept a configuration to the Step. Note that this interface extends Parameterizing and so there is an expectation that the Step implementation will have a Parameters instance that will house any values passed to this method. Storing these configurations in Parameters is not a requirement however, IF the configuration is an expected option for the step and can be stored on a member field that can be accessed on the step by more direct means (i.e. like a getter method).
        Specified by:
        configure in interface Configuring
      • 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.
      • getAllowedTokens

        protected abstract Set getAllowedTokens()