You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/10/07 13:39:21 UTC

[09/10] tinkerpop git commit: updated the docs on BarrierStep as they discuss LazyBarrierStrategy as a non-default strategy.

updated the docs on BarrierStep as they discuss LazyBarrierStrategy as a non-default strategy.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c6b49f2e
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c6b49f2e
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c6b49f2e

Branch: refs/heads/TINKERPOP-1455-redux
Commit: c6b49f2e9b309862f614eb0174ae377f4b75e264
Parents: dbc905c
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Fri Oct 7 07:17:41 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Fri Oct 7 07:17:41 2016 -0600

----------------------------------------------------------------------
 docs/src/reference/the-traversal.asciidoc | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c6b49f2e/docs/src/reference/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-traversal.asciidoc b/docs/src/reference/the-traversal.asciidoc
index 55963f4..9cbbe6c 100644
--- a/docs/src/reference/the-traversal.asciidoc
+++ b/docs/src/reference/the-traversal.asciidoc
@@ -339,32 +339,34 @@ made more salient on a larger graph. Therefore, the example below leverages the
 ----
 graph = TinkerGraph.open()
 graph.io(graphml()).readGraph('data/grateful-dead.xml')
-g = graph.traversal()
-clockWithResult(1){g.V().both().both().both().count().next()} <1>
-clockWithResult(1){g.V().repeat(both()).times(3).count().next()} <2>
-clockWithResult(1){g.V().both().barrier().both().barrier().both().barrier().count().next()} <3>
+g = graph.traversal().withoutStrategies(LazyBarrierStrategy) <1>
+clockWithResult(1){g.V().both().both().both().count().next()} <2>
+clockWithResult(1){g.V().repeat(both()).times(3).count().next()} <3>
+clockWithResult(1){g.V().both().barrier().both().barrier().both().barrier().count().next()} <4>
 ----
 
-<1> A non-bulking traversal where each traverser is processed.
-<2> Each traverser entering `repeat()` has its recursion bulked.
-<3> A bulking traversal where implicit traversers are not processed.
+<1> Explicitly remove `LazyBarrierStrategy` which yields a bulking optimization.
+<2> A non-bulking traversal where each traverser is processed.
+<3> Each traverser entering `repeat()` has its recursion bulked.
+<4> A bulking traversal where implicit traversers are not processed.
 
 If `barrier()` is provided an integer argument, then the barrier will only hold `n`-number of unique traversers in its
 barrier before draining the aggregated traversers to the next step. This is useful in the aforementioned bulking
-optimization scenario, but reduces the risk of an out-of-memory exception.
+optimization scenario with the added benefit of reducing the risk of an out-of-memory exception.
 
-The non-default `LazyBarrierStrategy` inserts `barrier()`-steps in a traversal where appropriate in order to gain the
+`LazyBarrierStrategy` inserts `barrier()`-steps into a traversal where appropriate in order to gain the
 "bulking optimization."
 
 [gremlin-groovy]
 ----
 graph = TinkerGraph.open()
 graph.io(graphml()).readGraph('data/grateful-dead.xml')
-g = graph.traversal().withStrategies(LazyBarrierStrategy.instance())
+g = graph.traversal() <1>
 clockWithResult(1){g.V().both().both().both().count().next()}
-g.V().both().both().both().count().iterate().toString()  <1>
+g.V().both().both().both().count().iterate().toString()  <2>
 ----
 
+<1> `LazyBarrierStrategy` is a default strategy and thus, does not need to be explicitly activated.
 <1> With `LazyBarrierStrategy` activated, `barrier()` steps are automatically inserted where appropriate.
 
 [[by-step]]