Package org.neo4j.rest.graphdb.transaction

Examples of org.neo4j.rest.graphdb.transaction.RemoteCypherTransaction


    public void begin() throws NotSupportedException, SystemException {
        beginTx();
    }

    public org.neo4j.graphdb.Transaction beginTx() {
        RemoteCypherTransaction tx = cypherTransaction.get();
        if (tx != null && tx.isActive()) {
            tx.beginInner();
        } else {
            CypherTransaction newTx = restAPICypher.newCypherTransaction();
            tx = new RemoteCypherTransaction(newTx);
            cypherTransaction.set(tx);
        }
        return tx;
    }
View Full Code Here


        return tx;
    }

    @Override
    public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, RollbackException, SecurityException, SystemException {
        RemoteCypherTransaction tx = getRemoteCypherTransaction();
        tx.success();
        tx.close();
    }
View Full Code Here

    }

    @Override
    public int getStatus() throws SystemException {
        RemoteCypherTransaction tx = getRemoteCypherTransaction();
        if (tx == null || !tx.isActive()) return Status.STATUS_NO_TRANSACTION;
        return tx.getStatus();
    }
View Full Code Here

        return this;
    }

    @Override
    public void rollback() throws IllegalStateException, SecurityException, SystemException {
        RemoteCypherTransaction tx = getRemoteCypherTransaction();
        if (tx!=null) {
            tx.failure();
            tx.close();
        }
    }
View Full Code Here

    public void resume(Transaction tx) throws IllegalStateException, InvalidTransactionException, SystemException {
        // todo we could implement suspend
    }

    public boolean isActive() {
        RemoteCypherTransaction tx = getRemoteCypherTransaction();
        return tx !=null && tx.isActive();
    }
View Full Code Here

TOP

Related Classes of org.neo4j.rest.graphdb.transaction.RemoteCypherTransaction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.