private CompletableFuture<NodeHistogram> asyncNodeHistogram(TimeWindow timeWindow, Node node, LinkList linkList) {
        final Application application = node.getApplication();
        final ServiceType serviceType = application.getServiceType();
        final Range range = timeWindow.getWindowRange();
        if (serviceType.isWas()) {
            // for WAS nodes, set their own response time histogram
            final Application wasNode = node.getApplication();
            return CompletableFuture.supplyAsync(new Supplier<NodeHistogram>() {
                @Override
                public NodeHistogram get() {
                    return nodeHistogramFactory.createWasNodeHistogram(wasNode, timeWindow);
                }
            }, executor);
        } else if (serviceType.isTerminal() || serviceType.isUnknown() || serviceType.isAlias()) {
            return CompletableFuture.completedFuture(nodeHistogramFactory.createTerminalNodeHistogram(application, range, linkList));
        } else if (serviceType.isQueue()) {
            // Virtual queue node - queues with agent installed will be handled above as a WAS node
            return CompletableFuture.completedFuture(nodeHistogramFactory.createQueueNodeHistogram(application, range, linkList));
        } else if (serviceType.isUser()) {
            return CompletableFuture.completedFuture(nodeHistogramFactory.createUserNodeHistogram(application, range, linkList));
        }

        return CompletableFuture.completedFuture(nodeHistogramFactory.createEmptyNodeHistogram(application, range));
    }
@author HyunGil Jeong
@author jaehong.kim
web/src/main/java/com/navercorp/pinpoint/web/applicationmap/appender/histogram/DefaultNodeHistogramAppender.java