org.jboss.netty.util.HashedWheelTimer Java Examples

The following examples show how to use org.jboss.netty.util.HashedWheelTimer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: distributedlog   Author: apache   File: StreamFactoryImpl.java    License: Apache License 2.0 6 votes vote down vote up
public StreamFactoryImpl(String clientId,
    StreamOpStats streamOpStats,
    ServerConfiguration serverConfig,
    DistributedLogConfiguration dlConfig,
    FeatureProvider featureProvider,
    StreamConfigProvider streamConfigProvider,
    StreamPartitionConverter streamPartitionConverter,
    Namespace dlNamespace,
    OrderedScheduler scheduler,
    FatalErrorHandler fatalErrorHandler,
    HashedWheelTimer requestTimer) {

    this.clientId = clientId;
    this.streamOpStats = streamOpStats;
    this.serverConfig = serverConfig;
    this.dlConfig = dlConfig;
    this.featureProvider = featureProvider;
    this.streamConfigProvider = streamConfigProvider;
    this.streamPartitionConverter = streamPartitionConverter;
    this.dlNamespace = dlNamespace;
    this.scheduler = scheduler;
    this.fatalErrorHandler = fatalErrorHandler;
    this.requestTimer = requestTimer;
    this.futureTimer = new com.twitter.finagle.util.HashedWheelTimer(requestTimer);
}
 
Example #2
Source Project: distributedlog   Author: twitter   File: BookKeeperClient.java    License: Apache License 2.0 6 votes vote down vote up
BookKeeperClient(DistributedLogConfiguration conf,
                 String name,
                 String zkServers,
                 ZooKeeperClient zkc,
                 String ledgersPath,
                 ClientSocketChannelFactory channelFactory,
                 HashedWheelTimer requestTimer,
                 StatsLogger statsLogger,
                 Optional<FeatureProvider> featureProvider) {
    this.conf = conf;
    this.name = name;
    this.zkServers = zkServers;
    this.ledgersPath = ledgersPath;
    this.passwd = conf.getBKDigestPW().getBytes(UTF_8);
    this.channelFactory = channelFactory;
    this.requestTimer = requestTimer;
    this.statsLogger = statsLogger;
    this.featureProvider = featureProvider;
    this.ownZK = null == zkc;
    if (null != zkc) {
        // reference the passing zookeeper client
        this.zkc = zkc;
    }
}
 
Example #3
Source Project: distributedlog   Author: twitter   File: StreamFactoryImpl.java    License: Apache License 2.0 6 votes vote down vote up
public StreamFactoryImpl(String clientId,
    StreamOpStats streamOpStats,
    ServerConfiguration serverConfig,
    DistributedLogConfiguration dlConfig,
    FeatureProvider featureProvider,
    StreamConfigProvider streamConfigProvider,
    StreamPartitionConverter streamPartitionConverter,
    DistributedLogNamespace dlNamespace,
    OrderedScheduler scheduler,
    FatalErrorHandler fatalErrorHandler,
    HashedWheelTimer requestTimer) {

    this.clientId = clientId;
    this.streamOpStats = streamOpStats;
    this.serverConfig = serverConfig;
    this.dlConfig = dlConfig;
    this.featureProvider = featureProvider;
    this.streamConfigProvider = streamConfigProvider;
    this.streamPartitionConverter = streamPartitionConverter;
    this.dlNamespace = dlNamespace;
    this.scheduler = scheduler;
    this.fatalErrorHandler = fatalErrorHandler;
    this.requestTimer = requestTimer;
}
 
