public ApplicationMap build(LinkDataDuplexMap linkDataDuplexMap, long timeoutMillis) {
        Objects.requireNonNull(linkDataDuplexMap, "linkDataDuplexMap");

        logger.info("Building application map");

        NodeList nodeList = NodeListFactory.createNodeList(linkDataDuplexMap);
        LinkList linkList = LinkListFactory.createLinkList(nodeList, linkDataDuplexMap, range);

        NodeHistogramFactory nodeHistogramFactory = this.nodeHistogramFactory;
        if (nodeHistogramFactory == null) {
            nodeHistogramFactory = new EmptyNodeHistogramFactory();
        }

        NodeHistogramAppender nodeHistogramAppender = nodeHistogramAppenderFactory.create(nodeHistogramFactory);
        final TimeoutWatcher timeoutWatcher = new TimeoutWatcher(timeoutMillis);
        nodeHistogramAppender.appendNodeHistogram(timeWindow, nodeList, linkList, timeoutWatcher.remainingTimeMillis());

        ServerGroupListFactory serverGroupListFactory = this.serverGroupListFactory;
        if (serverGroupListFactory == null) {
            serverGroupListFactory = new EmptyServerGroupListFactory();
        }
        ServerInfoAppender serverInfoAppender = serverInfoAppenderFactory.create(serverGroupListFactory);
        serverInfoAppender.appendServerInfo(range, nodeList, linkDataDuplexMap, timeoutWatcher.remainingTimeMillis());

        return DefaultApplicationMap.build(nodeList, linkList, range);
    }
@author emeroad
@author minwoo.jung
@author HyunGil Jeong
web/src/main/java/com/navercorp/pinpoint/web/applicationmap/ApplicationMapBuilder.java