BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
QueuingStrategy.h
1 #pragma once
2 
3 #include <string>
4 #include <vector>
5 
6 #include <Poco/SharedPtr.h>
7 
8 #include "model/SensorData.h"
9 
10 namespace BeeeOn {
11 
19 public:
20  typedef Poco::SharedPtr<QueuingStrategy> Ptr;
21 
22  virtual ~QueuingStrategy();
23 
27  virtual bool empty() = 0;
28 
33  virtual void push(const std::vector<SensorData> &data) = 0;
34 
42  virtual size_t peek(std::vector<SensorData> &data, size_t count) = 0;
43 
52  virtual void pop(size_t count) = 0;
53 };
54 
55 }
virtual size_t peek(std::vector< SensorData > &data, size_t count)=0
Serves to access data held by the strategy.
virtual bool empty()=0
virtual void push(const std::vector< SensorData > &data)=0
Serves to insert data into the strategy.
Definition: QueuingStrategy.h:18
virtual void pop(size_t count)=0
Serves to release the data from the strategy.