Interface Grouping<S,K,V>
-
- All Known Implementing Classes:
GroupSideEffectStep
,GroupStep
public interface Grouping<S,K,V>
An interface for common functionality ofGroupStep
andGroupSideEffectStep
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Traversal.Admin<S,V>
convertValueTraversal(Traversal.Admin<S,V> valueTraversal)
default Barrier
determineBarrierStep(Traversal.Admin<S,V> traversal)
Determines the first non-localBarrier
step in the provided traversal.default Map<K,V>
doFinalReduction(Map<K,Object> map, Traversal.Admin<S,V> valueTraversal)
When there is aBarrier
detected bydetermineBarrierStep(Traversal.Admin)
it is processed in full up to that point and then the remainder of the traversal that follows it is completed.Traversal.Admin<S,K>
getKeyTraversal()
Determines if the provided traversal is equal to the key traversal that theGrouping
has.Traversal.Admin<S,V>
getValueTraversal()
Determines if the provided traversal is equal to the value traversal that theGrouping
has.default boolean
hasBarrierInValueTraversal()
Checks if there is a non-localBarrier
in the value traversal.
-
-
-
Method Detail
-
getKeyTraversal
Traversal.Admin<S,K> getKeyTraversal()
Determines if the provided traversal is equal to the key traversal that theGrouping
has.
-
getValueTraversal
Traversal.Admin<S,V> getValueTraversal()
Determines if the provided traversal is equal to the value traversal that theGrouping
has.
-
hasBarrierInValueTraversal
default boolean hasBarrierInValueTraversal()
Checks if there is a non-localBarrier
in the value traversal.
-
determineBarrierStep
default Barrier determineBarrierStep(Traversal.Admin<S,V> traversal)
Determines the first non-localBarrier
step in the provided traversal. This method is used byGroupStep
andGroupSideEffectStep
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)
-
-