use of com.navercorp.pinpoint.rpc.server.handler.ServerStateChangeEventHandler in project pinpoint by naver.
the class TCPReceiver method afterPropertiesSet.
public void afterPropertiesSet() {
ExecutorService worker = ExecutorFactory.newFixedThreadPool(configuration.getTcpWorkerThread(), configuration.getTcpWorkerQueueSize(), tcpWorkerThreadFactory);
if (configuration.isTcpWorkerMonitor()) {
if (metricRegistry == null) {
logger.warn("metricRegistry not autowired. Can't enable monitoring.");
this.worker = worker;
} else {
this.worker = new MonitoredExecutorService(worker, metricRegistry, this.getClass().getSimpleName() + "-Worker");
}
} else {
this.worker = worker;
}
if (clusterService != null && clusterService.isEnable()) {
this.serverAcceptor.addStateChangeEventHandler(clusterService.getChannelStateChangeEventHandler());
}
for (ServerStateChangeEventHandler channelStateChangeEventHandler : this.channelStateChangeEventHandlers) {
serverAcceptor.addStateChangeEventHandler(channelStateChangeEventHandler);
}
setL4TcpChannel(serverAcceptor, configuration.getL4IpList());
}
use of com.navercorp.pinpoint.rpc.server.handler.ServerStateChangeEventHandler in project pinpoint by naver.
the class AgentBaseDataReceiver method prepare.
private void prepare(PinpointServerAcceptor acceptor) {
if (clusterService != null && clusterService.isEnable()) {
ProfilerClusterManager profilerClusterManager = clusterService.getProfilerClusterManager();
final ServerStateChangeEventHandler stateChangeEventHandler = new ClusterPointStateChangedEventHandler(channelPropertiesFactory, profilerClusterManager);
logger.info("Add Cluster channel state change event handlers {}", stateChangeEventHandler);
acceptor.addStateChangeEventHandler(stateChangeEventHandler);
} else {
logger.info("clusterService is disabled");
}
for (ServerStateChangeEventHandler channelStateChangeEventHandler : this.channelStateChangeEventHandlers) {
logger.info("Add channel state change event handlers {}", channelStateChangeEventHandler);
acceptor.addStateChangeEventHandler(channelStateChangeEventHandler);
}
}
Aggregations