Examples of writeF2()


Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF2()

                switch(actions[j]) {
                case W_ACTION:
                  a.incF2();
                  break;
                case R_W_ACTION:
                  a.writeF2(a.readF2() + 1);
                  break;
                case MIXED_ACTION:
                    if (action == W_ACTION) {
                        a.incF2();
                        action = R_W_ACTION;
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF2()

                case MIXED_ACTION:
                    if (action == W_ACTION) {
                        a.incF2();
                        action = R_W_ACTION;
                    } else if (action == R_W_ACTION) {
                        a.writeF2(a.readF2() + 1);
                        action = W_ACTION;
                    }
                  break;
                }
                pm.currentTransaction().commit();
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF2()

    }
    public void test2thread1PMNoTx() {
        final PersistenceManager pm = pmf.getPersistenceManager();
        BasicA ba = new BasicA();
        ba.writeF1("test2thread1PMNoTx.thread1");
        ba.writeF2(2);
        pm.makePersistent(ba);
        final Object oid = pm.getObjectId(ba);
        Thread t = new Thread(
                new Runnable() {
                    public void run() {
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF2()

    public void test2thread1PMTx() {
        final PersistenceManager pm = pmf.getPersistenceManager();
        BasicA ba = new BasicA();
        ba.writeF1("test2thread1PM.thread1");
        ba.writeF2(1);
        pm.currentTransaction().begin();
        pm.makePersistent(ba);
        final Object oid = pm.getObjectId(ba);
        Thread t = new Thread(
                new Runnable() {
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF2()

                    public void run() {
                        try {
                            BasicA _ba = ((BasicA) pm.getObjectById(oid, false));
                            _ba.readF1_F2();
                            _ba.writeF1("test2thread1PM.thread2");
                            _ba.writeF2(2);
                            pm.currentTransaction().commit();
                        } catch (Exception e) {
                            e.printStackTrace();
                            fail(e.getMessage());
                        }
View Full Code Here

Examples of org.objectweb.speedo.pobjects.basic.BasicA.writeF2()

        final Object[] oids = new Object[NB_OBJECT];
        final Semaphore[] s = new Semaphore[NB_OBJECT];
        for(int i=0; i<NB_OBJECT; i++) {
            BasicA ba = new BasicA();
            ba.writeF1("testManyThreadConcurrentData_" + i);
            ba.writeF2(i);
            pm.makePersistent(ba);
            oids[i] = pm.getObjectId(ba);
            s[i] = new Semaphore();
        }
        pm.currentTransaction().commit();
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.