-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclassproio_1_1Writer.html
343 lines (323 loc) · 16 KB
/
classproio_1_1Writer.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>proio: proio::Writer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">proio
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>proio</b></li><li class="navelem"><a class="el" href="classproio_1_1Writer.html">Writer</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="classproio_1_1Writer-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">proio::Writer Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include <<a class="el" href="writer_8h_source.html">writer.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for proio::Writer:</div>
<div class="dyncontent">
<div class="center">
<img src="classproio_1_1Writer.png" usemap="#proio::Writer_map" alt=""/>
<map id="proio::Writer_map" name="proio::Writer_map">
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a606d2b2b8c74e9117650d2c4189d15e6"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classproio_1_1Writer.html#a606d2b2b8c74e9117650d2c4189d15e6">Writer</a> (int fd)</td></tr>
<tr class="separator:a606d2b2b8c74e9117650d2c4189d15e6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3c163f144fbb4f8d3122d0204983aab4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classproio_1_1Writer.html#a3c163f144fbb4f8d3122d0204983aab4">Writer</a> (std::string filename)</td></tr>
<tr class="separator:a3c163f144fbb4f8d3122d0204983aab4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa66ca9fb97a5439b7d97c1a116da4090"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classproio_1_1Writer.html#aa66ca9fb97a5439b7d97c1a116da4090">Flush</a> ()</td></tr>
<tr class="separator:aa66ca9fb97a5439b7d97c1a116da4090"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ada1aebeffc3689550bdfcf8a8c26417c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classproio_1_1Writer.html#ada1aebeffc3689550bdfcf8a8c26417c">Push</a> (<a class="el" href="classproio_1_1Event.html">Event</a> *event)</td></tr>
<tr class="separator:ada1aebeffc3689550bdfcf8a8c26417c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6cd9af0a00a86c546c5f8d4b0ef5662c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classproio_1_1Writer.html#a6cd9af0a00a86c546c5f8d4b0ef5662c">PushMetadata</a> (std::string name, const std::string &data)</td></tr>
<tr class="separator:a6cd9af0a00a86c546c5f8d4b0ef5662c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae6f94db91bd25ac275c527eb7b921a30"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classproio_1_1Writer.html#ae6f94db91bd25ac275c527eb7b921a30">PushMetadata</a> (std::string name, const char *data)</td></tr>
<tr class="separator:ae6f94db91bd25ac275c527eb7b921a30"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3acfa35de7236610c47ec78173bb8122"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classproio_1_1Writer.html#a3acfa35de7236610c47ec78173bb8122">SetCompression</a> (Compression alg=GZIP, int level=-1)</td></tr>
<tr class="separator:a3acfa35de7236610c47ec78173bb8122"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1e0b8b3811dc0ec6ea68c7d4c964d9b6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classproio_1_1Writer.html#a1e0b8b3811dc0ec6ea68c7d4c964d9b6">SetBucketDumpThreshold</a> (uint64_t thres=0x1000000)</td></tr>
<tr class="separator:a1e0b8b3811dc0ec6ea68c7d4c964d9b6"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classproio_1_1Writer.html">Writer</a> for proio files </p>
<p>Definition at line <a class="el" href="writer_8h_source.html#l00048">48</a> of file <a class="el" href="writer_8h_source.html">writer.h</a>.</p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a class="anchor" id="a606d2b2b8c74e9117650d2c4189d15e6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Writer::Writer </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>fd</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor for providing a file descriptor </p>
<p>Definition at line <a class="el" href="writer_8cc_source.html#l00012">12</a> of file <a class="el" href="writer_8cc_source.html">writer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a3c163f144fbb4f8d3122d0204983aab4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Writer::Writer </td>
<td>(</td>
<td class="paramtype">std::string </td>
<td class="paramname"><em>filename</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor that creates a file descriptor from a file path, overwriting any existing file </p>
<p>Definition at line <a class="el" href="writer_8cc_source.html#l00019">19</a> of file <a class="el" href="writer_8cc_source.html">writer.cc</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aa66ca9fb97a5439b7d97c1a116da4090"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Writer::Flush </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Flush compresses and flushes all buffered (bucket) data to the output stream. This is automatically called upon destruction of the <a class="el" href="classproio_1_1Writer.html">Writer</a> object, and when the bucket dump threshold is reached. This function is asynchronous, meaning that it will return before the flush to the output stream is actually complete. Synchronization is forced on destruction. </p>
<p>Definition at line <a class="el" href="writer_8cc_source.html#l00046">46</a> of file <a class="el" href="writer_8cc_source.html">writer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="ada1aebeffc3689550bdfcf8a8c26417c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Writer::Push </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classproio_1_1Event.html">Event</a> * </td>
<td class="paramname"><em>event</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Push takes an <a class="el" href="classproio_1_1Event.html">Event</a> and serializes it into the output bucket. </p>
<p>Definition at line <a class="el" href="writer_8cc_source.html#l00096">96</a> of file <a class="el" href="writer_8cc_source.html">writer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a6cd9af0a00a86c546c5f8d4b0ef5662c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Writer::PushMetadata </td>
<td>(</td>
<td class="paramtype">std::string </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string & </td>
<td class="paramname"><em>data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>PushMetadata takes a string key and string data set and pushes it into the stream. If Events exist in the current bucket, the bucket is flushed first. </p>
<p>Definition at line <a class="el" href="writer_8cc_source.html#l00140">140</a> of file <a class="el" href="writer_8cc_source.html">writer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="ae6f94db91bd25ac275c527eb7b921a30"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Writer::PushMetadata </td>
<td>(</td>
<td class="paramtype">std::string </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>PushMetadata takes a string key and null-terminated const char array by pointer and pushes it into the stream. If Events exist in the current bucket, the bucket is flushed first. </p>
<p>Definition at line <a class="el" href="writer_8cc_source.html#l00145">145</a> of file <a class="el" href="writer_8cc_source.html">writer.cc</a>.</p>
</div>
</div>
<a class="anchor" id="a1e0b8b3811dc0ec6ea68c7d4c964d9b6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void proio::Writer::SetBucketDumpThreshold </td>
<td>(</td>
<td class="paramtype">uint64_t </td>
<td class="paramname"><em>thres</em> = <code>0x1000000</code></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>SetBucketDumpThreshold sets the threshold uncompressed bucket size for automatic compression and output (dump). I.e., once the size of the uncompressed bucket in memory reaches this threshold, <a class="el" href="classproio_1_1Writer.html#aa66ca9fb97a5439b7d97c1a116da4090">Flush()</a> will be called. <a class="el" href="classproio_1_1Writer.html#aa66ca9fb97a5439b7d97c1a116da4090">Flush()</a> can also be manually called at any time. </p>
<p>Definition at line <a class="el" href="writer_8h_source.html#l00092">92</a> of file <a class="el" href="writer_8h_source.html">writer.h</a>.</p>
</div>
</div>
<a class="anchor" id="a3acfa35de7236610c47ec78173bb8122"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void proio::Writer::SetCompression </td>
<td>(</td>
<td class="paramtype">Compression </td>
<td class="paramname"><em>alg</em> = <code>GZIP</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>level</em> = <code>-1</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>SetCompression sets the compression algorithm and compression level (-1 for default) to use for future output buckets. Algorithm is one of: LZ4, GZIP, or UNCOMPRESSED. </p>
<p>Definition at line <a class="el" href="writer_8h_source.html#l00083">83</a> of file <a class="el" href="writer_8h_source.html">writer.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/travis/build/proio-org/cpp-proio/src/<a class="el" href="writer_8h_source.html">writer.h</a></li>
<li>/home/travis/build/proio-org/cpp-proio/src/<a class="el" href="writer_8cc_source.html">writer.cc</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>