Examples of writeF1()


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

        pm.currentTransaction().begin();
        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();
        }
View Full Code Here

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

        //test concurrent loading in the same transaction
        BasicA ba = ((BasicA) pm.getObjectById(oids[NB_OBJECT-1], false));
        ba.readF1_F2();
       
        ba = ((BasicA) pm.getObjectById(oids[threadId], false));
        ba.writeF1(ba.readF1() + "modifiedBy" + threadId);
       
        for(int j=0; j<NB_MODIF; j++) {
            // Choose an object: alternativly on each side
            // of the threadId
            int id = j;
View Full Code Here

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

                id = Math.max(0, threadId - j);
            }
            ba = ((BasicA) pm.getObjectById(oids[id], false));
            s[id].P();
            try {
                ba.writeF1(ba.readF1() + "modifiedBy" + threadId);
            } finally {
                s[id].V();
            }
        }
       
View Full Code Here

Examples of org.objectweb.speedo.pobjects.userid.LinkedIntUserId.writeF1()

        oid = Alea.rand(0, sctx.dbSize - 1);
        oUserId = (LinkedIntUserId) pm.getObjectById(sctx.oids[oid], false);
        if (debug) {
          logger.log(BasicLevel.DEBUG, "Writing object " + oid);
        }
        oUserId.writeF1(sctx.nbWritePersistent, f1);
        Assert.assertEquals("Write error", f1, oUserId.getF1());
      }
      commitTx(pm, task, threadId, txId);
      res.endTest();
    } catch (JDOFatalException e) {
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.