Package org.neo4j.kernel.impl.core

Examples of org.neo4j.kernel.impl.core.TransactionState


    @Override
    public void acquireLock(LockType lockType, PropertyContainer element) {
        TransactionImpl tx = getCurrentTransaction();
        if (tx==null) return; // no lock taken without external tx
        TransactionState state = tx.getState();
        switch (lockType) {
            case READ:
                state.acquireReadLock(element);
                break;
            case WRITE:
                state.acquireWriteLock(element);
                break;
            default: throw new IllegalStateException("Unknown lock type "+lockType);
        }
    }
View Full Code Here


    @Override
    public TransactionState getTransactionState() {
        try
        {
            TransactionState state = states.get( getTransaction() );
            return state != null ? state : TransactionState.NO_STATE;
        }
        catch ( SystemException e )
        {
            throw new RuntimeException( e );
View Full Code Here

TOP

Related Classes of org.neo4j.kernel.impl.core.TransactionState

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.