Interface Grouping<S,K,V>

All Known Implementing Classes:
GroupSideEffectStep, GroupStep

public interface Grouping<S,K,V>
An interface for common functionality of GroupStep and GroupSideEffectStep.
  • Method Details

    • getKeyTraversal

      Traversal.Admin<S,K> getKeyTraversal()
      Determines if the provided traversal is equal to the key traversal that the Grouping has.
    • getValueTraversal

      Traversal.Admin<S,V> getValueTraversal()
      Determines if the provided traversal is equal to the value traversal that the Grouping has.
    • hasBarrierInValueTraversal

      default boolean hasBarrierInValueTraversal()
      Checks if there is a non-local Barrier in the value traversal.
    • resetBarrierFromValueTraversal

      void resetBarrierFromValueTraversal()
      The first non-local Barrier step ascertained by calls to determineBarrierStep(Traversal.Admin) is cached for a Grouping. After strategy application it is important that the cache be reset to ensure that any modifications to the child traversal are accounted for.
    • determineBarrierStep

      default Barrier determineBarrierStep(Traversal.Admin<S,V> traversal)
      Determines the first non-local Barrier step in the provided traversal. This method is used by GroupStep and GroupSideEffectStep to ultimately determine the reducing bi-operator.
      Parameters:
      traversal - The traversal to inspect.
      Returns:
      The first non-local barrier step or null if no such step was found.
    • convertValueTraversal

      default Traversal.Admin<S,V> convertValueTraversal(Traversal.Admin<S,V> valueTraversal)
    • doFinalReduction

      default Map<K,V> doFinalReduction(Map<K,Object> map, Traversal.Admin<S,V> valueTraversal)
      When there is a Barrier detected by determineBarrierStep(Traversal.Admin) it is processed in full up to that point and then the remainder of the traversal that follows it is completed.