本文整理汇总了Python中api.API.pause方法的典型用法代码示例。如果您正苦于以下问题:Python API.pause方法的具体用法?Python API.pause怎么用?Python API.pause使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api.API
的用法示例。
在下文中一共展示了API.pause方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: int
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import pause [as 别名]
if line[0] == "restoreConnection":
id1 = int(line[1])
id2 = int(line[2])
"""
Restore the connection between a client and a server or between
two servers
"""
api.restoreConnection(id1, id2)
if line[0] == "pause":
"""
Pause the system and don't allow any Anti-Entropy messages to
propagate through the system
"""
api.pause()
if line[0] == "start":
"""
Resume the system and allow any Anti-Entropy messages to
propagate through the system
"""
api.start()
if line[0] == "stabilize":
"""
Block until there are enough Anti-Entropy messages for all values to
propagate through the currently connected servers. In general, the
time that this function blocks for should increase linearly with the
number of servers in the system.
"""