关闭hazelcast客户端连接

时间:2014-10-26 06:09:57

标签: hazelcast

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

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

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

HazelcastInstance日志

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

1 个答案:

答案 0 :(得分:6)

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