Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Expected use of `next()` in Java driver - Apache TinkerPop
AT
Apache TinkerPop
•
3y ago
•
4 replies
Lyndon
Expected use of `next()` in Java driver
I was doing some testing recently and noticed that on very large datasets
, invoking
next()
next()
seems to pull everything and not just the first element like I thought it would
.
I have noticed this used a lot as a way of effectively doing
<traversal>.limit(1)
<traversal>.limit(1)
.
Is it expected if you are using
next()
next()
that you then
close()
close()
the traversal that you called
next()
next()
on
?
I tried looking in the docs but since it implements iterator I couldn
't find the docs for actually using
next()
next()
Apache TinkerPop
Join
Apache TinkerPop is an open source graph computing framework and the home of the Gremlin graph query language.
1,376
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Is the following use of next() allowed?
AT
Apache TinkerPop / questions
3y ago
Use of by()
AT
Apache TinkerPop / questions
3y ago
Disabling strategies via string in remote driver
AT
Apache TinkerPop / questions
3y ago
Expecting java.lang.ArrayList/java.lang.List instead of java.lang.String. Where am I going wrong?
AT
Apache TinkerPop / questions
2y ago