use of com.navercorp.pinpoint.collector.util.DatagramPacketFactory in project pinpoint by naver.
the class UDPReceiver method afterPropertiesSet.
public void afterPropertiesSet() {
Assert.notNull(metricRegistry, "metricRegistry must not be null");
Assert.notNull(packetHandlerFactory, "packetHandlerFactory must not be null");
this.worker = createWorker(workerOption, receiverName + "-Worker");
if (workerOption.isEnableCollectMetric()) {
this.worker = new MonitoredExecutorService(worker, metricRegistry, receiverName + "-Worker");
}
final int packetPoolSize = getPacketPoolSize(workerOption);
this.datagramPacketPool = new DefaultObjectPool<>(new DatagramPacketFactory(), packetPoolSize);
this.io = (ThreadPoolExecutor) Executors.newCachedThreadPool(new PinpointThreadFactory(receiverName + "-Io", true));
}
use of com.navercorp.pinpoint.collector.util.DatagramPacketFactory in project pinpoint by naver.
the class TestUDPReceiver method afterPropertiesSet.
public void afterPropertiesSet() {
Assert.notNull(packetHandlerFactory, "packetHandlerFactory must not be null");
final int packetPoolSize = getPacketPoolSize(workerThreadSize, workerThreadQueueSize);
this.datagramPacketPool = new DefaultObjectPool<>(new DatagramPacketFactory(), packetPoolSize);
this.worker = ExecutorFactory.newFixedThreadPool(workerThreadSize, workerThreadQueueSize, receiverName + "-Worker", true);
this.io = (ThreadPoolExecutor) Executors.newCachedThreadPool(new PinpointThreadFactory(receiverName + "-Io", true));
}
Aggregations