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();
}