use of com.questdb.net.ha.comsumer.JournalSymbolTableConsumer in project questdb by bluestreak01.
the class PartitionTest method syncSymbolTables.
private void syncSymbolTables() throws JournalNetworkException {
JournalClientStateProducer sp = new JournalClientStateProducer();
JournalClientStateConsumer sc = new JournalClientStateConsumer();
sp.write(channel, new IndexedJournal(0, slave));
sc.read(channel);
JournalSymbolTableProducer p = new JournalSymbolTableProducer(master);
JournalSymbolTableConsumer c = new JournalSymbolTableConsumer(slave);
p.configure(master.find(sc.getValue().getTxn(), sc.getValue().getTxPin()));
p.write(channel);
c.read(channel);
}
use of com.questdb.net.ha.comsumer.JournalSymbolTableConsumer in project questdb by bluestreak01.
the class JournalSymbolTableTest method setUp.
@Before
public void setUp() throws Exception {
origin = getFactory().writer(Quote.class, "origin");
master = getFactory().writer(Quote.class, "master");
slave = getFactory().writer(Quote.class, "slave");
channel = new MockByteChannel();
journalSymbolTableProducer = new JournalSymbolTableProducer(master);
journalSymbolTableConsumer = new JournalSymbolTableConsumer(slave);
origin.append(new Quote().setSym("AB").setEx("EX1").setMode("M1"));
origin.append(new Quote().setSym("CD").setEx("EX2").setMode("M2"));
origin.append(new Quote().setSym("EF").setEx("EX3").setMode("M2"));
origin.append(new Quote().setSym("GH").setEx("EX3").setMode("M3"));
}
use of com.questdb.net.ha.comsumer.JournalSymbolTableConsumer in project questdb by bluestreak01.
the class LinkedJournalSymbolTableTest method setUp.
@Before
public void setUp() throws Exception {
origin = getFactory().writer(RDFNode.class, "origin");
master = getFactory().writer(RDFNode.class, "master");
slave = getFactory().writer(RDFNode.class, "slave");
channel = new MockByteChannel();
journalSymbolTableProducer = new JournalSymbolTableProducer(master);
journalSymbolTableConsumer = new JournalSymbolTableConsumer(slave);
origin.append(new RDFNode().setObj("O1").setSubj("S1"));
origin.append(new RDFNode().setObj("O2").setSubj("S1"));
origin.append(new RDFNode().setObj("O3").setSubj("S2"));
origin.append(new RDFNode().setObj("S2").setSubj("S1"));
}
Aggregations