Search in sources :

Example 1 with BootstrapPullThread

use of com.linkedin.databus.client.BootstrapPullThread in project databus by linkedin.

the class RegistrationStatsInfo method initSourcesConn.

private void initSourcesConn(DatabusSourcesConnection sourcesConn) {
    if (null != sourcesConn) {
        RelayPullThread rp = sourcesConn.getRelayPullThread();
        BootstrapPullThread bp = sourcesConn.getBootstrapPullThread();
        GenericDispatcher<DatabusCombinedConsumer> rd = sourcesConn.getRelayDispatcher();
        GenericDispatcher<DatabusCombinedConsumer> bd = sourcesConn.getBootstrapDispatcher();
        if (null != rp) {
            setRelayPullerConnectionState(rp.getConnectionState().getStateId());
            if (null != rp.getComponentStatus())
                setRelayPullerComponentStatus(rp.getComponentStatus().getStatus());
            setCurrentRelay(rp.getCurentServer());
            setCandidateRelays(rp.getServers());
        }
        if (null != bp) {
            setBootstrapPullerConnectionState(bp.getConnectionState().getStateId());
            if (null != bp.getComponentStatus())
                setBootstrapPullerComponentStatus(bp.getComponentStatus().getStatus());
            setCurrentBootstrapServer(bp.getCurentServer());
            setCandidateBootstrapServers(bp.getServers());
        }
        if (null != rd) {
            if (null != rd.getComponentStatus())
                setRelayDispatcherComponentStatus(rd.getComponentStatus().getStatus());
            if (null != rd.getDispatcherState())
                setRelayDispatcherConnectionState(rd.getDispatcherState().getStateId());
        }
        if (null != bd) {
            if (null != bd.getComponentStatus())
                setBootstrapDispatcherComponentStatus(bd.getComponentStatus().getStatus());
            if (null != bd.getDispatcherState())
                setBootstrapDispatcherConnectionState(bd.getDispatcherState().getStateId());
        }
    }
}
Also used : RelayPullThread(com.linkedin.databus.client.RelayPullThread) BootstrapPullThread(com.linkedin.databus.client.BootstrapPullThread) DatabusCombinedConsumer(com.linkedin.databus.client.pub.DatabusCombinedConsumer)

Aggregations

BootstrapPullThread (com.linkedin.databus.client.BootstrapPullThread)1 RelayPullThread (com.linkedin.databus.client.RelayPullThread)1 DatabusCombinedConsumer (com.linkedin.databus.client.pub.DatabusCombinedConsumer)1