BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Types | Public Member Functions
BeeeOn::QueuingStrategy Interface Referenceabstract

#include <QueuingStrategy.h>

Inheritance diagram for BeeeOn::QueuingStrategy:
BeeeOn::InMemoryQueuingStrategy BeeeOn::JournalQueuingStrategy BeeeOn::RecoverableJournalQueuingStrategy

Public Types

typedef Poco::SharedPtr
< QueuingStrategy
Ptr
 

Public Member Functions

virtual bool empty ()=0
 
virtual void push (const std::vector< SensorData > &data)=0
 Serves to insert data into the strategy. More...
 
virtual size_t peek (std::vector< SensorData > &data, size_t count)=0
 Serves to access data held by the strategy. More...
 
virtual void pop (size_t count)=0
 Serves to release the data from the strategy. More...
 

Detailed Description

A class that implements this interface should provide holding a backup of SensorData. The typical usage should be inserting, accessing and releasing the data.

Member Function Documentation

virtual bool BeeeOn::QueuingStrategy::empty ( )
pure virtual
Returns
True if no data are being held on the strategy.

Implemented in BeeeOn::JournalQueuingStrategy, and BeeeOn::InMemoryQueuingStrategy.

virtual size_t BeeeOn::QueuingStrategy::peek ( std::vector< SensorData > &  data,
size_t  count 
)
pure virtual

Serves to access data held by the strategy.

Parameters
dataVector to be filled with the data.
countRequired data count.
Returns
The real count of the peeked data. This should match with the required count, if enough data are available, or less, if there are less data available then required.

Implemented in BeeeOn::JournalQueuingStrategy, and BeeeOn::InMemoryQueuingStrategy.

virtual void BeeeOn::QueuingStrategy::pop ( size_t  count)
pure virtual

Serves to release the data from the strategy.

This method access the held data same way as the method peek(), so the same data that would be peeked by calling QueuingStrategy::peek(count) are released from the strategy by calling pop(count).

Parameters
countCount of data to be released.

Implemented in BeeeOn::JournalQueuingStrategy, and BeeeOn::InMemoryQueuingStrategy.

virtual void BeeeOn::QueuingStrategy::push ( const std::vector< SensorData > &  data)
pure virtual

Serves to insert data into the strategy.

Parameters
dataData to be inserted.

Implemented in BeeeOn::JournalQueuingStrategy, and BeeeOn::InMemoryQueuingStrategy.


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