Package org.apache.ojb.otm.lock.map

Examples of org.apache.ojb.otm.lock.map.LockMap


    public void ensureLock(Identity oid, Transaction tx, int lock,
                           PersistenceBroker pb)
        throws LockingException
    {
        LockMap lockMap = tx.getKit().getLockMap();
        ObjectLock objectLock = lockMap.getLock(oid);
        TransactionIsolation isolation;

        isolation = IsolationFactory.getIsolationLevel(pb, objectLock);

        if (lock == LockType.READ_LOCK)
View Full Code Here


        }
    }

    public int getLockHeld(Identity oid, Transaction tx)
    {
        LockMap lockMap = tx.getKit().getLockMap();
        ObjectLock lock = lockMap.getLock(oid);

        int lockHeld = LockType.NO_LOCK;
        if (tx.equals(lock.getWriter()))
        {
            lockHeld = LockType.WRITE_LOCK;
View Full Code Here

        return lockHeld;
    }

    public void releaseLock(Identity oid, Transaction tx)
    {
        LockMap lockMap = tx.getKit().getLockMap();

        ObjectLock objectLock = lockMap.getLock(oid);
        objectLock.releaseLock(tx);
    }
View Full Code Here

    public void ensureLock(Identity oid, Transaction tx, int lock,
                           PersistenceBroker pb)
        throws LockingException
    {
        LockMap lockMap = tx.getKit().getLockMap();
        ObjectLock objectLock = lockMap.getLock(oid);
        TransactionIsolation isolation;

        isolation = IsolationFactory.getIsolationLevel(pb, objectLock);

        if (lock == LockType.READ_LOCK)
View Full Code Here

        }
    }

    public int getLockHeld(Identity oid, Transaction tx)
    {
        LockMap lockMap = tx.getKit().getLockMap();
        ObjectLock lock = lockMap.getLock(oid);

        int lockHeld = LockType.NO_LOCK;
        if (tx.equals(lock.getWriter()))
        {
            lockHeld = LockType.WRITE_LOCK;
View Full Code Here

        return lockHeld;
    }

    public void releaseLock(Identity oid, Transaction tx)
    {
        LockMap lockMap = tx.getKit().getLockMap();

        ObjectLock objectLock = lockMap.getLock(oid);
        objectLock.releaseLock(tx);
    }
View Full Code Here

TOP

Related Classes of org.apache.ojb.otm.lock.map.LockMap

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.