Examples of checkPoint()


Examples of org.jpos.transaction.Context.checkPoint()

public class Trace implements AbortParticipant, Configurable {
    String trace;
    public int prepare (long id, Serializable o) {
        Context ctx = (Context) o;
        ctx.checkPoint ("prepare:" + trace);
        return PREPARED | READONLY;
    }
    public void commit (long id, Serializable o) {
        Context ctx = (Context) o;
        ctx.checkPoint ("commit:" + trace);
View Full Code Here

Examples of org.jpos.util.Profiler.checkPoint()

        String s = "The quick brown fox jumped over the lazy dog";
        Profiler prof = new Profiler ();
        for (int i=0; i<COUNT; i++) {
            sp.out ("testMultiKeyLoad_Key" + Integer.toString (i), s);
            if (i % 100 == 0)
                prof.checkPoint ("out " + i);
        }
        // prof.dump (System.err, "MultiKeyLoad out >");
        prof = new Profiler ();
        for (int i=0; i<COUNT; i++) {
            assertTrue (s.equals (sp.in ("testMultiKeyLoad_Key" + Integer.toString (i))));
View Full Code Here

Examples of org.odmg.Transaction.checkpoint()

        ProductGroup pg1 = new ProductGroup();
        pg1.setName("BatchModeTest ProductGroup #1");
        database.makePersistent(pg1);

        tx.checkpoint();

        Article a1 = Article.createInstance();
        a1.setArticleName("BatchModeTest Article #1");
        a1.setProductGroup(pg1);
        pg1.addArticle(a1);
View Full Code Here

Examples of org.w3c.jigsaw.http.httpd.checkpoint()

        System.out.println("*** Checkpoint ("+
               server.getIdentifier()+
               ") at "+
               checkpoint);
    if (alive && getFlushConfiguration() )
        server.checkpoint();
    if (alive && getFlushLog()) {
        Logger logger = ((httpd)getServer()).getLogger();
        if ( logger != null)
      logger.sync();
    }
View Full Code Here

Examples of ptolemy.backtrack.Rollbackable.$GET$CHECKPOINT()

    private void _checkpoint(HashMap<Checkpoint, Long> handles,
            CompositeActor container) {
        Iterator entities = container.entityList(Rollbackable.class).iterator();
        while (entities.hasNext()) {
            Rollbackable entity = (Rollbackable) entities.next();
            Checkpoint checkpointObject = entity.$GET$CHECKPOINT();
            if (!handles.containsKey(checkpointObject)) {
                long handle = checkpointObject.createCheckpoint();
                handles.put(checkpointObject, Long.valueOf(handle));
            }
        }
View Full Code Here

Examples of ptolemy.backtrack.test.ptolemy.backtrack.test.array1.ArrayTest1.$GET$CHECKPOINT()

    /**
     * @param args
     */
    public static void main(String[] args) {
        ArrayTest1 test = new ArrayTest1();
        long handle = test.$GET$CHECKPOINT().createCheckpoint();
        test.modify();
        test.$GET$CHECKPOINT().rollback(handle, true);
        test.dump();
    }
}
View Full Code Here

Examples of ptolemy.backtrack.test.ptolemy.backtrack.test.random1.RandomTest1.$GET$CHECKPOINT()

    /**
     * @param args
     */
    public static void main(String[] args) {
        RandomTest1 test = new RandomTest1();
        long handle = test.$GET$CHECKPOINT().createCheckpoint();
        int[] buffer1 = test.generate();
        test.$GET$CHECKPOINT().rollback(handle, true);

        int[] buffer2 = test.generate();

View Full Code Here

Examples of ptolemy.backtrack.test.ptolemy.backtrack.test.test1.Test1.$GET$CHECKPOINT()

            objects.add(t1.getT());
            System.out.print(objects.indexOf(t1.getT()) + " ");

            t2.setT(t1);

            long handle3 = t2.$GET$CHECKPOINT().createCheckpoint();
            objects.add(t2.getT());
            System.out.print(objects.indexOf(t2.getT()) + " ");

            t2.getT().setT(null);
View Full Code Here

Examples of ptolemy.backtrack.util.java.util.Map.$GET$CHECKPOINT()

        // Test clear() function.
        for (int i = 0; i < iteration; i++) {
            map.put(new Integer(i), new Integer(iteration - i));
        }

        long handle1 = map.$GET$CHECKPOINT().createCheckpoint();
        map.clear();
        map.$GET$CHECKPOINT().rollback(handle1, true);
        System.out.println(map);

        // Test keySet() and clear() of the key set.
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.