Difference between graph shutdown and graph drop?

37 views
Skip to first unread message

nandan parikh

unread,
Jul 2, 2015, 6:14:05 AM7/2/15
to orient-...@googlegroups.com
What is the primary difference between graph shutdown and graph drop?
When should graph.shutdown() be used? Are there any threads which keep running if we dont use graph.shutdown?

alessand...@gmail.com

unread,
Jul 2, 2015, 6:39:38 AM7/2/15
to orient-...@googlegroups.com
Hi,
you can use the graph.shutdown() when you want to release the OrientGraph instance.

Regards,
Alessandro

W. Craig Trader

unread,
Jul 2, 2015, 10:26:17 AM7/2/15
to orient-...@googlegroups.com
Nandan ...

Graph.shutdown() effectively closes a connection (the OrientGraph object) -- use it early and often, but only when you're done with the connection.
Graph.drop() will remove the database from memory, disk, etcetera -- only use with caution!

In my unit tests, I create an in-memory instance of my database in the setup() method, and use graph.shutdown() followed by graph.drop() in the teardown() method. That is the only way that I would suggest using graph.drop() on a regular basis.

- Craig -

--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages