roma-client 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +22 -15
  3. data/Gemfile +2 -0
  4. data/Gemfile.lock +34 -18
  5. data/README.md +4 -0
  6. data/lib/roma/client/client_pool.rb +15 -25
  7. data/lib/roma/client/client_rttable.rb +1 -2
  8. data/lib/roma/client/tools/showbalance.rb +0 -1
  9. data/lib/roma/client/version.rb +1 -1
  10. data/spec/roma/client/client_pool_spec.rb +133 -173
  11. data/spec/spec_helper.rb +9 -0
  12. metadata +3 -79
  13. data/doc/CHANGELOG_md.html +0 -119
  14. data/doc/README_md.html +0 -161
  15. data/doc/Roma.html +0 -95
  16. data/doc/Roma/Client.html +0 -95
  17. data/doc/Roma/Client/ClientPool.html +0 -716
  18. data/doc/Roma/Client/ClientRoutingTable.html +0 -495
  19. data/doc/Roma/Client/ConPool.html +0 -484
  20. data/doc/Roma/Client/Plugin.html +0 -95
  21. data/doc/Roma/Client/Plugin/Alist.html +0 -1276
  22. data/doc/Roma/Client/Plugin/Map.html +0 -531
  23. data/doc/Roma/Client/Plugin/MapCount.html +0 -401
  24. data/doc/Roma/Client/Proxy.html +0 -95
  25. data/doc/Roma/Client/Proxy/ClientHandler.html +0 -273
  26. data/doc/Roma/Client/Proxy/Conpool.html +0 -394
  27. data/doc/Roma/Client/Proxy/Daemon.html +0 -305
  28. data/doc/Roma/Client/Proxy/RomaHandler.html +0 -217
  29. data/doc/Roma/Client/RomaClient.html +0 -1339
  30. data/doc/Roma/Client/Sender.html +0 -482
  31. data/doc/Roma/Client/Stats.html +0 -162
  32. data/doc/Roma/Client/VERSION.html +0 -141
  33. data/doc/Roma/Logging.html +0 -95
  34. data/doc/Roma/Logging/RLogger.html +0 -786
  35. data/doc/Roma/Logging/RLogger/ExtLogDev.html +0 -159
  36. data/doc/Roma/Logging/RLogger/ExtShiftAge.html +0 -95
  37. data/doc/Roma/Logging/RLogger/ExtTrace.html +0 -109
  38. data/doc/Roma/Logging/RLogger/Severity.html +0 -139
  39. data/doc/Roma/Routing.html +0 -95
  40. data/doc/Roma/Routing/RoutingData.html +0 -912
  41. data/doc/Roma/Routing/RoutingData/RandomNodeListMaker.html +0 -311
  42. data/doc/created.rid +0 -20
  43. data/doc/css/fonts.css +0 -167
  44. data/doc/css/rdoc.css +0 -590
  45. data/doc/fonts/Lato-Light.ttf +0 -0
  46. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  47. data/doc/fonts/Lato-Regular.ttf +0 -0
  48. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  49. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  50. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  51. data/doc/images/add.png +0 -0
  52. data/doc/images/arrow_up.png +0 -0
  53. data/doc/images/brick.png +0 -0
  54. data/doc/images/brick_link.png +0 -0
  55. data/doc/images/bug.png +0 -0
  56. data/doc/images/bullet_black.png +0 -0
  57. data/doc/images/bullet_toggle_minus.png +0 -0
  58. data/doc/images/bullet_toggle_plus.png +0 -0
  59. data/doc/images/date.png +0 -0
  60. data/doc/images/delete.png +0 -0
  61. data/doc/images/find.png +0 -0
  62. data/doc/images/loadingAnimation.gif +0 -0
  63. data/doc/images/macFFBgHack.png +0 -0
  64. data/doc/images/package.png +0 -0
  65. data/doc/images/page_green.png +0 -0
  66. data/doc/images/page_white_text.png +0 -0
  67. data/doc/images/page_white_width.png +0 -0
  68. data/doc/images/plugin.png +0 -0
  69. data/doc/images/ruby.png +0 -0
  70. data/doc/images/tag_blue.png +0 -0
  71. data/doc/images/tag_green.png +0 -0
  72. data/doc/images/transparent.png +0 -0
  73. data/doc/images/wrench.png +0 -0
  74. data/doc/images/wrench_orange.png +0 -0
  75. data/doc/images/zoom.png +0 -0
  76. data/doc/index.html +0 -210
  77. data/doc/js/darkfish.js +0 -161
  78. data/doc/js/jquery.js +0 -4
  79. data/doc/js/navigation.js +0 -142
  80. data/doc/js/navigation.js.gz +0 -0
  81. data/doc/js/search.js +0 -109
  82. data/doc/js/search_index.js +0 -1
  83. data/doc/js/search_index.js.gz +0 -0
  84. data/doc/js/searcher.js +0 -228
  85. data/doc/js/searcher.js.gz +0 -0
  86. data/doc/table_of_contents.html +0 -972
  87. data/lib/roma/client/routing/routing_data.rb +0 -241
