OoOJoin  0.0.1
The next generation of out-of-order join operator
AbstractJoinAlgo.h
Go to the documentation of this file.
1 
2 //
3 // Created by tony on 11/03/22.
4 //
5 
6 #ifndef _JOINALGO_ABSTRACTJOINALGO_H_
7 #define _JOINALGO_ABSTRACTJOINALGO_H_
8 #include <Common/Window.h>
9 #include <string>
10 #include <memory>
11 #include <assert.h>
12 #include <Utils/ConfigMap.hpp>
13 //#include <Utils/Logger.hpp>/
14 using namespace INTELLI;
15 #define ALGO_INFO INTELLI_INFO
16 #define ALGO_ERROR INTELLI_ERROR
17 #define ALGO_WARNNING INTELLI_WARNING
18 namespace OoOJoin {
37  protected:
38  std::string nameTag;
39  struct timeval timeBaseStruct;
40  //tsType timeStep;
41  public:
42  ConfigMapPtr config;
44  setAlgoName("NULL");
45  }
46  ~AbstractJoinAlgo() {}
52  virtual bool setConfig(ConfigMapPtr cfg);
61  virtual size_t join(C20Buffer<OoOJoin::TrackTuplePtr> windS,
63  int threads = 1);
68  void setAlgoName(std::string name) {
69  nameTag = name;
70  }
75  std::string getAlgoName() {
76  return nameTag;
77  }
78 
83  void syncTimeStruct(struct timeval tv) {
84  timeBaseStruct = tv;
85  }
86 };
87 
88 typedef std::shared_ptr<AbstractJoinAlgo> AbstractJoinAlgoPtr;
89 #define newAbstractJoinAlgo() std::make_shared<AbstractJoinAlgo>()
94 }
95 
96 #endif //ALIANCEDB_INCLUDE_JOINALGO_ABSTRACTJOINALGO_H_
The abstraction to describe a join algorithm, providing virtual function of join.
Definition: AbstractJoinAlgo.h:36
void syncTimeStruct(struct timeval tv)
Synchronize the time structure with outside setting.
Definition: AbstractJoinAlgo.h:83
void setAlgoName(std::string name)
set the name of algorithm
Definition: AbstractJoinAlgo.h:68
std::string getAlgoName()
get the name of algorithm
Definition: AbstractJoinAlgo.h:75
std::shared_ptr< ConfigMap > ConfigMapPtr
The class to describe a shared pointer to ConfigMap.
Definition: ConfigMap.hpp:356
Definition: OperatorTable.cpp:7