use of org.jboss.netty.util.HashedWheelTimer in project graylog2-server by Graylog2.
the class UdpTransportTest method setUp.
@Before
public void setUp() throws Exception {
throughputCounter = new ThroughputCounter(new HashedWheelTimer());
localMetricRegistry = new LocalMetricRegistry();
udpTransport = new UdpTransport(CONFIGURATION, throughputCounter, localMetricRegistry);
}
use of org.jboss.netty.util.HashedWheelTimer in project cdap by caskdata.
the class NettyRouter method startUp.
@Override
protected void startUp() throws ServiceBindException {
ChannelUpstreamHandler connectionTracker = new SimpleChannelUpstreamHandler() {
@Override
public void channelOpen(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
channelGroup.add(e.getChannel());
super.channelOpen(ctx, e);
}
};
tokenValidator.startAndWait();
timer = new HashedWheelTimer(new ThreadFactoryBuilder().setDaemon(true).setNameFormat("router-idle-event-generator-timer").build());
bootstrapClient(connectionTracker);
bootstrapServer(connectionTracker);
}
use of org.jboss.netty.util.HashedWheelTimer in project camel by apache.
the class NettyComponent method doStart.
@Override
protected void doStart() throws Exception {
if (timer == null) {
HashedWheelTimer hashedWheelTimer = new HashedWheelTimer();
hashedWheelTimer.start();
timer = hashedWheelTimer;
}
if (configuration == null) {
configuration = new NettyConfiguration();
}
if (configuration.isOrderedThreadPoolExecutor()) {
executorService = createExecutorService();
}
super.doStart();
}
use of org.jboss.netty.util.HashedWheelTimer in project pinpoint by naver.
the class ZookeeperClusterDataManager method createTimer.
private Timer createTimer() {
HashedWheelTimer timer = TimerFactory.createHashedWheelTimer("Pinpoint-Web-Cluster-Timer", 100, TimeUnit.MILLISECONDS, 512);
timer.start();
return timer;
}
use of org.jboss.netty.util.HashedWheelTimer in project graylog2-server by Graylog2.
the class GenericBindings method configure.
@Override
protected void configure() {
// This is holding all our metrics.
bind(MetricRegistry.class).toProvider(MetricRegistryProvider.class).asEagerSingleton();
// must not be a singleton!
bind(LocalMetricRegistry.class).in(Scopes.NO_SCOPE);
install(new FactoryModuleBuilder().build(DecodingProcessor.Factory.class));
bind(ProcessBuffer.class).asEagerSingleton();
bind(InputBuffer.class).to(InputBufferImpl.class);
bind(NodeId.class).toProvider(NodeIdProvider.class);
bind(ServiceManager.class).toProvider(ServiceManagerProvider.class).asEagerSingleton();
bind(HashedWheelTimer.class).toInstance(new HashedWheelTimer());
bind(ThroughputCounter.class);
bind(EventBus.class).toProvider(EventBusProvider.class).in(Scopes.SINGLETON);
bind(Semaphore.class).annotatedWith(Names.named("JournalSignal")).toInstance(new Semaphore(0));
install(new FactoryModuleBuilder().build(new TypeLiteral<IOState.Factory<MessageInput>>() {
}));
bind(InputRegistry.class).asEagerSingleton();
bind(OkHttpClient.class).toProvider(OkHttpClientProvider.class).asEagerSingleton();
bind(OkHttpClient.class).annotatedWith(Names.named("systemHttpClient")).toProvider(SystemOkHttpClientProvider.class).asEagerSingleton();
bind(MimetypesFileTypeMap.class).toInstance(new MimetypesFileTypeMap());
bind(ExecutorService.class).annotatedWith(Names.named("proxiedRequestsExecutorService")).toProvider(ProxiedRequestsExecutorService.class).asEagerSingleton();
}
Aggregations