@Override public boolean isActive() { OTransaction tx = null; if (db.isActiveOnCurrentThread()) { tx = db.getTransaction(); } return tx != null && tx.isActive(); }
@Override protected void autoStartTransaction() { super.autoStartTransaction(); if (!autoStartTx) return; final OrientGraphContext context = getContext(true); if (context.rawGraph.getTransaction() instanceof OTransactionNoTx && context.rawGraph.getTransaction().getStatus() != TXSTATUS.BEGUN) { context.rawGraph.begin(); } }
checkArgument(!db.getTransaction().isActive(), "Nested DB TX!");
private void beginTransaction(final ODatabaseDocumentTx db) { db.begin(); if (txUseLog != null) db.getTransaction().setUsingLog(txUseLog); }
@SuppressWarnings("deprecation") @Override public void stopTransaction(final Conclusion conclusion) { final OrientGraphContext context = getContext(false); if (context == null) return; if (context.rawGraph.isClosed() || context.rawGraph.getTransaction() instanceof OTransactionNoTx || context.rawGraph.getTransaction().getStatus() != TXSTATUS.BEGUN) return; if (Conclusion.SUCCESS == conclusion) commit(); else rollback(); }
final OTransactionIndexChanges indexChanges = graph.getRawGraph().getTransaction().getIndexChanges(underlying.getName()); if (indexChanges != null) { if (indexChanges.containsChangesPerKey(keyTemp)) {
protected void commitAnyActiveTx(final String iOperation) { if (getRawGraph().getTransaction().isActive()) { // ASSURE PENDING TX IF ANY IS COMMITTED OLogManager .instance() .warn(this, "Committing the active transaction to %s. To avoid this behavior do it outside the transaction", iOperation); this.commit(); } }
return Collections.emptyList(); if (((OrientBaseGraph) graph).getRawGraph().getTransaction().isActive() )
@Override public void rollback() { if (tx) if (dbType == DB_TYPE.DOCUMENT) { final ODatabaseDocumentTx documentDatabase = pipeline.getDocumentDatabase(); if (documentDatabase.getTransaction().isActive()) documentDatabase.rollback(); } else pipeline.getGraphDatabase().rollback(); }
return Collections.emptyList(); OTransaction transaction = ((OrientBaseGraph) graph).getRawGraph().getTransaction(); if (transaction.isActive() && transaction.getEntryCount() > 0 || hasCustomPredicate()) {
if (!graph.getRawGraph().getTransaction().isActive()) { for (String fieldName : doc.fieldNames()) { final OPair<Direction, String> connection = getConnection(Direction.BOTH, fieldName);
@Override public void enableMassInsert() { OrientBaseGraph tx = unwrapCurrentGraph(); tx.getRawGraph().getTransaction().setUsingLog(false); tx.declareIntent(new OIntentMassiveInsert().setDisableHooks(true).setDisableValidation(true)); }
return Collections.emptyList(); if (((OrientBaseGraph) graph).getRawGraph().getTransaction().isActive() || hasCustomPredicate())
return Collections.emptyList(); if (((OrientBaseGraph) graph).getRawGraph().getTransaction().isActive() )
protected boolean checkDeletedInTx() { OrientBaseGraph curGraph = getGraph(); if (curGraph == null) return false; ORID id; if (getRecord() != null) id = getRecord().getIdentity(); else return false; final ORecordOperation oper = curGraph.getRawGraph().getTransaction().getRecordEntry(id); if (oper == null) return id.isTemporary(); else return oper.type == ORecordOperation.DELETED; }
boolean txActive = graph.getRawGraph().getTransaction().isActive(); try {
if (!documentDatabase.getTransaction().isActive()) {