roma-client 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/{CHANGELOG → CHANGELOG.md} +8 -5
  3. data/Gemfile.lock +23 -15
  4. data/README.md +62 -0
  5. data/Rakefile +3 -3
  6. data/doc/CHANGELOG_md.html +119 -0
  7. data/doc/README_md.html +161 -0
  8. data/doc/Roma/Client/ClientPool.html +716 -0
  9. data/doc/Roma/Client/ClientRoutingTable.html +495 -0
  10. data/doc/Roma/Client/ConPool.html +484 -0
  11. data/doc/Roma/Client/Plugin/Alist.html +1276 -0
  12. data/doc/Roma/Client/Plugin/Map.html +531 -0
  13. data/doc/Roma/Client/Plugin/MapCount.html +401 -0
  14. data/doc/Roma/Client/Plugin.html +95 -0
  15. data/doc/Roma/Client/Proxy/ClientHandler.html +273 -0
  16. data/doc/Roma/Client/Proxy/Conpool.html +394 -0
  17. data/doc/Roma/Client/Proxy/Daemon.html +305 -0
  18. data/doc/Roma/Client/Proxy/RomaHandler.html +217 -0
  19. data/doc/Roma/Client/Proxy.html +95 -0
  20. data/doc/Roma/Client/RomaClient.html +1339 -0
  21. data/doc/Roma/Client/Sender.html +482 -0
  22. data/doc/Roma/Client/Stats.html +162 -0
  23. data/doc/Roma/Client/VERSION.html +141 -0
  24. data/doc/Roma/Client.html +95 -0
  25. data/doc/Roma/Logging/RLogger/ExtLogDev.html +159 -0
  26. data/doc/Roma/Logging/RLogger/ExtShiftAge.html +95 -0
  27. data/doc/Roma/Logging/RLogger/ExtTrace.html +109 -0
  28. data/doc/Roma/Logging/RLogger/Severity.html +139 -0
  29. data/doc/Roma/Logging/RLogger.html +786 -0
  30. data/doc/Roma/Logging.html +95 -0
  31. data/doc/Roma/Routing/RoutingData/RandomNodeListMaker.html +311 -0
  32. data/doc/Roma/Routing/RoutingData.html +912 -0
  33. data/doc/Roma/Routing.html +95 -0
  34. data/doc/Roma.html +95 -0
  35. data/doc/created.rid +20 -0
  36. data/doc/css/fonts.css +167 -0
  37. data/doc/css/rdoc.css +590 -0
  38. data/doc/fonts/Lato-Light.ttf +0 -0
  39. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  40. data/doc/fonts/Lato-Regular.ttf +0 -0
  41. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  42. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  43. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  44. data/doc/images/add.png +0 -0
  45. data/doc/images/arrow_up.png +0 -0
  46. data/doc/images/brick.png +0 -0
  47. data/doc/images/brick_link.png +0 -0
  48. data/doc/images/bug.png +0 -0
  49. data/doc/images/bullet_black.png +0 -0
  50. data/doc/images/bullet_toggle_minus.png +0 -0
  51. data/doc/images/bullet_toggle_plus.png +0 -0
  52. data/doc/images/date.png +0 -0
  53. data/doc/images/delete.png +0 -0
  54. data/doc/images/find.png +0 -0
  55. data/doc/images/loadingAnimation.gif +0 -0
  56. data/doc/images/macFFBgHack.png +0 -0
  57. data/doc/images/package.png +0 -0
  58. data/doc/images/page_green.png +0 -0
  59. data/doc/images/page_white_text.png +0 -0
  60. data/doc/images/page_white_width.png +0 -0
  61. data/doc/images/plugin.png +0 -0
  62. data/doc/images/ruby.png +0 -0
  63. data/doc/images/tag_blue.png +0 -0
  64. data/doc/images/tag_green.png +0 -0
  65. data/doc/images/transparent.png +0 -0
  66. data/doc/images/wrench.png +0 -0
  67. data/doc/images/wrench_orange.png +0 -0
  68. data/doc/images/zoom.png +0 -0
  69. data/doc/index.html +210 -0
  70. data/doc/js/darkfish.js +161 -0
  71. data/doc/js/jquery.js +4 -0
  72. data/doc/js/navigation.js +142 -0
  73. data/doc/js/navigation.js.gz +0 -0
  74. data/doc/js/search.js +109 -0
  75. data/doc/js/search_index.js +1 -0
  76. data/doc/js/search_index.js.gz +0 -0
  77. data/doc/js/searcher.js +228 -0
  78. data/doc/js/searcher.js.gz +0 -0
  79. data/doc/table_of_contents.html +972 -0
  80. data/lib/roma/client/rclient.rb +2 -1
  81. data/lib/roma/client/sender.rb +2 -2
  82. data/lib/roma/client/version.rb +1 -1
  83. data/lib/roma/client.rb +0 -21
  84. metadata +84 -10
  85. data/README +0 -17
