In the spirit of smaller branches, this just exposes a new function from MigrationHelper, getMigratedGraphFactory, which will return an OrientGraphFactory with the latest migrations applied.
The plan is to use the connection pool when we set up a server with multiple threads / actors, each of which needs its own OrientGraph instance.
You can pass in an Option[Int] to set the max connection pool size. If that's not set it will use the value of the ORIENT_POOL_MAX env var. If neither of those are present, it will default to a pool size of 1.
I also renamed getMigratedPersistentGraph to getMigratedGraph, and refactored it to call through to getMigratedGraphFactory (with the default pool size). The newInMemoryGraph function now also calls through to getMigratedGraph instead of duplicating the migration logic.
In the spirit of smaller branches, this just exposes a new function from
MigrationHelper
,getMigratedGraphFactory
, which will return anOrientGraphFactory
with the latest migrations applied.The plan is to use the connection pool when we set up a server with multiple threads / actors, each of which needs its own
OrientGraph
instance.You can pass in an
Option[Int]
to set the max connection pool size. If that's not set it will use the value of theORIENT_POOL_MAX
env var. If neither of those are present, it will default to a pool size of 1.I also renamed
getMigratedPersistentGraph
togetMigratedGraph
, and refactored it to call through togetMigratedGraphFactory
(with the default pool size). ThenewInMemoryGraph
function now also calls through togetMigratedGraph
instead of duplicating the migration logic.