Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.Identity


        return ignore(isolationLevel) ? true : lm.readLock(tx.getGUID(), oid, isolationLevel);
    }

    public boolean writeLock(TransactionImpl tx, Object obj)
    {
        Identity oid = tx.getBroker().serviceIdentity().buildIdentity(obj);
        return writeLock(tx, oid, obj);
    }
View Full Code Here


        return ignore(isolationLevel) ? true : lm.writeLock(tx.getGUID(), oid, isolationLevel);
    }

    public boolean upgradeLock(TransactionImpl tx, Object obj)
    {
        Identity oid = tx.getBroker().serviceIdentity().buildIdentity(obj);
        return upgradeLock(tx, oid, obj);
    }
View Full Code Here

        return ignore(isolationLevel) ? true : lm.upgradeLock(tx.getGUID(), oid, isolationLevel);
    }

    public boolean releaseLock(TransactionImpl tx, Object obj)
    {
        Identity oid = tx.getBroker().serviceIdentity().buildIdentity(obj);
        return releaseLock(tx, oid, obj);
    }
View Full Code Here

        return lm.releaseLock(tx.getGUID(), oid);
    }

    public boolean checkRead(TransactionImpl tx, Object obj)
    {
        Identity oid = tx.getBroker().serviceIdentity().buildIdentity(obj);
        return checkRead(tx, oid, obj);
    }
View Full Code Here

        return lm.hasRead(tx.getGUID(), oid);
    }

    public boolean checkWrite(TransactionImpl tx, Object obj)
    {
        Identity oid = tx.getBroker().serviceIdentity().buildIdentity(obj);
        return checkWrite(tx, oid, obj);
    }
View Full Code Here

            for (Iterator it = colProxy.iterator(); it.hasNext(); )
            {
                Object relUserObj;
                Object relCacheObj = it.next();
                Identity relOid = new Identity(relCacheObj, _pb);
                ContextEntry entry;

                list.add(relOid);
                entry = (ContextEntry) _objects.get(relOid);
                if (entry != null)
View Full Code Here

     * aquires a readlock for transaction tx on object obj.
     * Returns true if successful, else false.
     */
    public synchronized boolean readLock(TransactionImpl tx, Object obj)
    {
        if (log.isDebugEnabled()) log.debug("LM.readLock(tx-" + tx.getGUID() + ", " + new Identity(obj, tx.getBroker()).toString() + ")");
        LockStrategy lockStrategy = LockStrategyFactory.getStrategyFor(obj);
        return lockStrategy.readLock(tx, obj);
    }
View Full Code Here

     * aquires a writelock for transaction tx on object obj.
     * Returns true if successful, else false.
     */
    public synchronized boolean writeLock(TransactionImpl tx, Object obj)
    {
        if (log.isDebugEnabled()) log.debug("LM.writeLock(tx-" + tx.getGUID() + ", " + new Identity(obj, tx.getBroker()).toString() + ")");
        LockStrategy lockStrategy = LockStrategyFactory.getStrategyFor(obj);
        return lockStrategy.writeLock(tx, obj);
    }
View Full Code Here

     * If no readlock existed a writelock is acquired anyway.
     * Returns true if successful, else false.
     */
    public synchronized boolean upgradeLock(TransactionImpl tx, Object obj)
    {
        if (log.isDebugEnabled()) log.debug("LM.upgradeLock(tx-" + tx.getGUID() + ", " + new Identity(obj, tx.getBroker()).toString() + ")");
        LockStrategy lockStrategy = LockStrategyFactory.getStrategyFor(obj);
        return lockStrategy.upgradeLock(tx, obj);
    }
View Full Code Here

     * releases a lock for transaction tx on object obj.
     * Returns true if successful, else false.
     */
    public synchronized boolean releaseLock(TransactionImpl tx, Object obj)
    {
        if (log.isDebugEnabled()) log.debug("LM.releaseLock(tx-" + tx.getGUID() + ", " + new Identity(obj, tx.getBroker()).toString() + ")");
        LockStrategy lockStrategy = LockStrategyFactory.getStrategyFor(obj);
        return lockStrategy.releaseLock(tx, obj);
    }
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.Identity

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.