~stewart/percona-playback/cassert-header

« back to all changes in this revision

Viewing changes to src/processor.h

  • Committer: Oleg Tsarev
  • Date: 2011-05-04 21:38:59 UTC
  • mfrom: (108.1.18 sbt)
  • Revision ID: oleg.tsarev@percona.com-20110504213859-pw1mgjmuj9gz44vb
merge split_by_transaction

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef __PERCONA_PLAYBACK__PROCESSOR__H__
2
 
#define __PERCONA_PLAYBACK__PROCESSOR__H__
3
 
 
4
 
#include "query.h"
5
 
 
6
 
/*
7
 
  Query_Generator (SLow Query Log Parser / TCP-dump parser / libpcap)
8
 
  Query_Sheduler  (Exact, Split-by-connection, Split-by-transaction) / Query_Producer
9
 
  Query_Processor (Dry, Client, Split) / Query_Result_Producer
10
 
  Query_Result_Processor
11
 
 
12
 
  Query_Generator ===shedule[query]===> Query_Sheduler
13
 
 
14
 
  Query_Sheduler ===start_thread[thread_id, name, Query_Producer*]===> Query_Processor
15
 
  Query_Producer <===[query]===/ implementation details /=== Query_Sheduler
16
 
  Query_Sheduler ===stop_thread [Query_Producer*]===> Query_Processor
17
 
 
18
 
  Query_Processor <===| Worker_Pool<Task>
19
 
 
20
 
  Query_Processor ===start_thread[thread_id, name, Query_Result_Producer*]===> Query_Result_Processor
21
 
  Query_Result_Producer <===[query]===/ implementation details /=== Query_Processor
22
 
  Query_Processor ===stop_thread [Query_Result_Producer*]===> Query_Result_Processor
23
 
  
24
 
 */
25
 
 
26
 
class Query_Processor
27
 
{
28
 
public:
29
 
  virtual ~Query_Processor() {}
30
 
 
31
 
  virtual void start()= 0;
32
 
  virtual void stop()= 0;
33
 
  virtual void wait()= 0;
34
 
  virtual void flush()= 0;
35
 
  virtual void run(Query const &)= 0;
36
 
};
37
 
typedef boost::shared_ptr<Query_Processor> Query_Processor_Pointer;
38
 
 
39
 
#endif // __PERCONA_PLAYBACK__PROCESSOR__H__