NebulaStream  0.6.213
NebulaStream is a data and application management framework for the internet of things
NES::Statistic::DefaultStatisticStore Class Reference

This is a thread-safe StatisticStore that simply stores all data in an unordered_map that is made thread-safe by using folly::Synchronized. More...

#include <DefaultStatisticStore.hpp>

Collaboration diagram for NES::Statistic::DefaultStatisticStore:
[legend]

Public Member Functions

std::vector< StatisticPtrgetStatistics (const StatisticHash &statisticHash, const Windowing::TimeMeasure &startTs, const Windowing::TimeMeasure &endTs) override
 Gets all statistics belonging to the statisticHash in the period of [startTs, endTs]. More...
 
std::vector< HashStatisticPairgetAllStatistics () override
 Returns all statistics currently in this store. More...
 
bool insertStatistic (const StatisticHash &statisticHash, StatisticPtr statistic) override
 Implements the insert of the interface. If a statistic exists with the same startTs and endTs, we do not allow the insertion. More...
 
bool deleteStatistics (const StatisticHash &statisticHash, const Windowing::TimeMeasure &startTs, const Windowing::TimeMeasure &endTs) override
 Implements the delete of the interface for all statistics in the period [startTs, endTs]. More...
 
virtual ~DefaultStatisticStore ()
 Virtual destructor. More...
 
- Public Member Functions inherited from NES::Statistic::AbstractStatisticStore
virtual ~AbstractStatisticStore ()=default
 Virtual destructor. More...
 

Static Public Member Functions

static StatisticStorePtr create ()
 Creates a DefaultStatisticStore. More...
 

Detailed Description

This is a thread-safe StatisticStore that simply stores all data in an unordered_map that is made thread-safe by using folly::Synchronized.

Constructor & Destructor Documentation

◆ ~DefaultStatisticStore()

NES::Statistic::DefaultStatisticStore::~DefaultStatisticStore ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ create()

StatisticStorePtr NES::Statistic::DefaultStatisticStore::create ( )
static

Creates a DefaultStatisticStore.

Returns
StatisticStorePtr

Referenced by NES::Runtime::Execution::CountMinBuildExecutionTest::SetUp(), and NES::Runtime::Execution::HyperLogLogBuildExecutionTest::SetUp().

Here is the caller graph for this function:

◆ deleteStatistics()

bool NES::Statistic::DefaultStatisticStore::deleteStatistics ( const StatisticHash &  statisticHash,
const Windowing::TimeMeasure &  startTs,
const Windowing::TimeMeasure &  endTs 
)
overridevirtual

Implements the delete of the interface for all statistics in the period [startTs, endTs].

Parameters
statisticKey
startTs
endTs
Returns
True, if at least one statistic was deleted

Implements NES::Statistic::AbstractStatisticStore.

Referenced by NES::Statistic::TEST_F().

Here is the caller graph for this function:

◆ getAllStatistics()

std::vector< HashStatisticPair > NES::Statistic::DefaultStatisticStore::getAllStatistics ( )
overridevirtual

Returns all statistics currently in this store.

Returns
Vector of HashStatisticPair

Implements NES::Statistic::AbstractStatisticStore.

◆ getStatistics()

std::vector< StatisticPtr > NES::Statistic::DefaultStatisticStore::getStatistics ( const StatisticHash &  statisticHash,
const Windowing::TimeMeasure &  startTs,
const Windowing::TimeMeasure &  endTs 
)
overridevirtual

Gets all statistics belonging to the statisticHash in the period of [startTs, endTs].

Parameters
statisticHash
startTs
endTs
Returns
Vector of StatisticPtr

Implements NES::Statistic::AbstractStatisticStore.

Referenced by NES::Statistic::TEST_F(), and NES::Statistic::TEST_P().

Here is the caller graph for this function:

◆ insertStatistic()

bool NES::Statistic::DefaultStatisticStore::insertStatistic ( const StatisticHash &  statisticHash,
StatisticPtr  statistic 
)
overridevirtual

Implements the insert of the interface. If a statistic exists with the same startTs and endTs, we do not allow the insertion.

Parameters
statisticKey
statistic
Returns
True, if the statistic was inserted into this storage.

Implements NES::Statistic::AbstractStatisticStore.

Referenced by NES::Statistic::TEST_F().

Here is the caller graph for this function:

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