Package org.neo4j.smack.pipeline.database

Examples of org.neo4j.smack.pipeline.database.TransactionRegistry


        }
    }

    private void start() {
        for (int i = 0; i < NUM_DATABASE_WORK_EXECUTORS; i++) {
            TransactionRegistry txs = new TransactionRegistry(database);
            ThreadTransactionManagement txManage = new ThreadTransactionManagement(txs);
            DatabaseWorkPipeline worker = new DatabaseWorkPipeline(database, txs, txManage, exceptionHandler);
            workers[i] = worker;
            worker.start();
        }
View Full Code Here


    private static final UrlReverseLookerUpper url = new UrlReverseLookerUpper();
   
    @POST
    @Path("")
    public void createTransaction(Invocation req, Output res) {
        TransactionRegistry txs = req.getTxRegistry();
        Long txId = req.getTxId();
       
        txs.createTransaction(txId);
       
        res.createdAt(url.reverseTransaction(txId));
    }
View Full Code Here

    @PUT
    @Path("/{tx_id}/state")
    @Transactional
    @DeserializeWith(TransactionStateDeserializationStrategy.class)
    public void setTransactionState(Invocation req, Output res) throws Exception {
        TransactionRegistry txs = req.getTxRegistry();
       
        switch(req.<TransactionStateDeserialization>getContent()) {
        case COMMITTED:
            txs.commitCurrentTransaction();
            break;
        case ROLLED_BACK:
            txs.rollbackCurrentTransaction();
            break;
        default:
            throw new IllegalArgumentException("Only COMMITTED and ROLLED_BACK transaction states can be set.");
        }
       
View Full Code Here

TOP

Related Classes of org.neo4j.smack.pipeline.database.TransactionRegistry

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.