Exemplo n.º 1
0
wxString slPath::GetSql(ctlTree *browser)
{
	if (sql.IsNull())
	{
		sql = wxT("-- Register path to node ") + GetName() + wxT(".\n\n")
		      wxT("SELECT ") + GetCluster()->GetSchemaPrefix()
		      + wxT("storepath(") + NumToStr(GetSlId())
		      + wxT(", ") + NumToStr(GetNode()->GetSlId())
		      + wxT(", ") + qtDbString(GetConnInfo())
		      + wxT(", ") + NumToStr(GetConnRetry())
		      + wxT(");\n");
	}
	return sql;
}
Exemplo n.º 2
0
void TestCliFramework::OnMessage(MsgBlock* pMsgBlock)
{
    assert(pMsgBlock != NULL);
    //PBReflect::ErrorCode error;
    //SharedPtr<Message> msgPtr = PBReflect::ParsePBMsg(pMsgBlock->get_ptr()
    //                                                 ,pMsgBlock->length()
    //												   ,pMsgBlock->Header()->Command()
    //												   ,&error);
    if(pMsgBlock->Header()->Mode() == MsgHeader::TMCP_Mod_Request ||
        pMsgBlock->Header()->Mode() == MsgHeader::TMCP_Mod_Notify)
    {
        SharedPtr<ProtoCmdBase> cmdPtr = ProtoCmdBase::CreateObject(pMsgBlock->Header()->Command());
    }
    else if(pMsgBlock->Header()->Mode() == MsgHeader::TMCP_Mod_Response)
    {		
        ConnInfo* pCIF = GetConnInfo(pMsgBlock->ServerID(),pMsgBlock->ConnID());
        if(pCIF)
        {
            ConnUserData* pUData = (ConnUserData*)pCIF->GetUserData();
            if(!pUData)
            {
                LOG_DEBUG("ConnUserData Is NULL When OnMessage,ServerID:%u,ConnID:%u"
                         ,pMsgBlock->ServerID()
                         ,pMsgBlock->ConnID());
                return;
            }
            SharedPtr<ProtoCmdBase> cmdPtr = pUData->GetCmd_R(pMsgBlock->Header()->Sequence());
            if(!cmdPtr.isNull())
            {
                cmdPtr->OnResponse(pMsgBlock);
                TestCaseCtx::m_ResponseNum++;
                SInt64 eTime = OS::Milliseconds();
                gTestCaseCtxPtr::instance()->SetEndTime(eTime);
            }
            else
            {
                LOG_DEBUG("Can't Find ProtoCmd When OnResponse:ServerID:%u,ConnID:%u,Seq:%u"
                         ,pMsgBlock->ServerID()
                         ,pMsgBlock->ConnID()
                         ,pMsgBlock->Header()->Sequence());
            }
        }
    }
    else
    {
        LOG_DEBUG("Error Mode:%d",pMsgBlock->Header()->Mode());
    }
}
Exemplo n.º 3
0
void slPath::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
	if (!expandedKids)
	{
		expandedKids = true;

		browser->RemoveDummyChild(this);
	}


	if (properties)
	{
		CreateListColumns(properties);

		properties->AppendItem(_("Server name"), GetName().BeforeFirst('\n'));
		properties->AppendItem(_("Server ID"), GetSlId());
		properties->AppendItem(_("Connect info"), GetConnInfo());
		properties->AppendItem(_("Retry"), GetConnRetry());
	}
}