本文整理汇总了C++中Linked::queryPropTree方法的典型用法代码示例。如果您正苦于以下问题:C++ Linked::queryPropTree方法的具体用法?C++ Linked::queryPropTree怎么用?C++ Linked::queryPropTree使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Linked
的用法示例。
在下文中一共展示了Linked::queryPropTree方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void init()
{
StringBuffer xpath("Software/ThorCluster[@name=\"");
xpath.append(clusterName).append("\"]");
Owned<IRemoteConnection> conn = querySDS().connect("/Environment", myProcessSession(), RTM_LOCK_READ, SDS_LOCK_TIMEOUT);
environment.setown(createPTreeFromIPT(conn->queryRoot()));
options = environment->queryPropTree(xpath.str());
if (!options)
throwUnexpected();
groupName.set(options->queryProp("@nodeGroup"));
if (groupName.isEmpty())
groupName.set(options->queryProp("@name"));
VStringBuffer spareS("%s_spares", groupName.get());
spareGroupName.set(spareS);
group.setown(queryNamedGroupStore().lookup(groupName));
spareGroup.setown(queryNamedGroupStore().lookup(spareGroupName));
}
示例2: processMessage
void processMessage(CMessageBuffer &mb)
{
ICoven &coven=queryCoven();
MemoryBuffer params;
params.swapWith(mb);
int fn;
params.read(fn);
switch (fn) {
case MDR_GET_VALUE: {
StringAttr id;
StringBuffer buf;
params.read(id);
if (0 == stricmp(id,"threads")) {
mb.append(getThreadList(buf).str());
}
else if (0 == stricmp(id, "mpqueue")) {
mb.append(getReceiveQueueDetails(buf).str());
}
else if (0 == stricmp(id, "locks")) {
mb.append(querySDS().getLocks(buf).str());
}
else if (0 == stricmp(id, "sdsstats")) {
mb.append(querySDS().getUsageStats(buf).str());
}
else if (0 == stricmp(id, "connections")) {
mb.append(querySDS().getConnections(buf).str());
}
else if (0 == stricmp(id, "sdssubscribers")) {
mb.append(querySDS().getSubscribers(buf).str());
}
else if (0 == stricmp(id, "clients")) {
mb.append(querySessionManager().getClientProcessList(buf).str());
}
else if (0 == stricmp(id, "subscriptions")) {
mb.append(getSubscriptionList(buf).str());
}
else if (0 == stricmp(id, "mpverify")) {
queryWorldCommunicator().verifyAll(buf);
mb.append(buf.str());
}
else if (0 == stricmp(id, "extconsistency")) {
mb.append(querySDS().getExternalReport(buf).str());
}
else if (0 == stricmp(id, "build")) {
mb.append("$Id: dadiags.cpp 62376 2011-02-04 21:59:58Z sort $");
}
else if (0 == stricmp(id, "sdsfetch")) {
StringAttr branchpath;
params.read(branchpath);
Linked<IPropertyTree> sroot = querySDSServer().lockStoreRead();
try { sroot->queryPropTree(branchpath)->serialize(mb); }
catch (...) { querySDSServer().unlockStoreRead(); throw; }
querySDSServer().unlockStoreRead();
}
else if (0 == stricmp(id, "perf")) {
getSystemTraceInfo(buf,PerfMonStandard);
mb.append(buf.str());
}
else if (0 == stricmp(id, "sdssize")) {
StringAttr branchpath;
params.read(branchpath);
Linked<IPropertyTree> sroot = querySDSServer().lockStoreRead();
StringBuffer sbuf;
try {
toXML(sroot->queryPropTree(branchpath),sbuf);
DBGLOG("sdssize '%s' = %d",branchpath.get(),sbuf.length());
}
catch (...) {
querySDSServer().unlockStoreRead();
throw;
}
querySDSServer().unlockStoreRead();
mb.append(sbuf.length());
}
else if (0 == stricmp(id, "disconnect")) {
StringAttr client;
params.read(client);
SocketEndpoint ep(client);
PROGLOG("Dalidiag request to close client connection: %s", client.get());
Owned<INode> node = createINode(ep);
queryCoven().disconnect(node);
}
else if (0 == stricmp(id, "unlock")) {
__int64 connectionId;
bool disconnect;
params.read(connectionId);
params.read(disconnect);
PROGLOG("Dalidiag request to unlock connection id: %" I64F "x", connectionId);
StringBuffer connectionInfo;
bool success = querySDSServer().unlock(connectionId, disconnect, connectionInfo);
mb.append(success);
if (success)
mb.append(connectionInfo);
}
else if (0 == stricmp(id, "save")) {
PROGLOG("Dalidiag requests SDS save");
querySDSServer().saveRequest();
}
else if (0 == stricmp(id, "settracetransactions")) {
PROGLOG("Dalidiag requests Trace Transactions");
//.........这里部分代码省略.........