Package org.agilewiki.jfile.block

Examples of org.agilewiki.jfile.block.LTBlock


        (new SetActor("helloWorldTransaction")).send(future, transactionActorJid);
        (new IAdd(-1)).send(future, transactionListJid);
        transactionActorJid = (EvaluatorActorJid) (new IGet(-1)).send(future, transactionListJid);
        (new SetActor("helloWorldTransaction")).send(future, transactionActorJid);

        Block block = new LTBlock();
        block.setRootJid(rj);
        long timestamp = System.currentTimeMillis();
        block.setTimestamp(timestamp);
        (new ForcedWriteRootJid(block)).send(future, jFile);

        (new ProcessBlock(block)).send(future, transactionProcessor);

        jFile.close();
View Full Code Here


                StandardOpenOption.CREATE);

        RootJid rj = new RootJid();
        rj.initialize(mailbox, db);
        (new SetActor("helloWorldTransaction")).send(future, rj);
        Block block = new LTBlock();
        block.setRootJid(rj);
        long timestamp = System.currentTimeMillis();
        block.setTimestamp(timestamp);
        (new ForcedWriteRootJid(block)).send(future, jFile);

        (new ProcessBlock(block)).send(future, transactionProcessor);

        jFile.close();
View Full Code Here

                StandardOpenOption.WRITE,
                StandardOpenOption.CREATE);

        RootJid rj = new RootJid();
        rj.initialize(mailbox, factory);
        Block block = new LTBlock();
        block.setRootJid(rj);
        long timestamp = System.currentTimeMillis();
        block.setTimestamp(timestamp);
        (new ForcedWriteRootJid(block)).send(future, jFile);
        assertEquals(12L, block.getCurrentPosition());

        Block block2 = new LTBlock();
        (new ReadRootJid(block2)).send(future, jFile);
        RootJid rj2 = block2.getRootJid(mailbox, factory);
        assertNotNull(rj2);
        long timestamp2 = block2.getTimestamp();
        assertEquals(timestamp, timestamp2);

        (new ReadRootJid(block2)).send(future, jFile);
        rj2 = block2.getRootJid(mailbox, factory);
        assertNull(rj2);

        jFile.fileChannel.close();
        mailboxFactory.close();
    }
View Full Code Here

TOP

Related Classes of org.agilewiki.jfile.block.LTBlock

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.