Example #4
Source Project: james-project   Author: apache   File: SMTPServerTest.java    License: Apache License 2.0 6 votes vote down vote up
@Before
public void setUp() throws Exception {

    domainList = new MemoryDomainList(new InMemoryDNSService()
        .registerMxRecord(Domain.LOCALHOST.asString(), "127.0.0.1")
        .registerMxRecord(LOCAL_DOMAIN, "127.0.0.1")
        .registerMxRecord("examplebis.local", "127.0.0.1")
        .registerMxRecord("127.0.0.1", "127.0.0.1"));
    domainList.setAutoDetect(false);
    domainList.setAutoDetectIP(false);

    domainList.addDomain(Domain.LOCALHOST);
    domainList.addDomain(Domain.of(LOCAL_DOMAIN));
    domainList.addDomain(Domain.of("examplebis.local"));
    usersRepository = MemoryUsersRepository.withVirtualHosting(domainList);

    createMailRepositoryStore();

    setUpFakeLoader();
    // slf4j can't set programmatically any log level. It's just a facade
    // log.setLevel(SimpleLog.LOG_LEVEL_ALL);
    smtpConfiguration = new SMTPTestConfiguration();
    hashedWheelTimer = new HashedWheelTimer();
    setUpSMTPServer();
}
 
Example #5
Source Project: incubator-tajo   Author: apache   File: RpcChannelFactory.java    License: Apache License 2.0 6 votes vote down vote up
public static synchronized ClientSocketChannelFactory createClientChannelFactory(String name, int workerNum) {
  name = name + "-" + clientCount.incrementAndGet();
  if(LOG.isDebugEnabled()){
    LOG.debug("Create " + name + " ClientSocketChannelFactory. Worker:" + workerNum);
  }

  ThreadFactoryBuilder builder = new ThreadFactoryBuilder();
  ThreadFactory bossFactory = builder.setNameFormat(name + " Boss #%d").build();
  ThreadFactory workerFactory = builder.setNameFormat(name + " Worker #%d").build();

  NioClientBossPool bossPool = new NioClientBossPool(Executors.newCachedThreadPool(bossFactory), 1,
      new HashedWheelTimer(), ThreadNameDeterminer.CURRENT);
  NioWorkerPool workerPool = new NioWorkerPool(Executors.newCachedThreadPool(workerFactory), workerNum,
      ThreadNameDeterminer.CURRENT);

  return new NioClientSocketChannelFactory(bossPool, workerPool);
}
 
