Another much more minor problem is that EmptyVertexProperty and
EmptyProperty are declared final.  Since the test suites specifically check
for instances of these classes, it makes it impossible for me to extend
them so that I can strengthen the return types on methods that return
VertexProperty and Property to Blaze-specific implementations of those
interfaces (ones that use CloseableIterator instead of Iterator).  I'm just
going to have to skip a few tests in the test suite to get around this for
now.

On Sat, Dec 19, 2015 at 10:51 AM, Mike Personick <[email protected]> wrote:

> Still have a few kinds to work through but our basic Blazegraph / TP3
> integration is more or less working at this point.
>
> Everything went pretty smoothly - my only major frustration with the API
> is the liberal use of Iterators, which are not AutoCloseable, and the
> built-in assumption widespread throughout the Tinkerpop codebase that
> iterations provided by the Graph implementation do not have any resource
> cleanup requirements.
>
> For example - Graph.edges() and Graph.vertices().  I am returning
> iterators backed by a database connection, which very much needs to be
> released when the iteration is done.  I've done the best I can to protect
> the caller, by strengthening the return type to CloseableIterator (extends
> Iterator and AutoCloseable), and I've even gone so far as to auto-close the
> iterator inside next() if there is no hasNext().  But this does not fully
> protect the caller against resource leaks if they are writing to the basic
> Graph API, (e.g. they do not fully drain the iterator).
>
> Humbly asking you to please take this into account in future version of
> the API.
>
> Thanks,
> Mike
>

Reply via email to