Search in sources :

Example 1 with ProfilerClusterManager

use of com.navercorp.pinpoint.collector.cluster.ProfilerClusterManager 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);
    }
}
Also used : ServerStateChangeEventHandler(com.navercorp.pinpoint.rpc.server.handler.ServerStateChangeEventHandler) ProfilerClusterManager(com.navercorp.pinpoint.collector.cluster.ProfilerClusterManager) ClusterPointStateChangedEventHandler(com.navercorp.pinpoint.collector.cluster.ClusterPointStateChangedEventHandler)

Aggregations

ClusterPointStateChangedEventHandler (com.navercorp.pinpoint.collector.cluster.ClusterPointStateChangedEventHandler)1 ProfilerClusterManager (com.navercorp.pinpoint.collector.cluster.ProfilerClusterManager)1 ServerStateChangeEventHandler (com.navercorp.pinpoint.rpc.server.handler.ServerStateChangeEventHandler)1