Search in sources :

Example 1 with AbstractOnDemandSender

use of com.questdb.net.ha.mcast.AbstractOnDemandSender in project questdb by bluestreak01.

the class MulticastTest method assertMulticast.

private void assertMulticast() throws JournalNetworkException, InterruptedException {
    AbstractOnDemandSender sender = new OnDemandAddressSender(new ServerConfig(), 120, 150, 0);
    sender.start();
    Thread.sleep(1000L);
    OnDemandAddressPoller poller = new OnDemandAddressPoller(new ClientConfig(), 150, 120);
    ServerNode address = poller.poll(2, 500, TimeUnit.MILLISECONDS);
    Assert.assertNotNull(address);
    sender.halt();
}
Also used : ServerConfig(com.questdb.net.ha.config.ServerConfig) AbstractOnDemandSender(com.questdb.net.ha.mcast.AbstractOnDemandSender) OnDemandAddressSender(com.questdb.net.ha.mcast.OnDemandAddressSender) OnDemandAddressPoller(com.questdb.net.ha.mcast.OnDemandAddressPoller) ClientConfig(com.questdb.net.ha.config.ClientConfig) ServerNode(com.questdb.net.ha.config.ServerNode)

Aggregations

ClientConfig (com.questdb.net.ha.config.ClientConfig)1 ServerConfig (com.questdb.net.ha.config.ServerConfig)1 ServerNode (com.questdb.net.ha.config.ServerNode)1 AbstractOnDemandSender (com.questdb.net.ha.mcast.AbstractOnDemandSender)1 OnDemandAddressPoller (com.questdb.net.ha.mcast.OnDemandAddressPoller)1 OnDemandAddressSender (com.questdb.net.ha.mcast.OnDemandAddressSender)1