00001
00002 #ifndef SENDS_MAIN_HH
00003 #define SENDS_MAIN_HH
00004
00005 #include "authorize.hh"
00006 #include "concentrator.hh"
00007 #include "parse_stage.hh"
00008 #include "lookup_stage.hh"
00009 #include "fetch_stage.hh"
00010 #include "write_stage.hh"
00011
00012 namespace sends {
00013
00014 class transaction;
00015
00022 class sends_main {
00023 public:
00032 sends_main(int argc, const char* argv[]);
00033
00037 ~sends_main(void);
00038
00042 void configure(void);
00043
00047 void doit(void);
00048
00049 private:
00050
00051 typedef std::map<std::string, seda_stage::stage_pars> stage_par_map;
00052 typedef stage_par_map::iterator stage_par_iter;
00053 typedef stage_par_map::const_iterator const_stage_par_iter;
00054 typedef stage_par_map::value_type stage_par_node;
00055
00056 private:
00057 authorize mAuthPool;
00058 concentrator mConcPool;
00059 parse_stage mParsePool;
00060 lookup_stage mLookupPool;
00061 fetch_stage mFetchPool;
00062 write_stage mWritePool;
00063 tran_queue tranQ;
00064 std::vector<transaction*> tranVec;
00065
00066
00067 stage_par_map mStageParMap;
00068 int mSmallBufSize;
00069 int mSmallBufCount;
00070 int mLargeBufSize;
00071 int mLargeBufCount;
00072 int mTransCount;
00073 std::string mListenAddr;
00074 int mListenQueue;
00075 typedef std::pair<unsigned int, unsigned int> allow_node;
00076 std::vector<allow_node> mAllowVect;
00077 };
00078
00079 }
00080
00081
00082 #endif // !defined(SENDS_MAIN_HH)