@@ -1,482 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta charset=" UTF-8">
6
-
7
- <title>class Roma::Client::Sender - ROMA documents</title>
8
-
9
- <script type="text/javascript">
10
- var rdoc_rel_prefix = "../../";
11
- </script>
12
-
13
- <script src="../../js/jquery.js"></script>
14
- <script src="../../js/darkfish.js"></script>
15
-
16
- <link href="../../css/fonts.css" rel="stylesheet">
17
- <link href="../../css/rdoc.css" rel="stylesheet">
18
-
19
-
20
-
21
- <body id="top" role="document" class="class">
22
- <nav role="navigation">
23
- <div id="project-navigation">
24
- <div id="home-section" role="region" title="Quick navigation" class="nav-section">
25
- <h2>
26
- <a href="../../index.html" rel="home">Home</a>
27
- </h2>
28
-
29
- <div id="table-of-contents-navigation">
30
- <a href="../../table_of_contents.html#pages">Pages</a>
31
- <a href="../../table_of_contents.html#classes">Classes</a>
32
- <a href="../../table_of_contents.html#methods">Methods</a>
33
- </div>
34
- </div>
35
-
36
- <div id="search-section" role="search" class="project-section initially-hidden">
37
- <form action="#" method="get" accept-charset="utf-8">
38
- <div id="search-field-wrapper">
39
- <input id="search-field" role="combobox" aria-label="Search"
40
- aria-autocomplete="list" aria-controls="search-results"
41
- type="text" name="search" placeholder="Search" spellcheck="false"
42
- title="Type to search, Up and Down to navigate, Enter to load">
43
- </div>
44
-
45
- <ul id="search-results" aria-label="Search Results"
46
- aria-busy="false" aria-expanded="false"
47
- aria-atomic="false" class="initially-hidden"></ul>
48
- </form>
49
- </div>
50
-
51
- </div>
52
-
53
-
54
-
55
- <div id="class-metadata">
56
-
57
- <div id="parent-class-section" class="nav-section">
58
- <h3>Parent</h3>
59
-
60
-
61
- <p class="link">Object
62
-
63
- </div>
64
-
65
-
66
-
67
- <!-- Method Quickref -->
68
- <div id="method-list-section" class="nav-section">
69
- <h3>Methods</h3>
70
-
71
- <ul class="link-list" role="directory">
72
-
73
- <li ><a href="#method-c-new">::new</a>
74
-
75
- <li ><a href="#method-i-send_command">#send_command</a>
76
-
77
- <li ><a href="#method-i-send_route_mklhash_command">#send_route_mklhash_command</a>
78
-
79
- <li ><a href="#method-i-send_routedump_command">#send_routedump_command</a>
80
-
81
- <li ><a href="#method-i-send_routedump_yaml_command">#send_routedump_yaml_command</a>
82
-
83
- <li ><a href="#method-i-send_stats_command">#send_stats_command</a>
84
-
85
- <li ><a href="#method-i-send_verbosity_command">#send_verbosity_command</a>
86
-
87
- <li ><a href="#method-i-send_version_command">#send_version_command</a>
88
-
89
- </ul>
90
- </div>
91
-
92
- </div>
93
- </nav>
94
-
95
- <main role="main" aria-labelledby="class-Roma::Client::Sender">
96
- <h1 id="class-Roma::Client::Sender" class="class">
97
- class Roma::Client::Sender
98
- </h1>
99
-
100
- <section class="description">
101
-
102
- </section>
103
-
104
-
105
-
106
-
107
- <section id="5Buntitled-5D" class="documentation-section">
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
- <section id="public-class-5Buntitled-5D-method-details" class="method-section">
118
- <header>
119
- <h3>Public Class Methods</h3>
120
- </header>
121
-
122
-
123
- <div id="method-c-new" class="method-detail ">
124
-
125
- <div class="method-heading">
126
- <span class="method-name">new</span><span
127
- class="method-args">()</span>
128
-
129
- <span class="method-click-advice">click to toggle source</span>
130
-
131
- </div>
132
-
133
-
134
- <div class="method-description">
135
-
136
-
137
-
138
-
139
-
140
-
141
- <div class="method-source-code" id="new-source">
142
- <pre><span class="ruby-comment"># File lib/roma/client/sender.rb, line 9</span>
143
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
144
- <span class="ruby-keyword">end</span></pre>
145
- </div>
146
-
147
- </div>
148
-
149
-
150
-
151
-
152
- </div>
153
-
154
-
155
- </section>
156
-
157
- <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
158
- <header>
159
- <h3>Public Instance Methods</h3>
160
- </header>
161
-
162
-
163
- <div id="method-i-send_command" class="method-detail ">
164
-
165
- <div class="method-heading">
166
- <span class="method-name">send_command</span><span
167
- class="method-args">(nid, cmd, value = nil, receiver = :oneline_receiver)</span>
168
-
169
- <span class="method-click-advice">click to toggle source</span>
170
-
171
- </div>
172
-
173
-
174
- <div class="method-description">
175
-
176
-
177
-
178
-
179
-
180
-
181
- <div class="method-source-code" id="send_command-source">
182
- <pre><span class="ruby-comment"># File lib/roma/client/sender.rb, line 100</span>
183
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_command</span>(<span class="ruby-identifier">nid</span>, <span class="ruby-identifier">cmd</span>, <span class="ruby-identifier">value</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">receiver</span> = <span class="ruby-value">:oneline_receiver</span>)
184
- <span class="ruby-identifier">con</span> = <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">get_connection</span>(<span class="ruby-identifier">nid</span>)
185
- <span class="ruby-identifier">fail</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">con</span>
186
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">value</span>
187
- <span class="ruby-identifier">con</span>.<span class="ruby-identifier">write</span> <span class="ruby-node">&quot;#{cmd}\r\n#{value}\r\n&quot;</span>
188
- <span class="ruby-keyword">else</span>
189
- <span class="ruby-identifier">con</span>.<span class="ruby-identifier">write</span> <span class="ruby-node">&quot;#{cmd}\r\n&quot;</span>
190
- <span class="ruby-keyword">end</span>
191
- <span class="ruby-identifier">ret</span> = <span class="ruby-identifier">send</span>(<span class="ruby-identifier">receiver</span>, <span class="ruby-identifier">con</span>)
192
- <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">return_connection</span>(<span class="ruby-identifier">nid</span>, <span class="ruby-identifier">con</span>)
193
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">ret</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">ret</span>.<span class="ruby-identifier">instance_of?</span>(<span class="ruby-constant">String</span>) <span class="ruby-operator">&amp;&amp;</span>
194
- (<span class="ruby-identifier">ret</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/^SERVER_ERROR/</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">ret</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/^CLIENT_ERROR/</span>)
195
- <span class="ruby-identifier">fail</span> <span class="ruby-identifier">ret</span>
196
- <span class="ruby-keyword">end</span>
197
- <span class="ruby-identifier">ret</span>
198
- <span class="ruby-keyword">end</span></pre>
199
- </div>
200
-
201
- </div>
202
-
203
-
204
-
205
-
206
- </div>
207
-
208
-
209
- <div id="method-i-send_route_mklhash_command" class="method-detail ">
210
-
211
- <div class="method-heading">
212
- <span class="method-name">send_route_mklhash_command</span><span
213
- class="method-args">(node_id)</span>
214
-
215
- <span class="method-click-advice">click to toggle source</span>
216
-
217
- </div>
218
-
219
-
220
- <div class="method-description">
221
-
222
-
223
-
224
-
225
-
226
-
227
- <div class="method-source-code" id="send_route_mklhash_command-source">
228
- <pre><span class="ruby-comment"># File lib/roma/client/sender.rb, line 12</span>
229
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_route_mklhash_command</span>(<span class="ruby-identifier">node_id</span>)
230
- <span class="ruby-constant">Timeout</span>.<span class="ruby-identifier">timeout</span>(<span class="ruby-value">1</span>) <span class="ruby-keyword">do</span>
231
- <span class="ruby-identifier">conn</span> = <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">get_connection</span>(<span class="ruby-identifier">node_id</span>)
232
- <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">write</span> <span class="ruby-string">&quot;mklhash 0\r\n&quot;</span>
233
- <span class="ruby-identifier">ret</span> = <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">gets</span>
234
- <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">return_connection</span>(<span class="ruby-identifier">node_id</span>, <span class="ruby-identifier">conn</span>)
235
- <span class="ruby-keyword">return</span> <span class="ruby-identifier">ret</span>.<span class="ruby-identifier">chomp</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">ret</span>
236
- <span class="ruby-keyword">end</span>
237
- <span class="ruby-keyword">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
238
- <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{node_id} #{e.inspect}&quot;</span>
239
- <span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span>
240
- <span class="ruby-keyword">end</span></pre>
241
- </div>
242
-
243
- </div>
244
-
245
-
246
-
247
-
248
- </div>
249
-
250
-
251
- <div id="method-i-send_routedump_command" class="method-detail ">
252
-
253
- <div class="method-heading">
254
- <span class="method-name">send_routedump_command</span><span
255
- class="method-args">(node_id)</span>
256
-
257
- <span class="method-click-advice">click to toggle source</span>
258
-
259
- </div>
260
-
261
-
262
- <div class="method-description">
263
-
264
-
265
-
266
-
267
-
268
-
269
- <div class="method-source-code" id="send_routedump_command-source">
270
- <pre><span class="ruby-comment"># File lib/roma/client/sender.rb, line 25</span>
271
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_routedump_command</span>(<span class="ruby-identifier">node_id</span>)
272
- <span class="ruby-constant">Timeout</span>.<span class="ruby-identifier">timeout</span>(<span class="ruby-value">1</span>) <span class="ruby-keyword">do</span>
273
- <span class="ruby-identifier">buf</span> = <span class="ruby-constant">RUBY_VERSION</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&#39;.&#39;</span>)
274
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">buf</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">to_i</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">buf</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">to_i</span> <span class="ruby-operator">==</span> <span class="ruby-value">8</span>
275
- <span class="ruby-keyword">return</span> <span class="ruby-identifier">send_routedump_yaml_command</span>(<span class="ruby-identifier">node_id</span>)
276
- <span class="ruby-keyword">end</span>
277
- <span class="ruby-identifier">conn</span> = <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">get_connection</span>(<span class="ruby-identifier">node_id</span>)
278
- <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">write</span> <span class="ruby-string">&quot;routingdump\r\n&quot;</span>
279
- <span class="ruby-identifier">routes_length</span> = <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">gets</span>.<span class="ruby-identifier">to_i</span>
280
- <span class="ruby-keyword">if</span> (<span class="ruby-identifier">routes_length</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-value">0</span>)
281
- <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">close</span>
282
- <span class="ruby-keyword">return</span> <span class="ruby-value">:error</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">routes_length</span> <span class="ruby-operator">&lt;</span> <span class="ruby-value">0</span>
283
- <span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span>
284
- <span class="ruby-keyword">end</span>
285
-
286
- <span class="ruby-identifier">routes</span> = <span class="ruby-string">&#39;&#39;</span>
287
- <span class="ruby-keyword">while</span> (<span class="ruby-identifier">routes</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">routes_length</span>)
288
- <span class="ruby-identifier">routes</span> = <span class="ruby-identifier">routes</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">routes_length</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">routes</span>.<span class="ruby-identifier">length</span>)
289
- <span class="ruby-keyword">end</span>
290
- <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">read</span>(<span class="ruby-value">2</span>) <span class="ruby-comment"># &quot;\r\n&quot;</span>
291
- <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">gets</span>
292
- <span class="ruby-identifier">rd</span> = <span class="ruby-constant">Marshal</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">routes</span>)
293
- <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">return_connection</span>(<span class="ruby-identifier">node_id</span>, <span class="ruby-identifier">conn</span>)
294
- <span class="ruby-keyword">return</span> <span class="ruby-identifier">rd</span>
295
- <span class="ruby-keyword">end</span>
296
- <span class="ruby-keyword">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
297
- <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{node_id} #{e.inspect}&quot;</span>
298
- <span class="ruby-keyword">nil</span>
299
- <span class="ruby-keyword">end</span></pre>
300
- </div>
301
-
302
- </div>
303
-
304
-
305
-
306
-
307
- </div>
308
-
309
-
310
- <div id="method-i-send_routedump_yaml_command" class="method-detail ">
311
-
312
- <div class="method-heading">
313
- <span class="method-name">send_routedump_yaml_command</span><span
314
- class="method-args">(node_id)</span>
315
-
316
- <span class="method-click-advice">click to toggle source</span>
317
-
318
- </div>
319
-
320
-
321
- <div class="method-description">
322
-
323
-
324
-
325
-
326
-
327
-
328
- <div class="method-source-code" id="send_routedump_yaml_command-source">
329
- <pre><span class="ruby-comment"># File lib/roma/client/sender.rb, line 55</span>
330
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_routedump_yaml_command</span>(<span class="ruby-identifier">node_id</span>)
331
- <span class="ruby-identifier">conn</span> = <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">get_connection</span>(<span class="ruby-identifier">node_id</span>)
332
- <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">write</span> <span class="ruby-string">&quot;routingdump yaml\r\n&quot;</span>
333
-
334
- <span class="ruby-identifier">yaml</span> = <span class="ruby-string">&#39;&#39;</span>
335
- <span class="ruby-keyword">while</span> ((<span class="ruby-identifier">line</span> = <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">gets</span>) <span class="ruby-operator">!=</span> <span class="ruby-string">&quot;END\r\n&quot;</span>)
336
- <span class="ruby-identifier">yaml</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">line</span>
337
- <span class="ruby-keyword">end</span>
338
-
339
- <span class="ruby-identifier">rd</span> = <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">yaml</span>)
340
- <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">return_connection</span>(<span class="ruby-identifier">node_id</span>, <span class="ruby-identifier">conn</span>)
341
- <span class="ruby-identifier">rd</span>
342
- <span class="ruby-keyword">end</span></pre>
343
- </div>
344
-
345
- </div>
346
-
347
-
348
-
349
-
350
- </div>
351
-
352
-
353
- <div id="method-i-send_stats_command" class="method-detail ">
354
-
355
- <div class="method-heading">
356
- <span class="method-name">send_stats_command</span><span
357
- class="method-args">(filter, node_id)</span>
358
-
359
- <span class="method-click-advice">click to toggle source</span>
360
-
361
- </div>
362
-
363
-
364
- <div class="method-description">
365
-
366
-
367
-
368
-
369
-
370
-
371
- <div class="method-source-code" id="send_stats_command-source">
372
- <pre><span class="ruby-comment"># File lib/roma/client/sender.rb, line 69</span>
373
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_stats_command</span>(<span class="ruby-identifier">filter</span>, <span class="ruby-identifier">node_id</span>)
374
- <span class="ruby-identifier">conn</span> = <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">get_connection</span>(<span class="ruby-identifier">node_id</span>)
375
- <span class="ruby-identifier">cmd</span> = <span class="ruby-string">&#39;stats&#39;</span>
376
- <span class="ruby-identifier">cmd</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot; #{filter}&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">filter</span>
377
- <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">write</span> <span class="ruby-node">&quot;#{cmd}\r\n&quot;</span>
378
-
379
- <span class="ruby-identifier">stats_str</span> = <span class="ruby-string">&#39;&#39;</span>
380
- <span class="ruby-keyword">while</span> ((<span class="ruby-identifier">line</span> = <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">gets</span>) <span class="ruby-operator">!=</span> <span class="ruby-string">&quot;END\r\n&quot;</span>)
381
- <span class="ruby-identifier">stats_str</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">line</span>
382
- <span class="ruby-keyword">end</span>
383
-
384
- <span class="ruby-identifier">stats</span> = <span class="ruby-constant">Roma</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span><span class="ruby-operator">::</span><span class="ruby-constant">Stats</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">stats_str</span>)
385
- <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">return_connection</span>(<span class="ruby-identifier">node_id</span>, <span class="ruby-identifier">conn</span>)
386
- <span class="ruby-identifier">stats</span>
387
- <span class="ruby-keyword">end</span></pre>
388
- </div>
389
-
390
- </div>
391
-
392
-
393
-
394
-
395
- </div>
396
-
397
-
398
- <div id="method-i-send_verbosity_command" class="method-detail ">
399
-
400
- <div class="method-heading">
401
- <span class="method-name">send_verbosity_command</span><span
402
- class="method-args">(ap)</span>
403
-
404
- <span class="method-click-advice">click to toggle source</span>
405
-
406
- </div>
407
-
408
-
409
- <div class="method-description">
410
-
411
-
412
-
413
-
414
-
415
-
416
- <div class="method-source-code" id="send_verbosity_command-source">
417
- <pre><span class="ruby-comment"># File lib/roma/client/sender.rb, line 94</span>
418
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_verbosity_command</span>(<span class="ruby-identifier">ap</span>)
419
- <span class="ruby-identifier">conn</span> = <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">get_connection</span>(<span class="ruby-identifier">ap</span>)
420
- <span class="ruby-comment"># TODO</span>
421
- <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">return_connection</span>(<span class="ruby-identifier">ap</span>, <span class="ruby-identifier">conn</span>)
422
- <span class="ruby-keyword">end</span></pre>
423
- </div>
424
-
425
- </div>
426
-
427
-
428
-
429
-
430
- </div>
431
-
432
-
433
- <div id="method-i-send_version_command" class="method-detail ">
434
-
435
- <div class="method-heading">
436
- <span class="method-name">send_version_command</span><span
437
- class="method-args">(ap)</span>
438
-
439
- <span class="method-click-advice">click to toggle source</span>
440
-
441
- </div>
442
-
443
-
444
- <div class="method-description">
445
-
446
-
447
-
448
-
449
-
450
-
451
- <div class="method-source-code" id="send_version_command-source">
452
- <pre><span class="ruby-comment"># File lib/roma/client/sender.rb, line 85</span>
453
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">send_version_command</span>(<span class="ruby-identifier">ap</span>)
454
- <span class="ruby-identifier">conn</span> = <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">get_connection</span>(<span class="ruby-identifier">ap</span>)
455
- <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">write</span>(<span class="ruby-string">&quot;version\r\n&quot;</span>)
456
- <span class="ruby-identifier">res</span> = <span class="ruby-identifier">conn</span>.<span class="ruby-identifier">gets</span>.<span class="ruby-identifier">chomp</span>
457
- <span class="ruby-constant">ConPool</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">return_connection</span>(<span class="ruby-identifier">ap</span>, <span class="ruby-identifier">conn</span>)
458
- <span class="ruby-identifier">fail</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">res</span>
459
- <span class="ruby-identifier">res</span>
460
- <span class="ruby-keyword">end</span></pre>
461
- </div>
462
-
463
- </div>
464
-
465
-
466
-
467
-
468
- </div>
469
-
470
-
471
- </section>
472
-
473
- </section>
474
- </main>
475
-
476
-
477
- <footer id="validator-badges" role="contentinfo">
478
- <p><a href="http://validator.w3.org/check/referer">Validate</a>
479
- <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.2.
480
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
481
- </footer>
482
-