Skip to content

Commit f22e048

Browse files
committed
CTT - update base Storage plugin class
1 parent c1d7c19 commit f22e048

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

include/ipfixprobe/storage.hpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
#include <string>
4040
#include <memory>
4141
#include <telemetry.hpp>
42+
#ifdef WITH_CTT
43+
#include "../../storage/cttController.hpp"
44+
#endif /* WITH_CTT */
4245

4346
namespace ipxp {
4447

@@ -93,10 +96,15 @@ class StoragePlugin : public Plugin
9396
virtual void export_expired(time_t ts)
9497
{
9598
}
99+
96100
virtual void finish()
97101
{
98102
}
99103

104+
#ifdef WITH_CTT
105+
virtual void set_ctt_config(const std::shared_ptr<CttController>& ctt_controller) = 0;
106+
#endif /* WITH_CTT */
107+
100108
/**
101109
* \brief set telemetry directory for the storage
102110
*/
@@ -133,22 +141,22 @@ class StoragePlugin : public Plugin
133141

134142
/**
135143
* \brief Checks if process plugins require all available data.
136-
* \param [in] rec Stored flow record.
144+
* \param [in] flow Stored flow record.
137145
* \return True if all data required, false otherwise.
138146
*/
139147
bool all_data_required(const Flow& flow) const noexcept
140148
{
141-
return m_plugins_status.get_all_data.any();
149+
return flow.plugins_status.get_all_data.any();
142150
}
143151

144152
/**
145153
* \brief Checks if process plugins don't require any data.
146-
* \param [in] rec Stored flow record.
154+
* \param [in] flow Stored flow record.
147155
* \return True if no data required, false otherwise.
148156
*/
149157
bool no_data_required(const Flow& flow) const noexcept
150158
{
151-
return m_plugins_status.get_no_data.all();
159+
return flow.plugins_status.get_no_data.all();
152160
}
153161

154162
/**
@@ -158,7 +166,7 @@ class StoragePlugin : public Plugin
158166
*/
159167
bool only_metadata_required(const Flow& flow) const noexcept
160168
{
161-
return !all_data_required(flow) && !no_data_required(flow);
169+
return !all_data_required(flow);
162170
}
163171
protected:
164172
//Every StoragePlugin implementation should call these functions at appropriate places

0 commit comments

Comments
 (0)