Apache zookeeper 如何检查现有Zookeeper临时节点的超时?
我知道Zookeeper服务器有一个名为tickTime minimum heartbeat time=2*tickTime的配置,客户端可以请求会话超时 当建立连接时。。它获取与其关联的会话超时。这是客户机和服务器之间协商的Apache zookeeper 如何检查现有Zookeeper临时节点的超时?,apache-zookeeper,apache-curator,Apache Zookeeper,Apache Curator,我知道Zookeeper服务器有一个名为tickTime minimum heartbeat time=2*tickTime的配置,客户端可以请求会话超时 当建立连接时。。它获取与其关联的会话超时。这是客户机和服务器之间协商的 如何找到他们都确定的值?在Java中,ZooKeeper实例有一个方法:getSessionTimeout。评论如下: public int getSessionTimeout() The negotiated session timeout for this ZooK
如何找到他们都确定的值?在Java中,ZooKeeper实例有一个方法:getSessionTimeout。评论如下:
public int getSessionTimeout()
The negotiated session timeout for this ZooKeeper client instance.
The value returned is not valid until the client connects to a server
and may change after a re-connect. This method is NOT thread safe
Returns:
current session timeout