gpt4 book ai didi

hazelcast - 关闭 hazelcast 客户端连接

转载 作者:行者123 更新时间:2023-12-02 22:35:17 25 4
gpt4 key购买 nike

我刚刚开始使用 hazelcast [3.3.1]。按照 hazelcast 应用程序和客户端教程,我创建了一个 hazelcast 应用程序实例和一个客户端(使用 eclipse IDE)。

从客户端,我能够将对象添加到 map 并成功获取它们。但是,我在实例的控制台上看到以下警告,它们似乎警告客户端断开连接。这是每个客户端获取/放置的正常行为吗?

在退出客户端程序之前,是否有正确的方法来断开客户端与实例的连接?

Hazelcast实例日志

com.hazelcast.nio.tcp.TcpIpConnection INFO: Connection [Address[x.x.x.x]:58266] lost. Reason: java.io.IOException[An existing connection was forcibly closed by the remote host]
com.hazelcast.nio.tcp.TcpIpConnection INFO: Connection [Address[127.0.0.1]:58263] lost. Reason: java.io.IOException[An existing connection was forcibly closed by the remote host]
com.hazelcast.nio.tcp.ReadHandler WARNING: hz._hzInstance_1_dev.IO.thread-in-0 Closing socket to endpoint Address[x.x.x.x]:58266, Cause:java.io.IOException: An existing connection was forcibly closed by the remote host
com.hazelcast.nio.tcp.ReadHandler WARNING: hz._hzInstance_1_dev.IO.thread-in-2 Closing socket to endpoint Address[127.0.0.1]:58263, Cause:java.io.IOException: An existing connection was forcibly closed by the remote host

最佳答案

hazelCastInstance.shutdown();是关闭 hazelcast 实例的正确方法...

关于hazelcast - 关闭 hazelcast 客户端连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26570315/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com