@@ -0,0 +1,95 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset=" UTF-8">
6
+
7
+ <title>module Roma::Logging - 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="module">
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
+
58
+
59
+
60
+
61
+ </div>
62
+ </nav>
63
+
64
+ <main role="main" aria-labelledby="module-Roma::Logging">
65
+ <h1 id="module-Roma::Logging" class="module">
66
+ module Roma::Logging
67
+ </h1>
68
+
69
+ <section class="description">
70
+
71
+ </section>
72
+
73
+
74
+
75
+
76
+ <section id="5Buntitled-5D" class="documentation-section">
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+ </section>
87
+ </main>
88
+
89
+
90
+ <footer id="validator-badges" role="contentinfo">
91
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
92
+ <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.2.
93
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
94
+ </footer>
95
+
@@ -0,0 +1,311 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset=" UTF-8">
6
+
7
+ <title>class Roma::Routing::RoutingData::RandomNodeListMaker - 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-get_other_one">#get_other_one</a>
76
+
77
+ <li ><a href="#method-i-get_other_one_repethost">#get_other_one_repethost</a>
78
+
79
+ <li ><a href="#method-i-list">#list</a>
80
+
81
+ </ul>
82
+ </div>
83
+
84
+ </div>
85
+ </nav>
86
+
87
+ <main role="main" aria-labelledby="class-Roma::Routing::RoutingData::RandomNodeListMaker">
88
+ <h1 id="class-Roma::Routing::RoutingData::RandomNodeListMaker" class="class">
89
+ class Roma::Routing::RoutingData::RandomNodeListMaker
90
+ </h1>
91
+
92
+ <section class="description">
93
+
94
+ </section>
95
+
96
+
97
+
98
+
99
+ <section id="5Buntitled-5D" class="documentation-section">
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
110
+ <header>
111
+ <h3>Public Class Methods</h3>
112
+ </header>
113
+
114
+
115
+ <div id="method-c-new" class="method-detail ">
116
+
117
+ <div class="method-heading">
118
+ <span class="method-name">new</span><span
119
+ class="method-args">(nodes,repethost)</span>
120
+
121
+ <span class="method-click-advice">click to toggle source</span>
122
+
123
+ </div>
124
+
125
+
126
+ <div class="method-description">
127
+
128
+
129
+
130
+
131
+
132
+
133
+ <div class="method-source-code" id="new-source">
134
+ <pre><span class="ruby-comment"># File lib/roma/client/routing/routing_data.rb, line 186</span>
135
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">nodes</span>,<span class="ruby-identifier">repethost</span>)
136
+ <span class="ruby-ivar">@repethost</span>=<span class="ruby-identifier">repethost</span>
137
+ <span class="ruby-ivar">@nodes</span>=<span class="ruby-identifier">nodes</span>
138
+ <span class="ruby-ivar">@host_idx</span>={}
139
+ <span class="ruby-identifier">nodes</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">nid</span><span class="ruby-operator">|</span>
140
+ <span class="ruby-identifier">h</span>,<span class="ruby-identifier">p</span>=<span class="ruby-identifier">nid</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&#39;_&#39;</span>)
141
+ <span class="ruby-keyword">if</span> <span class="ruby-ivar">@host_idx</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">h</span>)
142
+ <span class="ruby-ivar">@host_idx</span>[<span class="ruby-identifier">h</span>] <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">nid</span>
143
+ <span class="ruby-keyword">else</span>
144
+ <span class="ruby-ivar">@host_idx</span>[<span class="ruby-identifier">h</span>]=[<span class="ruby-identifier">nid</span>]
145
+ <span class="ruby-keyword">end</span>
146
+ }
147
+ <span class="ruby-keyword">end</span></pre>
148
+ </div>
149
+
150
+ </div>
151
+
152
+
153
+
154
+
155
+ </div>
156
+
157
+
158
+ </section>
159
+
160
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
161
+ <header>
162
+ <h3>Public Instance Methods</h3>
163
+ </header>
164
+
165
+
166
+ <div id="method-i-get_other_one" class="method-detail ">
167
+
168
+ <div class="method-heading">
169
+ <span class="method-name">get_other_one</span><span
170
+ class="method-args">(exp_hosts,exp_nodes)</span>
171
+
172
+ <span class="method-click-advice">click to toggle source</span>
173
+
174
+ </div>
175
+
176
+
177
+ <div class="method-description">
178
+
179
+ <dl class="rdoc-list note-list"><dt><code>exp_hosts</code>
180
+ <dd>
181
+ <p>exceptional <a href="'roma0','roma1'">hosts(ex.</a>)</p>
182
+ </dd><dt><code>exp_nodes</code>
183
+ <dd>
184
+ <p>ignore</p>
185
+ </dd></dl>
186
+
187
+
188
+
189
+
190
+ <div class="method-source-code" id="get_other_one-source">
191
+ <pre><span class="ruby-comment"># File lib/roma/client/routing/routing_data.rb, line 227</span>
192
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_other_one</span>(<span class="ruby-identifier">exp_hosts</span>,<span class="ruby-identifier">exp_nodes</span>)
193
+ <span class="ruby-identifier">hidx</span>=<span class="ruby-ivar">@host_idx</span>.<span class="ruby-identifier">clone</span>
194
+ <span class="ruby-identifier">exp_hosts</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">h</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hidx</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">h</span>) }
195
+ <span class="ruby-keyword">return</span> <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">hidx</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
196
+
197
+ <span class="ruby-identifier">rh</span>=<span class="ruby-identifier">hidx</span>.<span class="ruby-identifier">keys</span>[<span class="ruby-identifier">rand</span>(<span class="ruby-identifier">hidx</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">length</span>)]
198
+ <span class="ruby-identifier">nodes</span>=<span class="ruby-identifier">hidx</span>[<span class="ruby-identifier">rh</span>]
199
+ <span class="ruby-identifier">nodes</span>[<span class="ruby-identifier">rand</span>(<span class="ruby-identifier">nodes</span>.<span class="ruby-identifier">length</span>)]
200
+ <span class="ruby-keyword">end</span></pre>
201
+ </div>
202
+
203
+ </div>
204
+
205
+
206
+
207
+
208
+ </div>
209
+
210
+
211
+ <div id="method-i-get_other_one_repethost" class="method-detail ">
212
+
213
+ <div class="method-heading">
214
+ <span class="method-name">get_other_one_repethost</span><span
215
+ class="method-args">(exp_hosts,exp_nodes)</span>
216
+
217
+ <span class="method-click-advice">click to toggle source</span>
218
+
219
+ </div>
220
+
221
+
222
+ <div class="method-description">
223
+
224
+ <dl class="rdoc-list note-list"><dt><code>exp_hosts</code>
225
+ <dd>
226
+ <p>ignore</p>
227
+ </dd><dt><code>exp_nodes</code>
228
+ <dd>
229
+ <p>exceptional <a href="'roma0_11211'">nodes(ex.</a>)</p>
230
+ </dd></dl>
231
+
232
+
233
+
234
+
235
+ <div class="method-source-code" id="get_other_one_repethost-source">
236
+ <pre><span class="ruby-comment"># File lib/roma/client/routing/routing_data.rb, line 219</span>
237
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">get_other_one_repethost</span>(<span class="ruby-identifier">exp_hosts</span>,<span class="ruby-identifier">exp_nodes</span>)
238
+ <span class="ruby-identifier">buf</span>=<span class="ruby-ivar">@nodes</span>.<span class="ruby-identifier">clone</span>
239
+ <span class="ruby-identifier">buf</span>.<span class="ruby-identifier">delete_if</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">nid</span><span class="ruby-operator">|</span> <span class="ruby-identifier">exp_nodes</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">nid</span>)}
240
+ <span class="ruby-identifier">buf</span>[<span class="ruby-identifier">rand</span>(<span class="ruby-identifier">buf</span>.<span class="ruby-identifier">length</span>)]
241
+ <span class="ruby-keyword">end</span></pre>
242
+ </div>
243
+
244
+ </div>
245
+
246
+
247
+
248
+
249
+ </div>
250
+
251
+
252
+ <div id="method-i-list" class="method-detail ">
253
+
254
+ <div class="method-heading">
255
+ <span class="method-name">list</span><span
256
+ class="method-args">(n)</span>
257
+
258
+ <span class="method-click-advice">click to toggle source</span>
259
+
260
+ </div>
261
+
262
+
263
+ <div class="method-description">
264
+
265
+ <p>Returns the random node-list without repetition.</p>
266
+ <dl class="rdoc-list note-list"><dt><code>n</code>
267
+ <dd>
268
+ <p>list length</p>
269
+ </dd></dl>
270
+
271
+
272
+
273
+
274
+ <div class="method-source-code" id="list-source">
275
+ <pre><span class="ruby-comment"># File lib/roma/client/routing/routing_data.rb, line 202</span>
276
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">list</span>(<span class="ruby-identifier">n</span>)
277
+ <span class="ruby-identifier">ret</span>=[]
278
+ <span class="ruby-identifier">hosts</span>=[]
279
+ <span class="ruby-identifier">proc_other_one</span> = <span class="ruby-value">:get_other_one</span>
280
+ <span class="ruby-identifier">proc_other_one</span> = <span class="ruby-value">:get_other_one_repethost</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@repethost</span>
281
+ <span class="ruby-identifier">n</span>.<span class="ruby-identifier">times</span>{
282
+ <span class="ruby-identifier">nid</span>=<span class="ruby-keyword">nil</span>
283
+ <span class="ruby-identifier">nid</span>=<span class="ruby-identifier">send</span>(<span class="ruby-identifier">proc_other_one</span>,<span class="ruby-identifier">hosts</span>,<span class="ruby-identifier">ret</span>)
284
+ <span class="ruby-keyword">break</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">nid</span>
285
+ <span class="ruby-identifier">hosts</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">nid</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&#39;_&#39;</span>)[<span class="ruby-value">0</span>]
286
+ <span class="ruby-identifier">ret</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">nid</span>
287
+ }
288
+ <span class="ruby-identifier">ret</span>
289
+ <span class="ruby-keyword">end</span></pre>
290
+ </div>
291
+
292
+ </div>
293
+
294
+
295
+
296
+
297
+ </div>
298
+
299
+
300
+ </section>
301
+
302
+ </section>
303
+ </main>
304
+
305
+
306
+ <footer id="validator-badges" role="contentinfo">
307
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
308
+ <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.2.
309
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
310
+ </footer>
311
+