/** * \brief 把TCP连接任务交给下一个任务队列,切换状态 * */ void zTCPClientTask::getNextState() { //Zebra::logger->debug("zTCPClientTask::getNextState"); ConnState old_state = getState(); lifeTime.now(); switch(old_state) { case close: setState(sync); break; case sync: addToContainer(); setState(okay); break; case okay: removeFromContainer(); setState(recycle); break; case recycle: if (terminate == TM_service_close) recycleConn(); setState(close); final(); break; }
/** * \brief 把TCP连接任务交给下一个任务队列,切换状态 * */ void zTCPTask::getNextState() { //Zebra::logger->debug("zTCPTask::getNextState()"); zTCPTask_State old_state = getState(); switch(old_state) { case notuse: setState(verify); break; case verify: setState(sync); break; case sync: buffered = true; addToContainer(); setState(okay); break; case okay: removeFromContainer(); setState(recycle); break; case recycle: setState(notuse); break; } Zebra::logger->debug("zTCPTask::getNextState(%s:%u),%s -> %s)",getIP(),getPort(),getStateString(old_state),getStateString(getState())); }
/// Remove sub category from this category. bool ContentCategory::removeChildCategory(const cms_long child_id) { return removeFromContainer(child_categories_, child_id); }
/// Add parent category. bool ContentCategory::removeParentCategory(const cms_long parent_id) { return removeFromContainer(parent_categories_, parent_id); }
/// Remove content node from this category. bool ContentCategory::removeContentNode(const cms_long node_id) { return removeFromContainer(child_content_, node_id); }