Package org.apache.ojb.odmg

Examples of org.apache.ojb.odmg.TransactionImpl.lock()


        {
            TransactionImpl tx = TxManagerFactory.instance().getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.lock(this, Transaction.WRITE);
                tx.lock(entry, Transaction.WRITE);
                tx.lock(key, Transaction.READ);
                tx.lock(value, Transaction.READ);
            }
            return null;
        }
View Full Code Here


            TransactionImpl tx = TxManagerFactory.instance().getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.lock(this, Transaction.WRITE);
                tx.lock(entry, Transaction.WRITE);
                tx.lock(key, Transaction.READ);
                tx.lock(value, Transaction.READ);
            }
            return null;
        }
        else
View Full Code Here

            if ((tx != null) && (tx.isOpen()))
            {
                tx.lock(this, Transaction.WRITE);
                tx.lock(entry, Transaction.WRITE);
                tx.lock(key, Transaction.READ);
                tx.lock(value, Transaction.READ);
            }
            return null;
        }
        else
        {
View Full Code Here

            elements.add(entry);
            // if we are in a transaction: get locks !
            TransactionImpl tx = getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.lock(this, Transaction.WRITE);
                tx.lock(entry, Transaction.WRITE);
                tx.lock(o, Transaction.READ);
            }
            return true;
        }
View Full Code Here

            // if we are in a transaction: get locks !
            TransactionImpl tx = getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.lock(this, Transaction.WRITE);
                tx.lock(entry, Transaction.WRITE);
                tx.lock(o, Transaction.READ);
            }
            return true;
        }
        else
View Full Code Here

            TransactionImpl tx = getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.lock(this, Transaction.WRITE);
                tx.lock(entry, Transaction.WRITE);
                tx.lock(o, Transaction.READ);
            }
            return true;
        }
        else
        {
View Full Code Here

        this.size++;
        // if we are in a transaction: acquire locks !
        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (checkForOpenTransaction(tx))
        {
            tx.lock(this, Transaction.WRITE);
            tx.lock(entry, Transaction.WRITE);
            tx.lock(element, Transaction.READ);
            entry.prepareForPersistency(tx.getBroker());
        }
View Full Code Here

        // if we are in a transaction: acquire locks !
        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (checkForOpenTransaction(tx))
        {
            tx.lock(this, Transaction.WRITE);
            tx.lock(entry, Transaction.WRITE);
            tx.lock(element, Transaction.READ);
            entry.prepareForPersistency(tx.getBroker());
        }

        // changing the position markers of entries:
View Full Code Here

        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (checkForOpenTransaction(tx))
        {
            tx.lock(this, Transaction.WRITE);
            tx.lock(entry, Transaction.WRITE);
            tx.lock(element, Transaction.READ);
            entry.prepareForPersistency(tx.getBroker());
        }

        // changing the position markers of entries:
        int offset = 0;
View Full Code Here

            if ((tx != null) && (tx.isOpen()))
            {
                RuntimeObject rt = new RuntimeObject(this, tx);
                tx.lockAndRegister(rt, Transaction.WRITE, false);

                tx.lock(o, Transaction.READ);

                rt = new RuntimeObject(entry, tx, true);
                tx.lockAndRegister(rt, Transaction.WRITE, false);
            }
            return true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.