Examples of 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

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("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

Examples of org.agilewiki.jfile.JFile

    @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

Examples of org.commoncrawl.rpc.compiler.JFile

  final public JFile Input() throws ParseException {
    ArrayList<JFile> ilist = new ArrayList<JFile>();
    ArrayList<JRecord> rlist = new ArrayList<JRecord>();
    ArrayList<JService> serviceList = new ArrayList<JService>();
    JFile i;
    ArrayList<JRecord> l;
    JModule module;
    label_1: while (true) {
      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
        case INCLUDE_TKN:
          i = Include();
          ilist.add(i);
          break;
        case MODULE_TKN:
          module = Module();
          rlist.addAll(module.getRecords());
          serviceList.addAll(module.getServices());
          break;
        default:
          jj_la1[0] = jj_gen;
          jj_consume_token(-1);
          throw new ParseException();
      }
      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
        case MODULE_TKN:
        case INCLUDE_TKN:
          ;
          break;
        default:
          jj_la1[1] = jj_gen;
          break label_1;
      }
    }
    jj_consume_token(0);
    {
      if (true)
        return new JFile(curFileName, ilist, rlist, serviceList);
    }
    throw new Error("Missing return statement in function");
  }
View Full Code Here

Examples of org.commoncrawl.rpc.compiler.JFile

  final public JFile Include() throws ParseException {
    String fname;
    Token t;
    jj_consume_token(INCLUDE_TKN);
    t = jj_consume_token(CSTRING_TKN);
    JFile ret = null;
    fname = t.image.replaceAll("^\"", "").replaceAll("\"$", "");
    File file = new File(curDir, fname);
    String tmpDir = curDir;
    String tmpFile = curFileName;
    curDir = file.getParent();
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.