Example #6
Source Project: hadoop   Author: naver   File: Portmap.java    License: Apache License 2.0 5 votes vote down vote up
void start(final int idleTimeMilliSeconds, final SocketAddress tcpAddress,
    final SocketAddress udpAddress) {

  tcpServer = new ServerBootstrap(new NioServerSocketChannelFactory(
      Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
  tcpServer.setPipelineFactory(new ChannelPipelineFactory() {
    private final HashedWheelTimer timer = new HashedWheelTimer();
    private final IdleStateHandler idleStateHandler = new IdleStateHandler(
        timer, 0, 0, idleTimeMilliSeconds, TimeUnit.MILLISECONDS);

    @Override
    public ChannelPipeline getPipeline() throws Exception {
      return Channels.pipeline(RpcUtil.constructRpcFrameDecoder(),
          RpcUtil.STAGE_RPC_MESSAGE_PARSER, idleStateHandler, handler,
          RpcUtil.STAGE_RPC_TCP_RESPONSE);
    }
  });

  udpServer = new ConnectionlessBootstrap(new NioDatagramChannelFactory(
      Executors.newCachedThreadPool()));

  udpServer.setPipeline(Channels.pipeline(RpcUtil.STAGE_RPC_MESSAGE_PARSER,
      handler, RpcUtil.STAGE_RPC_UDP_RESPONSE));

  tcpChannel = tcpServer.bind(tcpAddress);
  udpChannel = udpServer.bind(udpAddress);
  allChannels.add(tcpChannel);
  allChannels.add(udpChannel);

  LOG.info("Portmap server started at tcp://" + tcpChannel.getLocalAddress()
      + ", udp://" + udpChannel.getLocalAddress());
}
 
Example #7
Source Project: phoenix-omid   Author: apache   File: TSOClient.java    License: Apache License 2.0 5 votes vote down vote up
ConnectedState(StateMachine.Fsm fsm, Channel channel, HashedWheelTimer timeoutExecutor) {
    super(fsm);
    LOG.debug("NEW STATE: CONNECTED");
    this.channel = channel;
    this.timeoutExecutor = timeoutExecutor;
    timestampRequests = new ArrayDeque<>();
    commitRequests = new HashMap<>();
    fenceRequests = new HashMap<>();
}
 
Example #8
Source Project: big-c   Author: yncxcw   File: Portmap.java    License: Apache License 2.0 5 votes vote down vote up
void start(final int idleTimeMilliSeconds, final SocketAddress tcpAddress,
    final SocketAddress udpAddress) {

  tcpServer = new ServerBootstrap(new NioServerSocketChannelFactory(
      Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
  tcpServer.setPipelineFactory(new ChannelPipelineFactory() {
    private final HashedWheelTimer timer = new HashedWheelTimer();
    private final IdleStateHandler idleStateHandler = new IdleStateHandler(
        timer, 0, 0, idleTimeMilliSeconds, TimeUnit.MILLISECONDS);

    @Override
    public ChannelPipeline getPipeline() throws Exception {
      return Channels.pipeline(RpcUtil.constructRpcFrameDecoder(),
          RpcUtil.STAGE_RPC_MESSAGE_PARSER, idleStateHandler, handler,
          RpcUtil.STAGE_RPC_TCP_RESPONSE);
    }
  });

  udpServer = new ConnectionlessBootstrap(new NioDatagramChannelFactory(
      Executors.newCachedThreadPool()));

  udpServer.setPipeline(Channels.pipeline(RpcUtil.STAGE_RPC_MESSAGE_PARSER,
      handler, RpcUtil.STAGE_RPC_UDP_RESPONSE));

  tcpChannel = tcpServer.bind(tcpAddress);
  udpChannel = udpServer.bind(udpAddress);
  allChannels.add(tcpChannel);
  allChannels.add(udpChannel);

  LOG.info("Portmap server started at tcp://" + tcpChannel.getLocalAddress()
      + ", udp://" + udpChannel.getLocalAddress());
}
 
Example #9
Source Project: distributedlog   Author: apache   File: ConsistentHashRoutingService.java    License: Apache License 2.0 5 votes vote down vote up
ConsistentHashRoutingService(ServerSetWatcher serverSetWatcher,
                             int numReplicas,
                             int blackoutSeconds,
                             StatsReceiver statsReceiver) {
    super(serverSetWatcher);
    this.circle = new ConsistentHash(hashFunction, numReplicas, statsReceiver.scope("ring"));
    this.hashedWheelTimer = new HashedWheelTimer(new ThreadFactoryBuilder()
            .setNameFormat("ConsistentHashRoutingService-Timer-%d").build());
    this.blackoutSeconds = blackoutSeconds;
    // stats
    this.statsReceiver = statsReceiver;
    this.numBlackoutHosts = new AtomicInteger(0);
    this.numBlackoutHostsGauge = this.statsReceiver.addGauge(gaugeName("num_blackout_hosts"),
            new Function0<Object>() {
                @Override
                public Object apply() {
                    return (float) numBlackoutHosts.get();
                }
            });
    this.numHostsGauge = this.statsReceiver.addGauge(gaugeName("num_hosts"),
            new Function0<Object>() {
                @Override
                public Object apply() {
                    return (float) address2ShardId.size();
                }
            });
}
 
Example #10
Source Project: distributedlog   Author: apache   File: ProxyClientManager.java    License: Apache License 2.0 5 votes vote down vote up
public ProxyClientManager(ClientConfig clientConfig,
                          ProxyClient.Builder clientBuilder,
                          HashedWheelTimer timer,
                          HostProvider hostProvider,
                          ClientStats clientStats) {
    this.clientConfig = clientConfig;
    this.clientBuilder = clientBuilder;
    this.timer = timer;
    this.hostProvider = hostProvider;
    this.handshakeStats = clientStats.getOpStats("handshake");
    scheduleHandshake();
    this.lastOwnershipSyncStopwatch = Stopwatch.createStarted();
}
 
Example #11
Source Project: distributedlog   Author: apache   File: OwnershipCache.java    License: Apache License 2.0 5 votes vote down vote up
public OwnershipCache(ClientConfig clientConfig,
                      HashedWheelTimer timer,
                      StatsReceiver statsReceiver,
                      StatsReceiver streamStatsReceiver) {
    this.clientConfig = clientConfig;
    this.timer = timer;
    this.ownershipStatsLogger = new OwnershipStatsLogger(statsReceiver, streamStatsReceiver);
    scheduleDumpOwnershipCache();
}
 
Example #12
Source Project: distributedlog   Author: apache   File: TestProxyClientManager.java    License: Apache License 2.0 5 votes vote down vote up
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()));
}
 
Example #13
Source Project: distributedlog   Author: twitter   File: ConsistentHashRoutingService.java    License: Apache License 2.0 5 votes vote down vote up
ConsistentHashRoutingService(ServerSetWatcher serverSetWatcher,
                             int numReplicas,
                             int blackoutSeconds,
                             StatsReceiver statsReceiver) {
    super(serverSetWatcher);
    this.circle = new ConsistentHash(hashFunction, numReplicas, statsReceiver.scope("ring"));
    this.hashedWheelTimer = new HashedWheelTimer(new ThreadFactoryBuilder()
            .setNameFormat("ConsistentHashRoutingService-Timer-%d").build());
    this.blackoutSeconds = blackoutSeconds;
    // stats
    this.statsReceiver = statsReceiver;
    this.numBlackoutHosts = new AtomicInteger(0);
    this.numBlackoutHostsGauge = this.statsReceiver.addGauge(gaugeName("num_blackout_hosts"),
            new Function0<Object>() {
                @Override
                public Object apply() {
                    return (float) numBlackoutHosts.get();
                }
            });
    this.numHostsGauge = this.statsReceiver.addGauge(gaugeName("num_hosts"),
            new Function0<Object>() {
                @Override
                public Object apply() {
                    return (float) address2ShardId.size();
                }
            });
}
 
Example #14
Source Project: distributedlog   Author: twitter   File: ProxyClientManager.java    License: Apache License 2.0 5 votes vote down vote up
public ProxyClientManager(ClientConfig clientConfig,
                          ProxyClient.Builder clientBuilder,
                          HashedWheelTimer timer,
                          HostProvider hostProvider,
                          ClientStats clientStats) {
    this.clientConfig = clientConfig;
    this.clientBuilder = clientBuilder;
    this.timer = timer;
    this.hostProvider = hostProvider;
    this.handshakeStats = clientStats.getOpStats("handshake");
    scheduleHandshake();
    this.lastOwnershipSyncStopwatch = Stopwatch.createStarted();
}
 
Example #15
Source Project: distributedlog   Author: twitter   File: OwnershipCache.java    License: Apache License 2.0 5 votes vote down vote up
public OwnershipCache(ClientConfig clientConfig,
                      HashedWheelTimer timer,
                      StatsReceiver statsReceiver,
                      StatsReceiver streamStatsReceiver) {
    this.clientConfig = clientConfig;
    this.timer = timer;
    this.ownershipStatsLogger = new OwnershipStatsLogger(statsReceiver, streamStatsReceiver);
    scheduleDumpOwnershipCache();
}
 
Example #16
Source Project: distributedlog   Author: twitter   File: TestProxyClientManager.java    License: Apache License 2.0 5 votes vote down vote up
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()));
}
 
