类 ZookeeperNodeRegister
java.lang.Object
com.alibaba.druid.pool.ha.node.ZookeeperNodeRegister
A register which is used to register a node to an ephemeral node.
- 作者:
- DigitalSonic
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidClose the current GroupMember.voiddestroy()org.apache.curator.framework.CuratorFrameworkgetPath()voidinit()Init a CuratorFramework if there's no CuratorFramework provided.booleanregister(String nodeId, List<ZookeeperNodeInfo> payload) Register a Node which has a Properties as the payload.voidsetClient(org.apache.curator.framework.CuratorFramework client) voidvoidsetZkConnectString(String zkConnectString)
-
构造器详细资料
-
ZookeeperNodeRegister
public ZookeeperNodeRegister()
-
-
方法详细资料
-
init
public void init()Init a CuratorFramework if there's no CuratorFramework provided. -
register
Register a Node which has a Properties as the payload.CAUTION: only one node can be registered, if you want to register another one, call deregister first- 参数:
payload- The information used to generate the payload Properties- 返回:
- true, register successfully; false, skip the registeration
-
deregister
public void deregister()Close the current GroupMember. -
destroy
public void destroy()- 另请参阅:
-
setClient
public void setClient(org.apache.curator.framework.CuratorFramework client) -
getClient
public org.apache.curator.framework.CuratorFramework getClient() -
getZkConnectString
-
setZkConnectString
-
getPath
-
setPath
-