Free Electron
MultiGroupWriter.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __network_MultiGroupWriter_h__
8 #define __network_MultiGroupWriter_h__
9 
10 #include <network/network.h>
11 namespace fe
12 {
13 namespace ext
14 {
15 
16 class MultiGroupWriter;
17 
18 struct MultiGroupWriterTask
19 {
20  MultiGroupWriterTask(void);
21  void operator()();
22  sp<ChunkSpool> m_spChunkSpool;
23  MultiGroupWriter *m_pMultiGroupWriter;
24  std::string m_prefix;
25  unsigned int m_count;
26  unsigned int m_loop;
27 };
28 
29 /**
30  @ingroup network
31 
32 */
33 class FE_DL_EXPORT MultiGroupWriter
34  : virtual public HandlerI,
35  virtual public Config,
36  public Initialize<MultiGroupWriter>
37 {
38  public:
39  MultiGroupWriter(void);
40 virtual ~MultiGroupWriter(void);
41  void initialize(void);
42 
43  //* as HandlerI
44 virtual void handle(Record &a_signal);
45 
46  private:
47 
48  unsigned int m_count;
49  bool m_initialized;
50  std::string m_prefix;
51  unsigned int m_loop;
52  unsigned int m_rate;
53 
54  sp<Scope> m_spScope;
55  boost::thread *m_pThread;
56  sp<ChunkSpool> m_spChunkSpool;
57  MultiGroupWriterTask m_chunkSenderTask;
58 };
59 
60 
61 } /* namespace ext */
62 } /* namespace fe */
63 
64 #endif /* __network_MultiGroupWriter_h__ */
65 
kernel
Definition: namespace.dox:3