Search in sources :

Example 1 with JournalClientStateProducer

use of com.questdb.net.ha.producer.JournalClientStateProducer 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);
}
Also used : JournalClientStateProducer(com.questdb.net.ha.producer.JournalClientStateProducer) JournalClientStateConsumer(com.questdb.net.ha.comsumer.JournalClientStateConsumer) IndexedJournal(com.questdb.net.ha.model.IndexedJournal) JournalSymbolTableProducer(com.questdb.net.ha.producer.JournalSymbolTableProducer) JournalSymbolTableConsumer(com.questdb.net.ha.comsumer.JournalSymbolTableConsumer)

Example 2 with JournalClientStateProducer

use of com.questdb.net.ha.producer.JournalClientStateProducer in project questdb by bluestreak01.

the class AbstractJournalTest method setUp.

@Before
public void setUp() throws Exception {
    origin = getFactory().writer(Quote.class, "origin");
    slave = getFactory().writer(Quote.class, "slave");
    master = getFactory().writer(Quote.class, "master");
    journalClientStateProducer = new JournalClientStateProducer();
    journalClientStateConsumer = new JournalClientStateConsumer();
    this.masterReader = getFactory().reader(Quote.class, "master");
    journalDeltaProducer = new JournalDeltaProducer(masterReader);
    journalDeltaConsumer = new JournalDeltaConsumer(slave);
    channel = new MockByteChannel();
}
Also used : Quote(com.questdb.model.Quote) JournalClientStateProducer(com.questdb.net.ha.producer.JournalClientStateProducer) JournalDeltaProducer(com.questdb.net.ha.producer.JournalDeltaProducer) JournalDeltaConsumer(com.questdb.net.ha.comsumer.JournalDeltaConsumer) JournalClientStateConsumer(com.questdb.net.ha.comsumer.JournalClientStateConsumer) Before(org.junit.Before)

Aggregations

JournalClientStateConsumer (com.questdb.net.ha.comsumer.JournalClientStateConsumer)2 JournalClientStateProducer (com.questdb.net.ha.producer.JournalClientStateProducer)2 Quote (com.questdb.model.Quote)1 JournalDeltaConsumer (com.questdb.net.ha.comsumer.JournalDeltaConsumer)1 JournalSymbolTableConsumer (com.questdb.net.ha.comsumer.JournalSymbolTableConsumer)1 IndexedJournal (com.questdb.net.ha.model.IndexedJournal)1 JournalDeltaProducer (com.questdb.net.ha.producer.JournalDeltaProducer)1 JournalSymbolTableProducer (com.questdb.net.ha.producer.JournalSymbolTableProducer)1 Before (org.junit.Before)1