Search in sources :

Example 1 with NullStatsReceiver

use of com.twitter.finagle.stats.NullStatsReceiver in project distributedlog by twitter.

the class DistributedLogClientBuilder method buildClient.

DistributedLogClientImpl buildClient() {
    Preconditions.checkNotNull(_name, "No name provided.");
    Preconditions.checkNotNull(_clientId, "No client id provided.");
    Preconditions.checkNotNull(_routingServiceBuilder, "No routing service builder provided.");
    Preconditions.checkNotNull(_statsReceiver, "No stats receiver provided.");
    if (null == _streamStatsReceiver) {
        _streamStatsReceiver = new NullStatsReceiver();
    }
    RoutingService routingService = _routingServiceBuilder.statsReceiver(_statsReceiver.scope("routing")).build();
    DistributedLogClientImpl clientImpl = new DistributedLogClientImpl(_name, _clientId, routingService, _clientBuilder, _clientConfig, _statsReceiver, _streamStatsReceiver, _regionResolver, _enableRegionStats);
    routingService.startService();
    clientImpl.handshake();
    return clientImpl;
}
Also used : RegionsRoutingService(com.twitter.distributedlog.client.routing.RegionsRoutingService) RoutingService(com.twitter.distributedlog.client.routing.RoutingService) NullStatsReceiver(com.twitter.finagle.stats.NullStatsReceiver) DistributedLogClientImpl(com.twitter.distributedlog.client.DistributedLogClientImpl)

Aggregations

DistributedLogClientImpl (com.twitter.distributedlog.client.DistributedLogClientImpl)1 RegionsRoutingService (com.twitter.distributedlog.client.routing.RegionsRoutingService)1 RoutingService (com.twitter.distributedlog.client.routing.RoutingService)1 NullStatsReceiver (com.twitter.finagle.stats.NullStatsReceiver)1