<commit_before>/*
 * =====================================================================================
 *
 *       Filename:  appreq_serv_thread.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  2015/3/9 10:31:31
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  wangxx
 *   Organization:  lj
 *
 * =====================================================================================
 * ============================== CHANGE REPORT HISTORY ================================
 * |   VERSION   |   UPDATE DATE   |   UPDATED BY   |   DESCRIPTION OF CHANGE   |*
 
 * =========================== END OF CHANGE REPORT HISTORY ============================
 */
#if !defined(APPREQSERVTHREAD_H_)
#define APPREQSERVTHREAD_H_
#include "cthread.h"
#include "collection_server.h"
#include "appreq_handler.h"
#include <map>
#include <sys/epoll.h>
#include "info_mem_mgr.h"
#include "msg_list.h"
#include "mysqlconn_wrapper.h"

using namespace std;


/*
 * =====================================================================================
 *        Class:  AppReqServThread
 *  Description:  
 * =====================================================================================
 */
class AppReqServThread : public CThread
{
	public:
		AppReqServThread();                             /* constructor */
		~AppReqServThread();                            /* destructor       */
		int init(InfoMemMgr *info_mem, MsgList* app_queue, MsgList* logic_queue, MsgList* recurrent_regnot_queue, map<unsigned int, char*>* add_user_req, MySQLConnWrapper* db);
		int open(void *args = 0);
		int svc();
		int loop_process();
		int handle_request(int fd);
		int deal_new_connection();
		int deal_logic_resp_queue();
		int send_data(int fd, char *data, unsigned int len);
		int my_check_epoll();
		int stop();
		int close_connection(int fd);
		int close_all_connection();
		int deal_recurrent_regnot_ack(AckMsg* ack, ActivateMsg* recurrent_regnot , ActiveUser* user);<commit_msg>修改了 appreq_serv_thread.h 文件，增加了 void sync_data();<commit_after>/*
 * =====================================================================================
 *
 *       Filename:  appreq_serv_thread.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  2015/3/9 10:31:31
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  wangxx
 *   Organization:  lj
 *
 * =====================================================================================
 * ============================== CHANGE REPORT HISTORY ================================
 * |   VERSION   |   UPDATE DATE   |   UPDATED BY   |   DESCRIPTION OF CHANGE   |*
 
 * =========================== END OF CHANGE REPORT HISTORY ============================
 */
#if !defined(APPREQSERVTHREAD_H_)
#define APPREQSERVTHREAD_H_
#include "cthread.h"
#include "collection_server.h"
#include "appreq_handler.h"
#include <map>
#include <sys/epoll.h>
#include "info_mem_mgr.h"
#include "msg_list.h"
#include "mysqlconn_wrapper.h"

using namespace std;


/*
 * =====================================================================================
 *        Class:  AppReqServThread
 *  Description:  
 * =====================================================================================
 */
class AppReqServThread : public CThread
{
	public:
		AppReqServThread();                             /* constructor */
		~AppReqServThread();                            /* destructor       */
		int init(InfoMemMgr *info_mem, MsgList* app_queue, MsgList* logic_queue, MsgList* recurrent_regnot_queue, map<unsigned int, char*>* add_user_req, MySQLConnWrapper* db);
		int open(void *args = 0);
		int svc();
		int loop_process();
		int handle_request(int fd);
		int deal_new_connection();
		int deal_logic_resp_queue();
		int send_data(int fd, char *data, unsigned int len);
		int my_check_epoll();
		int stop();
		void sync_data();
		int close_connection(int fd);
		int close_all_connection();
		int deal_recurrent_regnot_ack(AckMsg* ack, ActivateMsg* recurrent_regnot , ActiveUser* user);
{'fraction_non_alphanumeric': 0.31345490389354363, 'fraction_numerical': 0.007392804337111878, 'mean_word_length': 4.151015228426396, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7116326', 'n_tokens_mistral': 1267, 'n_tokens_neox': 1124, 'n_words': 249}