OoOJoin  0.0.1
The next generation of out-of-order join operator
Window.h
Go to the documentation of this file.
1 
2 //
3 // Created by tony on 22/11/22.
4 //
5 
6 #ifndef INTELLISTREAM_INCLUDE_COMMON_WINDOW_H_
7 #define INTELLISTREAM_INCLUDE_COMMON_WINDOW_H_
8 #include <Common/Tuples.h>
9 #include <Utils/C20Buffers.hpp>
10 namespace OoOJoin {
11 
22 class Window {
23  protected:
27  size_t windowID = 0;
36  public:
40  Window() {}
46  Window(tsType ts, tsType te);
52  void setRange(tsType ts, tsType te);
53  ~Window() {}
62  void init(size_t sLen, size_t rLen, size_t _sysId);
69  bool feedTupleS(TrackTuplePtr ts);
76  bool feedTupleR(TrackTuplePtr tr);
81  bool reset(void);
87  return startTime;
88  }
94  return endTime;
95  }
96 };
100 }
101 #endif //INTELLISTREAM_INCLUDE_COMMON_WINDOW_H_
The class to describe a simplest window.
Definition: Window.h:22
tsType getStart()
get the start time of window
Definition: Window.h:86
tsType getEnd()
get the end time of window
Definition: Window.h:93
void setRange(tsType ts, tsType te)
To set the range of this window.
Definition: Window.cpp:9
bool feedTupleR(TrackTuplePtr tr)
feed a tuple R into the window
Definition: Window.cpp:29
Window()
default creator
Definition: Window.h:40
void init(size_t sLen, size_t rLen, size_t _sysId)
init window with buffer/queue length and id
Definition: Window.cpp:16
tsType startTime
The start time (event) of this window.
Definition: Window.h:31
bool feedTupleS(TrackTuplePtr ts)
feed a tuple s into the window
Definition: Window.cpp:21
size_t windowID
The unique ID in system, used only for multiple window case.
Definition: Window.h:27
tsType endTime
The end time (event) of this window.
Definition: Window.h:35
bool reset(void)
reset the window, clear all tuples
Definition: Window.cpp:36
uint64_t tsType
Definition: Tuples.h:20
std::shared_ptr< class TrackTuple > TrackTuplePtr
The class to describe a shared pointer to TrackTuple.
Definition: Tuples.h:171
Definition: OperatorTable.cpp:7