Example #17
Source Project: atrium-odl   Author: onfsdn   File: AtriumTimer.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Returns the singleton hashed-wheel timer.
 *
 * @return hashed-wheel timer
 */
public static HashedWheelTimer getTimer() {
	if (AtriumTimer.timer == null) {
		initTimer();
	}
	return AtriumTimer.timer;
}
 
Example #18
Source Project: atrium-odl   Author: onfsdn   File: AtriumTimer.java    License: Apache License 2.0 5 votes vote down vote up
private static synchronized void initTimer() {
	if (AtriumTimer.timer == null) {
		HashedWheelTimer hwTimer = new HashedWheelTimer();
		hwTimer.start();
		AtriumTimer.timer = hwTimer;
	}
}
 
Example #19
Source Project: parallec   Author: eBay   File: TcpUdpSshPingResourceStore.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Initialize; cached threadpool is safe as it is releasing resources automatically if idle
 */
public synchronized void init() {
    channelFactory = new NioClientSocketChannelFactory(
            Executors.newCachedThreadPool(),
            Executors.newCachedThreadPool());

    datagramChannelFactory = new NioDatagramChannelFactory(
            Executors.newCachedThreadPool());

    timer = new HashedWheelTimer();
}
 
Example #20
Source Project: ck   Author: mauricioaniche   File: NettyAsyncHttpProvider.java    License: Apache License 2.0 5 votes vote down vote up
public NettyAsyncHttpProvider(AsyncHttpClientConfig config) {
	super(new HashedWheelTimer(), 0, 0, config.getIdleConnectionTimeoutInMs(), TimeUnit.MILLISECONDS) ;
	socketChannelFactory = new NioClientSocketChannelFactory(
			Executors.newCachedThreadPool(),
			config.executorService());
	bootstrap = new ClientBootstrap(socketChannelFactory);
	this.config = config;
}
 
