资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

MongoDBdriver连接池管理方法

这篇文章主要讲解了“MongoDB driver连接池管理方法”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“MongoDB driver连接池管理方法”吧!

成都创新互联公司,为您提供重庆网站建设公司成都网站制作、网站营销推广、网站开发设计,对服务轻质隔墙板等多个行业拥有丰富的网站建设及推广经验。成都创新互联公司网站建设公司成立于2013年,提供专业网站制作报价服务,我们深知市场的竞争激烈,认真对待每位客户,为客户提供赏心悦目的作品。 与客户共同发展进步,是我们永远的责任!

启动入口:com.mongodb.internal.connection.DefaultClusterableServerFactory#create

@Override
    public ClusterableServer create(final ServerAddress serverAddress, final ServerListener serverListener,
                                    final ClusterClock clusterClock) {
        ConnectionPool connectionPool = new DefaultConnectionPool(new ServerId(clusterId, serverAddress),
                new InternalStreamConnectionFactory(streamFactory, credentialList, applicationName,
                        mongoDriverInformation, compressorList, commandListener), connectionPoolSettings);

        connectionPool.start();

        // no credentials, compressor list, or command listener for the server monitor factory
        ServerMonitorFactory serverMonitorFactory =
            new DefaultServerMonitorFactory(new ServerId(clusterId, serverAddress), serverSettings, clusterClock,
                    new InternalStreamConnectionFactory(heartbeatStreamFactory, Collections.emptyList(),
                            applicationName, mongoDriverInformation, Collections.emptyList(), null), connectionPool);

        return new DefaultServer(new ServerId(clusterId, serverAddress), clusterSettings.getMode(), connectionPool,
                new DefaultConnectionFactory(), serverMonitorFactory, serverListener, commandListener, clusterClock);
    }

感谢各位的阅读,以上就是“MongoDB driver连接池管理方法”的内容了,经过本文的学习后,相信大家对MongoDB driver连接池管理方法这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是创新互联,小编将为大家推送更多相关知识点的文章,欢迎关注!


网站标题:MongoDBdriver连接池管理方法
文章路径:http://cdkjz.cn/article/pjgsgs.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220