Class OrientGraphFactoryV2
java.lang.Object
com.tinkerpop.blueprints.impls.orient.OrientGraphFactoryV2
Basic implementation of an Orient Graph factory that supports new OrientDB v 3.0 capabilities
- Author:
- Luigi Dell'Aquila
-
Constructor Summary
ConstructorsConstructorDescriptionOrientGraphFactoryV2(OrientDB orientDB, String dbName, String username, String password) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes all pooled databases and clear the pool.voiddrop()Drops current database if such one exists.booleanexists()Check if the database with path given to the factory exists.getNoTx()Gets non transactional graph with the database from pool if pool is configured.getTx()Gets transactional graph with the database from pool if pool is configured.
-
Constructor Details
-
OrientGraphFactoryV2
- Parameters:
orientDB-dbName-username-password-
-
-
Method Details
-
close
public void close()Closes all pooled databases and clear the pool. -
drop
public void drop()Drops current database if such one exists. -
getTx
Gets transactional graph with the database from pool if pool is configured. Otherwise creates a graph with new db instance. The Graph instance inherits the factory's configuration.- Returns:
- transactional graph
-
getNoTx
Gets non transactional graph with the database from pool if pool is configured. Otherwise creates a graph with new db instance. The Graph instance inherits the factory's configuration.- Returns:
- non transactional graph
-
exists
public boolean exists()Check if the database with path given to the factory exists.this api can be used only in embedded mode, and has no need of authentication.
- Returns:
- true if database is exists
-