本文整理汇总了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;
}
示例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;
}
示例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;
}