List of usage examples for io.netty.util.concurrent UnorderedThreadPoolEventExecutor UnorderedThreadPoolEventExecutor
public UnorderedThreadPoolEventExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler)
From source file:com.heliosapm.streams.tracing.writers.NetWriter.java
License:Apache License
/** * {@inheritDoc}/*from w ww . j a va 2 s . com*/ * @see com.heliosapm.streams.tracing.AbstractMetricWriter#configure(java.util.Properties) */ @Override public void configure(final Properties config) { super.configure(config); remotes = ConfigurationHelper.getArraySystemThenEnvProperty(CONFIG_REMOTE_URIS, DEFAULT_REMOTE_URIS, config); Collections.addAll(remoteUris, remotes); channelGroupThreads = ConfigurationHelper.getIntSystemThenEnvProperty(CONFIG_EXEC_THREADS, DEFAULT_EXEC_THREADS, config); this.config.put("channelGroupThreads", channelGroupThreads); eventLoopThreads = ConfigurationHelper.getIntSystemThenEnvProperty(CONFIG_ELOOP_THREADS, DEFAULT_ELOOP_THREADS, config); this.config.put("eventLoopThreads", eventLoopThreads); eventExecutor = new UnorderedThreadPoolEventExecutor(channelGroupThreads, groupThreadFactory, this); channels = new DefaultChannelGroup(getClass().getSimpleName() + "Channels", eventExecutor); group = new NioEventLoopGroup(eventLoopThreads, eventLoopThreadFactory); bootstrap.group(group).channel(channelType).handler(getChannelInitializer()); bootstrap.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000); // FIXME: config bootstrap.option(ChannelOption.ALLOCATOR, BufferManager.getInstance()); this.config.put("connectTimeout", 5000); // FIXME: Tweaks for channel configuration }