Java Code Examples for com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx#shutdown()
The following examples show how to use
com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx#shutdown() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VSAPlugin.java From bjoern with GNU General Public License v3.0 | 6 votes |
@Override public void execute() throws Exception { OrientGraphNoTx graph = orientConnector.getNoTxGraphInstance(); VSA vsa = new VSA(); for (Function function : LookupOperations.getFunctions(graph)) { try { logger.info(function.toString()); vsa.performIntraProceduralVSA(function); } catch (Exception e) { logger.error("Error for function " + function + ": " + e.getMessage()); } } graph.shutdown(); }
Example 2
Source File: OrientMassiveInsertion.java From graphdb-benchmarks with Apache License 2.0 | 6 votes |
public OrientMassiveInsertion(final String url) { super(GraphDatabaseType.ORIENT_DB, null /* resultsPath */); OGlobalConfiguration.ENVIRONMENT_CONCURRENT.setValue(false); OrientGraphNoTx transactionlessGraph = new OrientGraphNoTx(url); for (int i = 0; i < NUMBER_OF_ORIENT_CLUSTERS; ++i) { transactionlessGraph.getVertexBaseType().addCluster("v_" + i); transactionlessGraph.getEdgeBaseType().addCluster("e_" + i); } transactionlessGraph.shutdown(); graph = new OGraphBatchInsertBasic(url); graph.setAverageEdgeNumberPerNode(AVERAGE_NUMBER_OF_EDGES_PER_NODE); graph.setEstimatedEntries(ESTIMATED_ENTRIES); graph.setIdPropertyName("nodeId"); graph.begin(); }
Example 3
Source File: FunctionExportPlugin.java From bjoern with GNU General Public License v3.0 | 5 votes |
@Override public void execute() throws Exception { OrientGraphNoTx graph = orientConnector.getNoTxGraphInstance(); Iterable<Vertex> functions = LookupOperations.getAllFunctions(graph); for (Vertex function : functions) { exportFunction(function); } graph.shutdown(); }
Example 4
Source File: AbstractDbRule.java From light with Apache License 2.0 | 5 votes |
protected String execSchemaCmd(Map<String, Object> data) { String result = ""; String script = (String) data.get("script"); OrientGraphNoTx graph = ServiceLocator.getInstance().getGraphNoTx(); try{ graph.command(new OCommandScript("sql", script)).execute(); } catch (Exception e) { logger.error("Exception:", e); result = e.getMessage(); } finally { graph.shutdown(); } return result; }