code: public OrientGraphBaseFactory setupPool(final int max) {
      pool = new OPartitionedReCreatableDatabasePool(this.factory, dbName, user, password, max);
      return this;
    }
docs: Setting up the factory to use database pool instead of creation a new
  instance of database connection each time.