[ 
https://issues.apache.org/jira/browse/TINKERPOP-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stephen mallette closed TINKERPOP-1203.
---------------------------------------
    Resolution: Won't Do

Did a quick search of the code. I see a few spots where we this sort of 
refactoring might help, but at this stage of things I'm not sure I see enough 
value to support the change. Closing.

> Provide TraverserSet.detach()/attach() methods.
> -----------------------------------------------
>
>                 Key: TINKERPOP-1203
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1203
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.1.1-incubating
>            Reporter: Marko A. Rodriguez
>            Priority: Major
>
> I do this all the time:
> {code}
> final TraverserSet<E> traverserSet = new TraverserSet<>();
> traversal.getEndStep().forEachRemaining( traverser -> {
>   traverser.detach();
>   traverserSet.add(traverser)
> });
> return traverserSet
> {code}
> Sorta ghetto. Be nice if we had this functionality:
> {code}
> traverserSet.detach()
> {code}
> We could also provide:
> {code}
> traverserSet.attach(Attachable.Method)
> traverserSet.attach(Predicate<Traverser<S>>, Attachable.Method) // this is 
> important cause you don't want to re-attach paths alot of the time and 
> DetachedVertexProperty has a transient that causes NPEs (hack around).
> {code}
> Also, we could then have:
> {code}
> Traversal.addStarts(TraverserSet<S>)
> {code}
> This would "bulk insert" without iteration by just writing directly to 
> {{ExpandableIterator}}.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to