JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Public Member Functions | Protected Member Functions | Protected Attributes
MemoryJoinManager Class Reference

#include <MemoryJoinManager.h>

Inheritance diagram for MemoryJoinManager:
[legend]
Collaboration diagram for MemoryJoinManager:
[legend]

Public Member Functions

 MemoryJoinManager (const std::string &name, std::unique_ptr< joda::query::IValueProvider > &&valProv)
 
 ~MemoryJoinManager () override
 
void join (const RapidJsonDocument &doc) override
 
const std::string & getName () const override
 
void loadJoin (std::shared_ptr< JSONStorage > &load)
 
- Public Member Functions inherited from JoinManager
 JoinManager (std::string name, std::unique_ptr< joda::query::IValueProvider > &&valProv)
 
virtual ~JoinManager ()
 
virtual void join (JSONContainer &cont)
 

Protected Member Functions

JODA_JOINID getJoinVal (const RJValue &val)
 

Protected Attributes

std::mutex mut
 
JODA_JOINID currID = STARTNORMAL_VAL
 
std::unordered_map< long, JODA_JOINIDlMap
 
std::unordered_map< std::string, JODA_JOINIDsMap
 
bool trueValCreated = false
 
bool falseValCreated = false
 
std::unordered_map< JODA_JOINID, std::unique_ptr< MemoryJoinDoc > > docs
 
- Protected Attributes inherited from JoinManager
std::string name
 
std::unique_ptr< joda::query::IValueProvidervalProv
 

Additional Inherited Members

- Protected Types inherited from JoinManager
enum  JoinVals { NOT_HASHABLE = 0 , FALSE_VAL = 1 , TRUE_VAL = 2 , STARTNORMAL_VAL = 3 }
 

Detailed Description

The MemoryJoinManager is responsible for joining/grouping documents using a document in the memory

Constructor & Destructor Documentation

◆ MemoryJoinManager()

MemoryJoinManager::MemoryJoinManager ( const std::string &  name,
std::unique_ptr< joda::query::IValueProvider > &&  valProv 
)

Initializes the MemoryJoinManager

Parameters
nameName/Identifier of the join.
valProvThe IValueProvider to receive the join values from.

◆ ~MemoryJoinManager()

MemoryJoinManager::~MemoryJoinManager ( )
overridedefault

Member Function Documentation

◆ getJoinVal()

JODA_JOINID MemoryJoinManager::getJoinVal ( const RJValue val)
protected
Here is the caller graph for this function:

◆ getName()

const std::string & MemoryJoinManager::getName ( ) const
overridevirtual

Returns the name/identifier of the join.

Returns
the name/identifier of the join

Reimplemented from JoinManager.

Here is the call graph for this function:

◆ join()

void MemoryJoinManager::join ( const RapidJsonDocument doc)
overridevirtual

Joins a single document with the others

Parameters
docThe document to join

Implements JoinManager.

Here is the call graph for this function:

◆ loadJoin()

void MemoryJoinManager::loadJoin ( std::shared_ptr< JSONStorage > &  load)

Fills the given JSONStorage with containers containing the joined documents

Parameters
loadthe JSONStorage to fill.
Here is the caller graph for this function:

Field Documentation

◆ currID

JODA_JOINID MemoryJoinManager::currID = STARTNORMAL_VAL
protected

◆ docs

std::unordered_map<JODA_JOINID, std::unique_ptr<MemoryJoinDoc> > MemoryJoinManager::docs
protected

◆ falseValCreated

bool MemoryJoinManager::falseValCreated = false
protected

◆ lMap

std::unordered_map<long, JODA_JOINID> MemoryJoinManager::lMap
protected

◆ mut

std::mutex MemoryJoinManager::mut
protected

◆ sMap

std::unordered_map<std::string, JODA_JOINID> MemoryJoinManager::sMap
protected

◆ trueValCreated

bool MemoryJoinManager::trueValCreated = false
protected

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