Example #21
Source Project: floodlight_with_topoguard   Author: xuraylei   File: RPCPipelineFactory.java    License: Apache License 2.0 5 votes vote down vote up
public RPCPipelineFactory(SyncManager syncManager,
                          RPCService rpcService) {
    super();
    this.syncManager = syncManager;
    this.rpcService = rpcService;

    this.timer = new HashedWheelTimer();
}
 
Example #22
Source Project: floodlight_with_topoguard   Author: xuraylei   File: OpenflowPipelineFactory.java    License: Apache License 2.0 5 votes vote down vote up
public OpenflowPipelineFactory(Controller controller,
                               ThreadPoolExecutor pipelineExecutor) {
    super();
    this.controller = controller;
    this.pipelineExecutor = pipelineExecutor;
    this.timer = new HashedWheelTimer();
    this.idleHandler = new IdleStateHandler(timer, 20, 25, 0);
    this.readTimeoutHandler = new ReadTimeoutHandler(timer, 30);
}
 
Example #23
Source Project: james-project   Author: apache   File: AbstractSSLAwareChannelPipelineFactory.java    License: Apache License 2.0 5 votes vote down vote up
public AbstractSSLAwareChannelPipelineFactory(int timeout,
        int maxConnections, int maxConnectsPerIp, ChannelGroup group, String[] enabledCipherSuites, ExecutionHandler eHandler,
        ChannelHandlerFactory frameHandlerFactory, HashedWheelTimer hashedWheelTimer) {
    this(timeout, maxConnections, maxConnectsPerIp, group, eHandler, frameHandlerFactory, hashedWheelTimer);
    
    // We need to copy the String array because of possible security issues.
    // See https://issues.apache.org/jira/browse/PROTOCOLS-18
    this.enabledCipherSuites = ArrayUtils.clone(enabledCipherSuites);
}
 
Example #24
Source Project: james-project   Author: apache   File: AbstractChannelPipelineFactory.java    License: Apache License 2.0 5 votes vote down vote up
public AbstractChannelPipelineFactory(int timeout, int maxConnections, int maxConnectsPerIp, ChannelGroup channels,
                                      ExecutionHandler eHandler, ChannelHandlerFactory frameHandlerFactory,
                                      HashedWheelTimer hashedWheelTimer) {
    this.connectionLimitHandler = new ConnectionLimitUpstreamHandler(maxConnections);
    this.connectionPerIpLimitHandler = new ConnectionPerIpLimitUpstreamHandler(maxConnectsPerIp);
    this.groupHandler = new ChannelGroupHandler(channels);
    this.timeout = timeout;
    this.eHandler = eHandler;
    this.frameHandlerFactory = frameHandlerFactory;
    this.timer = hashedWheelTimer;
}
 
