JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
DirectoryExport.h
Go to the documentation of this file.
1 //
2 // Created by Nico on 17/04/2019.
3 //
4 
5 #ifndef JODA_DIRECTORYEXPORT_H
6 #define JODA_DIRECTORYEXPORT_H
7 
8 #include <joda/config/config.h>
9 #include "IExportDestination.h"
11 
13  public:
14  DirectoryExport(std::string dirname);
15  void consume(JsonContainerQueue::queue_t &queue) override;
16 
17  const std::string toString() override;
18  const std::string toQueryString() override;
19 
20  protected:
21  void exportContainer(std::unique_ptr<JSONContainer> &&cont) override;
22  const std::string getTimerName() override;
23 
24  private:
25  std::string dirname;
26 };
27 
29  : public IWorkerThread<JsonContainerQueue, NullQueue, std::string> {
30  public:
32  ~DirectoryExportThread() override = default;
33 
34  static const size_t recommendedThreads() { return config::parsingThreads; }
35 
36  protected:
37  void work() override;
38 };
39 
40 #endif // JODA_DIRECTORYEXPORT_H
Definition: DirectoryExport.h:29
static const size_t recommendedThreads()
Definition: DirectoryExport.h:34
~DirectoryExportThread() override=default
void work() override
Definition: DirectoryExport.cpp:40
Definition: DirectoryExport.h:12
const std::string toString() override
Definition: DirectoryExport.cpp:32
void consume(JsonContainerQueue::queue_t &queue) override
Definition: DirectoryExport.cpp:26
const std::string getTimerName() override
Definition: DirectoryExport.cpp:9
void exportContainer(std::unique_ptr< JSONContainer > &&cont) override
Definition: DirectoryExport.cpp:16
DirectoryExport(std::string dirname)
Definition: DirectoryExport.cpp:11
const std::string toQueryString() override
Definition: DirectoryExport.cpp:36
Definition: IExportDestination.h:14
Definition: IOThreadPool.h:182
IWorkerThread(IQueue *iqueue, OQueue *oqueue, const WConf &conf)
Definition: IOThreadPool.h:198
static size_t parsingThreads
Definition: config.h:55
Definition: Queue.h:19