AllianceDB  0.0.1
AllianceDB is an open-source suite, including benchmarks and libs for evaluating and improving stream operation algorithms on modern hardwares.
INTELLI::AbstractJP Class Reference

The basic class of join processor. More...

#include <JoinProcessor/AbstractJP.h>

Inheritance diagram for INTELLI::AbstractJP:
Collaboration diagram for INTELLI::AbstractJP:

Public Member Functions

void inputCmd (join_cmd_t cmd)
 input an outside command More...
 
join_cmd_t waitResponse ()
 wait and return the response of this join processor More...
 
virtual void init (size_t sLen, size_t rLen, size_t _sysId)
 init the join processor with buffer/queue length and id More...
 
void setTimeBased (bool ts)
 to configure the window type More...
 
bool isTimeBased ()
 to read the window type More...
 
void setWindowLen (size_t wl)
 to set the length of window More...
 
void setGlobalWindow (size_t wlen, size_t sli)
 set the window parameters of global window More...
 
virtual void feedTupleS (TuplePtr ts)
 feed a tuple s into the s input queue More...
 
virtual void feedTupleR (TuplePtr tr)
 feed a tuple r into the r input queue More...
 
void setTimeVal (struct timeval tv)
 set the timeval struct More...
 
size_t getTimeStamp ()
 Get the time stamp. More...
 
size_t getJoinedResult ()
 get the join results More...
 
void setCore (int id)
 bind to specific core More...
 
- Public Member Functions inherited from INTELLI::AbstractC20Thread
void startThread ()
 to start this thread
 
void joinThread ()
 the thread join function
 

Public Attributes

int cpuBind = -1
 

Protected Member Functions

void sendResponseCmd (join_cmd_t cmd)
 
void sendAck ()
 
bool testCmd (join_cmd_t cmd)
 To test if a cmd is remained in queue and in desired cmd. More...
 
virtual void inlineMain ()
 The 'main' function of AbstractP. More...
 
size_t oldestWindowBelong (size_t ts)
 To get the possible oldest window a time stamp belongs to. More...
 

Protected Attributes

TuplePtrQueue TuplePtrQueueInS
 
TuplePtrQueue TuplePtrQueueInR
 
CmdQueuePtr cmdQueueIn
 
CmdQueuePtr cmdQueueOut
 
size_t sysId
 
struct timeval timeSys
 
bool timeBased = false
 
size_t windowLen = 0
 
size_t windowLenGlobal = 0
 
size_t slideLenGlobal = 0
 
size_t joinedResult = 0
 
JoinAlgoTablePtr myAlgo
 
- Protected Attributes inherited from INTELLI::AbstractC20Thread
std::shared_ptr< std::thread > threadPtr
 

Detailed Description

The basic class of join processor.

Note
first init the JP before startThread

Member Function Documentation

◆ feedTupleR()

virtual void INTELLI::AbstractJP::feedTupleR ( TuplePtr  tr)
inlinevirtual

feed a tuple r into the r input queue

Parameters
trThe tuple

◆ feedTupleS()

virtual void INTELLI::AbstractJP::feedTupleS ( TuplePtr  ts)
inlinevirtual

feed a tuple s into the s input queue

Parameters
tsThe tuple

◆ getJoinedResult()

size_t INTELLI::AbstractJP::getJoinedResult ( )
inline

get the join results

Returns
Tuples joined

◆ getTimeStamp()

size_t INTELLI::AbstractJP::getTimeStamp ( )
inline

Get the time stamp.

Returns
The time stamp, in TIME_STEP us

◆ init()

virtual void INTELLI::AbstractJP::init ( size_t  sLen,
size_t  rLen,
size_t  _sysId 
)
inlinevirtual

init the join processor with buffer/queue length and id

Parameters
sLenThe length of S queue and buffer
rLenThe length of R queue and buffer
_sysIdThe system id

Reimplemented in INTELLI::SplitJoinJP, INTELLI::SplitJoinIRJP, INTELLI::HandShakeJP, INTELLI::CellJoinJP, and INTELLI::AbstractLazyJP.

◆ inlineMain()

virtual void INTELLI::AbstractJP::inlineMain ( )
inlineprotectedvirtual

The 'main' function of AbstractP.

Note
This is a re-implementation of AbstractC20Thread

Reimplemented from INTELLI::AbstractC20Thread.

Reimplemented in INTELLI::SplitJoinJP, INTELLI::SplitJoinIRJP, INTELLI::HandShakeJP, INTELLI::CellJoinJP, and INTELLI::AbstractLazyJP.

◆ inputCmd()

void INTELLI::AbstractJP::inputCmd ( join_cmd_t  cmd)
inline

input an outside command

Parameters
cmdThe Command

◆ isTimeBased()

bool INTELLI::AbstractJP::isTimeBased ( )
inline

to read the window type

Returns
wether the slider is time-baesd

◆ oldestWindowBelong()

size_t INTELLI::AbstractJP::oldestWindowBelong ( size_t  ts)
inlineprotected

To get the possible oldest window a time stamp belongs to.

Parameters
tsThe time stamp
Returns
The window number, start from 0

◆ setCore()

void INTELLI::AbstractJP::setCore ( int  id)
inline

bind to specific core

Parameters
idThe core id

◆ setGlobalWindow()

void INTELLI::AbstractJP::setGlobalWindow ( size_t  wlen,
size_t  sli 
)
inline

set the window parameters of global window

Parameters
wlenwindow length
slislide

◆ setTimeBased()

void INTELLI::AbstractJP::setTimeBased ( bool  ts)
inline

to configure the window type

Parameters
tswether the slider is time-baesd

◆ setTimeVal()

void INTELLI::AbstractJP::setTimeVal ( struct timeval  tv)
inline

set the timeval struct

Parameters
tvThe struct to be set

◆ setWindowLen()

void INTELLI::AbstractJP::setWindowLen ( size_t  wl)
inline

to set the length of window

Parameters
wlthe window length

◆ testCmd()

bool INTELLI::AbstractJP::testCmd ( join_cmd_t  cmd)
inlineprotected

To test if a cmd is remained in queue and in desired cmd.

Parameters
cmdThe desired command
Returns
true if such command exists

◆ waitResponse()

join_cmd_t INTELLI::AbstractJP::waitResponse ( )
inline

wait and return the response of this join processor

Returns
the response command

Member Data Documentation

◆ timeSys

struct timeval INTELLI::AbstractJP::timeSys
protected

timeval structure from linux, <sys/time.h>


The documentation for this class was generated from the following file: