You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2016/02/09 16:07:18 UTC

[jira] [Commented] (TINKERPOP-790) Implement AutoCloseable on TraversalSource

    [ https://issues.apache.org/jira/browse/TINKERPOP-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15139037#comment-15139037 ] 

Marko A. Rodriguez commented on TINKERPOP-790:
----------------------------------------------

If we are going to do this, we should do it for 3.2.0 as we are already refactored {{TraversalSource}} TINKERPOP-971.

> Implement AutoCloseable on TraversalSource
> ------------------------------------------
>
>                 Key: TINKERPOP-790
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-790
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.0.2-incubating
>            Reporter: stephen mallette
>            Assignee: stephen mallette
>             Fix For: 3.2.0-incubating
>
>
> A {{TraversalSource}} may have resources to release so having a {{close}} method would allows that release to occur.  The specific case has to do with {{EventStrategy}} which registers a listener on {{Transaction}}.  That listener should be removed when the user is done with the {{TraversalSource}}, but there is currently no way to clean that up.  The calling of {{close}} should prevent future traversals from that {{TraversalSource}}. 
> I suppose this also means that a {{TraversalStrategy}} will need to optionally implement {{AutoCloseable}} or some other marker interface to designate it as a strategy that needs to release resources.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)