Example #25
Source Project: james-project   Author: apache   File: POP3ServerTest.java    License: Apache License 2.0 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    hashedWheelTimer = new HashedWheelTimer();
    setUpServiceManager();
    setUpPOP3Server();
    pop3Configuration = new POP3TestConfiguration();
}
 
Example #26
Source Project: james-project   Author: apache   File: IMAPServerFactory.java    License: Apache License 2.0 5 votes vote down vote up
@Inject
public IMAPServerFactory(FileSystem fileSystem, ImapDecoder decoder, ImapEncoder encoder, ImapProcessor processor,
                         MetricFactory metricFactory, HashedWheelTimer hashedWheelTimer) {
    this.fileSystem = fileSystem;
    this.decoder = decoder;
    this.encoder = encoder;
    this.processor = processor;
    this.imapMetrics = new ImapMetrics(metricFactory);
    this.hashedWheelTimer = hashedWheelTimer;
}
 
Example #27
Source Project: james-project   Author: apache   File: LMTPServerFactory.java    License: Apache License 2.0 5 votes vote down vote up
@Inject
public LMTPServerFactory(ProtocolHandlerLoader loader, FileSystem fileSystem, MetricFactory metricFactory,
                         HashedWheelTimer hashedWheelTimer) {
    this.loader = loader;
    this.fileSystem = fileSystem;
    this.lmtpMetrics = new LMTPMetricsImpl(metricFactory);
    this.hashedWheelTimer = hashedWheelTimer;
}
 
Example #28
Source Project: james-project   Author: apache   File: SMTPServerFactory.java    License: Apache License 2.0 5 votes vote down vote up
@Inject
public SMTPServerFactory(DNSService dns, ProtocolHandlerLoader loader, FileSystem fileSystem,
                         MetricFactory metricFactory, HashedWheelTimer hashedWheelTimer) {
    this.dns = dns;
    this.loader = loader;
    this.fileSystem = fileSystem;
    this.smtpMetrics = new SmtpMetricsImpl(metricFactory);
    this.hashedWheelTimer = hashedWheelTimer;
}
 
Example #29
Source Project: incubator-gobblin   Author: apache   File: HashedWheelTimerTaskScheduler.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Instantiates a new instance of {@link HashedWheelTimerTask}.
 *
 * @param timer the {@link HashedWheelTimer} that the {@link HashedWheelTimerTask} is associated to.
 * @param task the {@link ScheduledTask} to run.
 * @param period the period between successive executions of the task
 * @param unit the time unit of the period parameter
 */
HashedWheelTimerTask(HashedWheelTimer timer, T2 task, long period, TimeUnit unit) {
  super(task);
  this.timer = timer;
  this.task = task;
  this.period = period;
  this.unit = unit;
  this.context = MDC.getCopyOfContextMap();
  this.future = this.timer.newTimeout(this, this.period, this.unit);
}
 
Example #30
Source Project: ob1k   Author: outbrain   File: HttpClient.java    License: Apache License 2.0 5 votes vote down vote up
private static NettyAsyncHttpProviderConfig createConfig() {

      final NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig();
      final NioClientSocketChannelFactory channelFactory = new NioClientSocketChannelFactory();

      nettyConfig.setSocketChannelFactory(channelFactory);
      nettyConfig.setChunkedFileChunkSize(CHUNKED_FILE_CHUNK_SIZE);

      final HashedWheelTimer timer = new HashedWheelTimer();
      timer.start();
      nettyConfig.setNettyTimer(timer);

      registerShutdownHook(channelFactory, timer);
      return nettyConfig;
    }