「SequoiaDB巨杉数据库」getMaster()

语法

rg.getMaster()

获取当前分区组的主节点。

返回值

返回当前分区组的主节点,类型为 SdbNode 对象。

错误

错误码

示例

获取 group1 分区组的主节点,可以通过该节点进行相关的节点级操作:

var rg = db.getRG("group1")
var node = rg.getMaster()
println(node)
hostname1:11830
println(node.constructor.name)
SdbNode
node.help()

   --Instance methods for class "SdbNode":
   connect()                  - Connect the database to the current node.
   getHostName()              - Return the hostname of a node.
   getNodeDetail()            - Return the information of the current node.
   getServiceName()           - Return the server name of a node.
   start()                    - Start the current node.
   stop()                     - Stop the current node.

点击巨杉数据库文档中心了解更多信息

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值