Zero  0.1.0
basethread.h
Go to the documentation of this file.
1 #ifndef __BASETHREAD_H
2 #define __BASETHREAD_H
3 
4 #include "thread_wrapper.h"
5 #include "sm_base.h"
6 #include "vol.h"
7 #include "logarchiver.h"
8 #include "xct.h"
9 
10 #include <stdexcept>
11 #include <queue>
12 
13 using namespace std;
14 
16 public:
17  basethread_t();
18 
19  virtual ~basethread_t();
20 
21  bool finished;
22 
23  static void start_base();
24 
25  static void start_buffer();
26 
27  static void start_log(string logdir);
28 
29  // default archiver workspace size = 800MB
30  static void start_archiver(string archdir, size_t wsize, size_t bsize);
31 
32  static void start_merger(string archdir);
33 
34  static void start_other();
35 
36  static void print_stats();
37 
38 protected:
39  void begin_xct();
40 
41  void commit_xct();
42 
43  virtual void before_run();
44 
45  virtual void after_run();
46 
48 
49 private:
50  pthread_mutex_t running_mutex;
51 
53 };
54 
55 #endif // __BASETHREAD_H
Definition: thread_wrapper.h:16
A transaction. Internal to the storage manager.This class may be used in a limited way for the handli...
Definition: xct.h:185
pthread_mutex_t running_mutex
Definition: basethread.h:50
STL namespace.
static sm_options _options
Definition: basethread.h:47
Start-up parameters for the storage engine. See OPTIONS.
Definition: sm_options.h:24
Definition: basethread.h:15
xct_t * current_xct
Definition: basethread.h:52
bool finished
Definition: basethread.h:21