本文整理汇总了Python中api.API.printLog方法的典型用法代码示例。如果您正苦于以下问题:Python API.printLog方法的具体用法?Python API.printLog怎么用?Python API.printLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api.API
的用法示例。
在下文中一共展示了API.printLog方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: int
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import printLog [as 别名]
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.
"""
api.stabilize()
if line[0] == "printLog":
serverId = int(line[1])
"""
Print out a server's operation log in the format specified in the
handout.
"""
api.printLog(serverId)
if line[0] == "put":
clientId = int(line[1])
songName = line[2]
URL = line[3]
"""
Instruct the client specified to associate the given URL with the given
songName. This command should block until the client communicates with
one server.
"""
api.put(clientId, songName, URL)
if line[0] == "get":
clientId = int(line[1])
songName = line[2]