当前位置: 首页>>代码示例>>Python>>正文


Python Framework.clearBlock方法代码示例

本文整理汇总了Python中framework.Framework.clearBlock方法的典型用法代码示例。如果您正苦于以下问题:Python Framework.clearBlock方法的具体用法?Python Framework.clearBlock怎么用?Python Framework.clearBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在framework.Framework的用法示例。


在下文中一共展示了Framework.clearBlock方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: rcv_pingrsp

# 需要导入模块: from framework import Framework [as 别名]
# 或者: from framework.Framework import clearBlock [as 别名]
 def rcv_pingrsp(self, pingmsg):
     # Remove all instances of recovered node from failed node list
     recovered_node = pingmsg.from_node
     while recovered_node in self.failed_nodes:
         self.failed_nodes.remove(recovered_node)
         Framework.clearBlock(recovered_node)
     if recovered_node in self.pending_handoffs:
         for key in self.pending_handoffs[recovered_node]:
             #print 'recovery ---------------------------------'
             # Send our latest value for this key
             (value, metadata) = self.retrieve(key)
             putmsg = PutReq(self, recovered_node, key, value, metadata)
             Framework.send_message(putmsg)
         #print 'schedule'
         Framework.schedule(timers_to_process=0)
         del self.pending_handoffs[recovered_node]
开发者ID:TaoZong,项目名称:Python,代码行数:18,代码来源:dynamoBack.py

示例2: recovery

# 需要导入模块: from framework import Framework [as 别名]
# 或者: from framework.Framework import clearBlock [as 别名]
 def recovery(self, node):
     # Remove all instances of recovered node from failed node list
     #print 'recover+++++++++++++++++++++++++++'
     recovered_node = node
     while recovered_node in self.failed_nodes:
         self.failed_nodes.remove(recovered_node)
         Framework.clearBlock(recovered_node)
     if recovered_node in self.pending_handoffs:
         for key in self.pending_handoffs[recovered_node]:
             #print 'recovery ---------------------------------'
             # Send our latest value for this key
             (value, metadata) = self.retrieve(key)
             putmsg = PutReq(self.addr, recovered_node, key, value, metadata)
             Framework.send_message(putmsg)
         Framework.schedule()
         del self.pending_handoffs[recovered_node]
开发者ID:TaoZong,项目名称:Python,代码行数:18,代码来源:dynamoBack.py


注:本文中的framework.Framework.clearBlock方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。