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


C++ NodeBitmask::set方法代码示例

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


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

示例1: refToBlock

inline
NodeReceiverGroup& 
NodeReceiverGroup::operator=(BlockReference blockRef){
  m_nodes.clear();
  m_block = refToBlock(blockRef);
  m_nodes.set(refToNode(blockRef));
  return * this;
}
开发者ID:4T-Shirt,项目名称:mysql,代码行数:8,代码来源:VMSignal.hpp

示例2:

NodeBitmask
SignalSender::broadcastSignal(NodeBitmask mask,
                              SimpleSignal& sig,
                              Uint16 recBlock, Uint16 gsn,
                              Uint32 len)
{
    sig.set(*this, TestOrd::TraceAPI, recBlock, gsn, len);

    NodeBitmask result;
    for(Uint32 i = 0; i < MAX_NODES; i++)
    {
        if(mask.get(i) && sendSignal(i, &sig) == SEND_OK)
            result.set(i);
    }
    return result;
}
开发者ID:carrotli,项目名称:ansql,代码行数:16,代码来源:SignalSender.cpp

示例3: create

  static Properties create(unsigned mgmds = 1,
                           unsigned ndbds = 1,
                           unsigned mysqlds = 1,
                           unsigned mgmd_nodeids[] = 0,
                           unsigned ndbd_nodeids[] = 0,
                           unsigned mysqld_nodeids[] = 0)
  {
    Uint32 base_port = get_ndbt_base_port() + /* mysqld */ 1;
    Properties config;
    require(mgmds >= 1 && ndbds >= 1 && mysqlds >= 1);
    NodeBitmask mask;
    mask.set();
    mask.clear(Uint32(0));

    for (unsigned i = 0; i < mgmds; i++)
    {
      Uint32 nodeId = getNodeId(mask, mgmd_nodeids, i);
      Properties node_settings;
      node_settings.put("NodeId", nodeId);
      node_settings.put("HostName", "localhost");
      node_settings.put("PortNumber", base_port + i);

      config.put("ndb_mgmd", nodeId, &node_settings);
    }

    for (unsigned i = 0; i < ndbds; i++)
    {
      Uint32 nodeId = getNodeId(mask, ndbd_nodeids, i);
      Properties node_settings;
      node_settings.put("NodeId", nodeId);
      if (ndbds == 1)
        node_settings.put("NoOfReplicas", 1);

      config.put("ndbd", nodeId, &node_settings);
    }

    for (unsigned i = 0; i < mysqlds; i++)
    {
      Uint32 nodeId = getNodeId(mask, mysqld_nodeids, i);
      Properties node_settings;
      node_settings.put("NodeId", nodeId);
      config.put("mysqld", nodeId, &node_settings);
    }

    return config;
  }
开发者ID:ForcerKing,项目名称:ShaoqunXu-mysql5.7,代码行数:46,代码来源:ConfigFactory.hpp


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