Search in sources :

Example 1 with ClientChannelFactory

use of com.navercorp.pinpoint.rpc.client.ClientChannelFactory in project pinpoint by naver.

the class SpanStatChannelFactoryProvider method get.

@Override
public ChannelFactory get() {
    int workerCount = 0;
    if ("TCP".equalsIgnoreCase(thriftTransportConfig.getSpanDataSenderTransportType())) {
        workerCount++;
    }
    if ("TCP".equalsIgnoreCase(thriftTransportConfig.getStatDataSenderTransportType())) {
        workerCount++;
    }
    if (workerCount == 0) {
        return null;
    } else {
        Timer timer = connectTimerProvider.get();
        final ClientChannelFactory clientChannelFactory = new ClientChannelFactory();
        return clientChannelFactory.createChannelFactory(1, workerCount, timer);
    }
}
Also used : Timer(org.jboss.netty.util.Timer) ClientChannelFactory(com.navercorp.pinpoint.rpc.client.ClientChannelFactory)

Aggregations

ClientChannelFactory (com.navercorp.pinpoint.rpc.client.ClientChannelFactory)1 Timer (org.jboss.netty.util.Timer)1