Package org.agilewiki.jfile

Examples of org.agilewiki.jfile.JFile


        StatelessDB db = new StatelessDB(mailboxFactory, factory, directoryPath);
        db.clearDirectory();
        TransactionProcessor transactionProcessor = new TransactionProcessor();
        transactionProcessor.initialize(mailbox, db);

        JFile jFile = new JFile();
        jFile.initialize(mailbox, factory);
        String ts = (new DateTime()).toString("yyyy-MM-dd_HH-mm-ss_SSS");
        Path path = directoryPath.resolve(ts + ".jalog");
        System.out.println(path.toAbsolutePath());
        jFile.open(
                path,
                StandardOpenOption.READ,
                StandardOpenOption.WRITE,
                StandardOpenOption.CREATE);

        RootJid rj = new RootJid();
        rj.initialize(mailbox, db);
        (new SetActor(JFileFactories.EVALUATER_LIST_JID_TYPE)).send(future, rj);
        EvaluatorListJid transactionListJid = (EvaluatorListJid) GetActor.req.send(future, rj);

        (new IAdd(-1)).send(future, transactionListJid);
        EvaluatorActorJid transactionActorJid = (EvaluatorActorJid) (new IGet(-1)).send(future, transactionListJid);
        (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();
        mailboxFactory.close();
    }
View Full Code Here


        StatelessDB db = new StatelessDB(mailboxFactory, factory, directoryPath);
        db.clearDirectory();
        TransactionProcessor transactionProcessor = new TransactionProcessor();
        transactionProcessor.initialize(mailbox, db);

        JFile jFile = new JFile();
        jFile.initialize(mailbox, factory);
        String ts = (new DateTime()).toString("yyyy-MM-dd_HH-mm-ss_SSS");
        Path path = directoryPath.resolve(ts + ".jalog");
        System.out.println(path.toAbsolutePath());
        jFile.open(
                path,
                StandardOpenOption.READ,
                StandardOpenOption.WRITE,
                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();
        mailboxFactory.close();
    }
View Full Code Here

    @Override
    public void openDbFile(int logReaderMaxSize, RP rp)
            throws Exception {
        maxSize = logReaderMaxSize;
        if (dbFile == null) {
            dbFile = new JFile();
            dbFile.initialize(getMailboxFactory().createAsyncMailbox());
        }
        Path dbPath = directoryPath.resolve("imdb.jadb");
        dbFile.open(
                dbPath,
View Full Code Here

TOP

Related Classes of org.agilewiki.jfile.JFile

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.