public GraphTransaction graphTransaction() { this.checkGraphNotClosed(); /* * NOTE: graph operations must be committed manually, * Maybe users need to auto open tinkerpop tx by readWrite(). */ this.tx.readWrite(); return this.tx.graphTransaction(); }
private void verifyOpened() { if (!this.isOpen()) { throw new HugeException("Transaction has not been opened"); } }
@Override protected TextBackendEntry convertEntry(BackendEntry backendEntry) { if (!(backendEntry instanceof TextBackendEntry)) { throw new HugeException("The entry '%s' is not TextBackendEntry", backendEntry); } return (TextBackendEntry) backendEntry; }
public void initEnv() { // Cost about 6s this.hugegraph.graphTransaction(); }
@Override public Transaction tx() { // Can't verifyPermission() here, will be called by rollbackAll() return this.hugegraph.tx(); }
@Override public HugeFeatures features() { // Can't verifyPermission() here, will be called by rollbackAll() return this.hugegraph.features(); }
@Override protected void doOpen() { this.schemaTransaction(); this.graphTransaction(); this.setOpened(); }
@Override public Variables variables() { return this.graph.variables(); }
@Override public Configuration configuration() { return this.graph.configuration(); }
public GraphTraversalSource traversal() { return this.hugegraph.traversal(); }
@Override public <C extends GraphComputer> C compute(Class<C> graphComputerClass) throws IllegalArgumentException { return this.graph.compute(graphComputerClass); }
@Override public String toString() { return this.graph.toString(); }
public GraphIndexTransaction(HugeGraph graph, BackendStore store) { super(graph, store); this.textAnalyzer = graph.analyzer(); assert this.textAnalyzer != null; }
public SchemaTransaction schemaTransaction() { this.checkGraphNotClosed(); /* * NOTE: each schema operation will be auto committed, * Don't need to open tinkerpop tx by readWrite() and commit manually. */ return this.tx.schemaTransaction(); }
public GraphTransaction openTransaction() { // Open a new one return this.openGraphTransaction(); }
private static HugeException incompatibleActionException( Action newAction, Action originAction) { return new HugeException("The action '%s' is incompatible with " + "action '%s'", newAction, originAction); }
@Override public Transaction tx() { return this.graph.tx(); }
@Override public HugeFeatures features() { return this.graph.features(); }
@Override public GraphComputer compute() throws IllegalArgumentException { return this.graph.compute(); }