Reputation: 15788
Looking through the source of ORecord class, its looks like its not designed with multi-threading in mind.
Is there a guide for thread-safe use of the API?
Upvotes: 2
Views: 167
Reputation: 656
If you work with database instance the common approach is to have separate instance of this object for each thread, to simplify this task you may use pool of database objects, for example com.orientechnologies.orient.core.db.OPartitionedDatabasePool.
In general only OStorage
instances are thread safe, the rest of objects should not be shared between threads, but should be loaded using database instance.
Upvotes: 3