Search in sources :

Example 1 with ClientConfig

use of com.twitter.distributedlog.client.ClientConfig in project distributedlog by twitter.

the class TestProxyClientManager method createProxyClientManager.

private static ProxyClientManager createProxyClientManager(ProxyClient.Builder builder, HostProvider hostProvider, long periodicHandshakeIntervalMs) {
    ClientConfig clientConfig = new ClientConfig();
    clientConfig.setPeriodicHandshakeIntervalMs(periodicHandshakeIntervalMs);
    clientConfig.setPeriodicOwnershipSyncIntervalMs(-1);
    HashedWheelTimer dlTimer = new HashedWheelTimer(new ThreadFactoryBuilder().setNameFormat("TestProxyClientManager-timer-%d").build(), clientConfig.getRedirectBackoffStartMs(), TimeUnit.MILLISECONDS);
    return new ProxyClientManager(clientConfig, builder, dlTimer, hostProvider, new ClientStats(NullStatsReceiver.get(), false, new DefaultRegionResolver()));
}
Also used : ClientStats(com.twitter.distributedlog.client.stats.ClientStats) ThreadFactoryBuilder(com.google.common.util.concurrent.ThreadFactoryBuilder) HashedWheelTimer(org.jboss.netty.util.HashedWheelTimer) DefaultRegionResolver(com.twitter.distributedlog.client.resolver.DefaultRegionResolver) ClientConfig(com.twitter.distributedlog.client.ClientConfig)

Aggregations

ThreadFactoryBuilder (com.google.common.util.concurrent.ThreadFactoryBuilder)1 ClientConfig (com.twitter.distributedlog.client.ClientConfig)1 DefaultRegionResolver (com.twitter.distributedlog.client.resolver.DefaultRegionResolver)1 ClientStats (com.twitter.distributedlog.client.stats.ClientStats)1 HashedWheelTimer (org.jboss.netty.util.HashedWheelTimer)1