AllianceDB  0.0.1
AllianceDB is an open-source suite, including benchmarks and libs for evaluating and improving stream operation algorithms on modern hardwares.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
INTELLI::AbstractWS Class Reference

An abstraction of window slider, also inherited by both eager and lazy. More...

#include <AbstractWS.h>

Inheritance diagram for INTELLI::AbstractWS:
Collaboration diagram for INTELLI::AbstractWS:

Public Member Functions

void setTimeBased (bool ts)
 to configure the window type More...
 
bool isTimeBased ()
 to read the window type More...
 
void setRunTimeScheduling (bool r)
 to configure the scheduling place More...
 
bool isRunTimeScheduling ()
 to read the scheduling type More...
 
void setWindowLen (size_t wl)
 to set the length of window More...
 
void setSlideLen (size_t sli)
 set the length of slide More...
 
size_t getSlideLen ()
 get the length of slide More...
 
void setParallelSMP (size_t threads)
 to set the parallel level under SMP model More...
 
void reset ()
 reset everything needed
 
size_t getTimeStamp ()
 to get the time stamp More...
 
 AbstractWS (size_t sLen, size_t rLen)
 to init the slider with specific length of queue More...
 
virtual void feedTupleS (TuplePtr ts)
 to feed a tuple s More...
 
virtual void feedTupleR (TuplePtr tr)
 to feed a tuple R More...
 
virtual void initJoinProcessors ()
 to init the initJoinProcessors More...
 
virtual void terminateJoinProcessors ()
 to terminate the join processors
 
virtual void waitAckFromJoinProcessors ()
 to wait the response of join processors
 
virtual size_t getJoinResult ()
 to get the result of join More...
 
struct timeval getSysTime ()
 to get the inline timee structure, the timeSys member More...
 
void setSysTime (struct timeval tv)
 Set the time structure value ,the timeSys member. More...
 
string getName ()
 get the name of the slider More...
 

Protected Member Functions

size_t oldestWindowBelong (size_t ts)
 To get the possible oldest a time stamp belongs to. More...
 

Protected Attributes

INTELLI::join_type_t myType = INTELLI::CNT_BASED
 
size_t countS
 
size_t countR
 
size_t windowLen = 0
 
size_t slideLen = 1
 
std::vector< size_t > partitionWeight
 
std::vector< size_t > partitionSizeFinal
 
size_t threads
 
size_t sLen
 
size_t rLen
 
bool runTimeScheduling = false
 
bool timeBased = false
 
bool isRunning = false
 
struct timeval timeSys
 
TuplePtrQueue TuplePtrQueueInS
 
TuplePtrQueue TuplePtrQueueInR
 
string nameTag
 

Detailed Description

An abstraction of window slider, also inherited by both eager and lazy.

Class that is inherited using public inheritance

Author
Tony Zeng
Note
To init and run, follow the functions below to start a WS

Constructor & Destructor Documentation

◆ AbstractWS()

INTELLI::AbstractWS::AbstractWS ( size_t  sLen,
size_t  rLen 
)

to init the slider with specific length of queue

Parameters
sLenthe length of S queue
rLenthe length of R queue

Member Function Documentation

◆ feedTupleR()

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

to feed a tuple R

Parameters
trthe tuple r
Note
this function is thread-safe :)

Reimplemented in INTELLI::SplitJoinWS, and INTELLI::HandShakeWS.

◆ feedTupleS()

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

to feed a tuple s

Parameters
tsthe tuple s
Note
this function is thread-safe :)

Reimplemented in INTELLI::SplitJoinWS, and INTELLI::HandShakeWS.

◆ getJoinResult()

virtual size_t INTELLI::AbstractWS::getJoinResult ( )
inlinevirtual

to get the result of join

Returns
how many tuples are joined
Note
only called after all join processors are stopped ,use terminateJoinProcessors to achieve this

Reimplemented in INTELLI::VerifyWS, INTELLI::SplitJoinWS, INTELLI::HandShakeWS, INTELLI::AbstractLazyWS, and INTELLI::AbstractEagerWS.

◆ getName()

string INTELLI::AbstractWS::getName ( )
inline

get the name of the slider

Returns
the nameTag;

◆ getSlideLen()

size_t INTELLI::AbstractWS::getSlideLen ( )
inline

get the length of slide

Returns
the length of slide

◆ getSysTime()

struct timeval INTELLI::AbstractWS::getSysTime ( )
inline

to get the inline timee structure, the timeSys member

Returns
the timeSys member

◆ getTimeStamp()

size_t INTELLI::AbstractWS::getTimeStamp ( )
inline

to get the time stamp

Returns
the time stamp, default in 10 us

◆ initJoinProcessors()

virtual void INTELLI::AbstractWS::initJoinProcessors ( )
inlinevirtual

to init the initJoinProcessors

Note
only after this is called can we start to feed tuples

Reimplemented in INTELLI::VerifyWS, INTELLI::SplitJoinWS, INTELLI::SplitJoinIRWS, INTELLI::HandShakeWS, INTELLI::AbstractLazyWS, and INTELLI::AbstractEagerWS.

◆ isRunTimeScheduling()

bool INTELLI::AbstractWS::isRunTimeScheduling ( )
inline

to read the scheduling type

Returns
wether the runtime schedules

◆ isTimeBased()

bool INTELLI::AbstractWS::isTimeBased ( )
inline

to read the window type

Returns
wether the slider is time-baesd

◆ oldestWindowBelong()

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

To get the possible oldest a time stamp belongs to.

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

◆ setParallelSMP()

void INTELLI::AbstractWS::setParallelSMP ( size_t  threads)
inline

to set the parallel level under SMP model

Parameters
threadsto how many threads will run the join

◆ setRunTimeScheduling()

void INTELLI::AbstractWS::setRunTimeScheduling ( bool  r)
inline

to configure the scheduling place

Parameters
rwether let runtime schedule

◆ setSlideLen()

void INTELLI::AbstractWS::setSlideLen ( size_t  sli)
inline

set the length of slide

Parameters
sliThe assigned length

◆ setSysTime()

void INTELLI::AbstractWS::setSysTime ( struct timeval  tv)
inline

Set the time structure value ,the timeSys member.

Parameters
tvThe value

◆ setTimeBased()

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

to configure the window type

Parameters
tswether the slider is time-baesd

◆ setWindowLen()

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

to set the length of window

Parameters
wlthe window length

Member Data Documentation

◆ timeSys

struct timeval INTELLI::AbstractWS::timeSys
protected

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


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