io_shuten 0.1.0.dev6 → 0.1.0.dev7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/doc/IO_shuten/Base.html +78 -99
  2. data/doc/IO_shuten/Buffer.html +130 -150
  3. data/doc/IO_shuten/Errors/FileAccessError.html +4 -5
  4. data/doc/IO_shuten/Errors/FileNotFoundError.html +4 -5
  5. data/doc/IO_shuten/Errors/NodeExistsError.html +4 -5
  6. data/doc/IO_shuten/Errors/NodeNameError.html +4 -5
  7. data/doc/IO_shuten/Errors/NodeNotFoundError.html +4 -5
  8. data/doc/IO_shuten/Errors/NotYetImplemented.html +4 -5
  9. data/doc/IO_shuten/Errors.html +4 -5
  10. data/doc/IO_shuten/Memory.html +127 -147
  11. data/doc/IO_shuten/Mongo.html +6 -8
  12. data/doc/IO_shuten/Redis.html +164 -263
  13. data/doc/IO_shuten/Stores/BaseContainer.html +377 -0
  14. data/doc/IO_shuten/Stores/Mongo/Collection.html +4 -5
  15. data/doc/IO_shuten/Stores/Mongo/GridFS.html +4 -5
  16. data/doc/IO_shuten/Stores/Mongo.html +4 -5
  17. data/doc/IO_shuten/Stores/Redis/Container.html +778 -0
  18. data/doc/IO_shuten/Stores/Redis/KeyValue/Collection.html +504 -0
  19. data/doc/IO_shuten/Stores/Redis/KeyValue/Single.html +438 -0
  20. data/doc/IO_shuten/Stores/Redis/KeyValue.html +176 -7
  21. data/doc/IO_shuten/Stores/Redis/PubSub.html +140 -5
  22. data/doc/IO_shuten/Stores/Redis.html +7 -6
  23. data/doc/IO_shuten/Stores.html +6 -7
  24. data/doc/IO_shuten/Zmq.html +166 -0
  25. data/doc/IO_shuten.html +6 -7
  26. data/doc/_index.html +49 -6
  27. data/doc/class_list.html +1 -1
  28. data/doc/file.README.html +10 -3
  29. data/doc/index.html +10 -3
  30. data/doc/method_list.html +160 -24
  31. data/doc/top-level-namespace.html +2 -2
  32. data/io_shuten.gemspec +6 -1
  33. data/lib/io_shuten/buffer.rb +8 -6
  34. data/lib/io_shuten/memory.rb +8 -5
  35. data/lib/io_shuten/version.rb +1 -1
  36. data/spec/lib/buffer_spec.rb +43 -0
  37. data/spec/lib/memory_spec.rb +49 -0
  38. data/spec/lib/redis_spec.rb +15 -1
  39. metadata +49 -44
@@ -0,0 +1,504 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: IO_shuten::Stores::Redis::KeyValue::Collection
8
+
9
+ &mdash; IO::shuten 【五百::終点】
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <link rel="stylesheet" href="../../../../css/blame.css" type="text/css" media="screen" charset="utf-8" />
18
+
19
+ <script type="text/javascript" charset="utf-8">
20
+ relpath = '../../../..';
21
+ if (relpath != '') relpath += '/';
22
+ </script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <script type="text/javascript" charset="utf-8">
32
+ if (window.top.frames.main) document.body.className = 'frames';
33
+ </script>
34
+
35
+ <div id="header">
36
+ <div id="menu">
37
+
38
+ <a href="../../../../_index.html">Index (C)</a> &raquo;
39
+ <span class='title'><span class='object_link'><a href="../../../../IO_shuten.html" title="IO_shuten (module)">IO_shuten</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../../Stores.html" title="IO_shuten::Stores (module)">Stores</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Redis.html" title="IO_shuten::Stores::Redis (module)">Redis</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../KeyValue.html" title="IO_shuten::Stores::Redis::KeyValue (module)">KeyValue</a></span></span>
40
+ &raquo;
41
+ <span class="title">Collection</span>
42
+
43
+
44
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
45
+ </div>
46
+
47
+ <div id="search">
48
+
49
+ <a id="class_list_link" href="#">Class List</a>
50
+
51
+ <a id="method_list_link" href="#">Method List</a>
52
+
53
+ <a id="file_list_link" href="#">File List</a>
54
+
55
+ </div>
56
+ <div class="clear"></div>
57
+ </div>
58
+
59
+ <iframe id="search_frame"></iframe>
60
+
61
+ <div id="content"><h1>Module: IO_shuten::Stores::Redis::KeyValue::Collection
62
+
63
+
64
+
65
+ </h1>
66
+
67
+ <dl class="box">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+ <dt class="r1 last">Defined in:</dt>
77
+ <dd class="r1 last">lib/io_shuten/stores/redis/key_value/collection.rb</dd>
78
+
79
+ </dl>
80
+ <div class="clear"></div>
81
+
82
+ <h2>Overview</h2><div class="docstring">
83
+ <div class="discussion">
84
+
85
+ <p>Redis Backend type for storing every data piece into its own key
86
+ (namespace)</p>
87
+
88
+
89
+ </div>
90
+ </div>
91
+ <div class="tags">
92
+
93
+
94
+ </div>
95
+
96
+
97
+
98
+
99
+
100
+ <h2>
101
+ Instance Method Summary
102
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
103
+ </h2>
104
+
105
+ <ul class="summary">
106
+
107
+ <li class="public ">
108
+ <span class="summary_signature">
109
+
110
+ <a href="#clear%21-instance_method" title="#clear! (instance method)">- (Object) <strong>clear!</strong> </a>
111
+
112
+
113
+
114
+ </span>
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <span class="summary_desc"><div class='inline'></div></span>
124
+
125
+ </li>
126
+
127
+
128
+ <li class="public ">
129
+ <span class="summary_signature">
130
+
131
+ <a href="#read-instance_method" title="#read (instance method)">- (Object) <strong>read</strong> </a>
132
+
133
+
134
+
135
+ </span>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <span class="summary_desc"><div class='inline'></div></span>
145
+
146
+ </li>
147
+
148
+
149
+ <li class="public ">
150
+ <span class="summary_signature">
151
+
152
+ <a href="#read_collection-instance_method" title="#read_collection (instance method)">- (Object) <strong>read_collection</strong> </a>
153
+
154
+
155
+
156
+ </span>
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+ <span class="summary_desc"><div class='inline'></div></span>
166
+
167
+ </li>
168
+
169
+
170
+ <li class="public ">
171
+ <span class="summary_signature">
172
+
173
+ <a href="#write-instance_method" title="#write (instance method)">- (Object) <strong>write</strong>(data) </a>
174
+
175
+
176
+
177
+ </span>
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+ <span class="summary_desc"><div class='inline'></div></span>
187
+
188
+ </li>
189
+
190
+
191
+ </ul>
192
+
193
+
194
+
195
+
196
+ <div id="instance_method_details" class="method_details_list">
197
+ <h2>Instance Method Details</h2>
198
+
199
+
200
+ <div class="method_details first">
201
+ <p class="signature first" id="clear!-instance_method">
202
+
203
+ - (<tt>Object</tt>) <strong>clear!</strong>
204
+
205
+
206
+
207
+ </p><table class="source_code blame">
208
+ <caption><span class="info file"># File 'lib/io_shuten/stores/redis/key_value/collection.rb', line 25</span></caption>
209
+ <tr>
210
+ <td>
211
+ <table>
212
+
213
+
214
+
215
+ <tr>
216
+
217
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
218
+
219
+ <td class="date">2012-01-30 01:31:05</td>
220
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
221
+ <td class="lines">25</td>
222
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_clear!'>clear!</span></pre></td>
223
+ </tr>
224
+
225
+
226
+ <tr>
227
+
228
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
229
+
230
+ <td class="date">2012-01-30 01:31:05</td>
231
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
232
+ <td class="lines">26</td>
233
+ <td><pre class="code"> <span class='id identifier rubyid_coll'>coll</span> <span class='op'>=</span> <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@node_name</span><span class='rbrace'>}</span><span class='tstring_content'>:*</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span></pre></td>
234
+ </tr>
235
+
236
+
237
+ <tr>
238
+
239
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
240
+
241
+ <td class="date">2012-01-30 01:31:05</td>
242
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
243
+ <td class="lines">27</td>
244
+ <td><pre class="code"> <span class='id identifier rubyid_coll'>coll</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='op'>|</span> <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_del'>del</span> <span class='id identifier rubyid_key'>key</span> <span class='rbrace'>}</span></pre></td>
245
+ </tr>
246
+
247
+
248
+ <tr>
249
+
250
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
251
+
252
+ <td class="date">2012-01-30 01:31:05</td>
253
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
254
+ <td class="lines">28</td>
255
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
256
+ </tr>
257
+
258
+ </table>
259
+ </td>
260
+ <td>
261
+ </tr>
262
+ </table>
263
+ </div>
264
+
265
+ <div class="method_details ">
266
+ <p class="signature " id="read-instance_method">
267
+
268
+ - (<tt>Object</tt>) <strong>read</strong>
269
+
270
+
271
+
272
+ </p><table class="source_code blame">
273
+ <caption><span class="info file"># File 'lib/io_shuten/stores/redis/key_value/collection.rb', line 7</span></caption>
274
+ <tr>
275
+ <td>
276
+ <table>
277
+
278
+
279
+
280
+ <tr>
281
+
282
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
283
+
284
+ <td class="date">2012-01-30 01:31:05</td>
285
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
286
+ <td class="lines">7</td>
287
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_read'>read</span></pre></td>
288
+ </tr>
289
+
290
+
291
+ <tr>
292
+
293
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
294
+
295
+ <td class="date">2012-01-30 01:31:05</td>
296
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
297
+ <td class="lines">8</td>
298
+ <td><pre class="code"> <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_read_collection'>read_collection</span></pre></td>
299
+ </tr>
300
+
301
+
302
+ <tr>
303
+
304
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
305
+
306
+ <td class="date">2012-01-30 01:31:05</td>
307
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
308
+ <td class="lines">9</td>
309
+ <td><pre class="code"> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span></pre></td>
310
+ </tr>
311
+
312
+
313
+ <tr>
314
+
315
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
316
+
317
+ <td class="date">2012-01-30 01:31:05</td>
318
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
319
+ <td class="lines">10</td>
320
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
321
+ </tr>
322
+
323
+ </table>
324
+ </td>
325
+ <td>
326
+ </tr>
327
+ </table>
328
+ </div>
329
+
330
+ <div class="method_details ">
331
+ <p class="signature " id="read_collection-instance_method">
332
+
333
+ - (<tt>Object</tt>) <strong>read_collection</strong>
334
+
335
+
336
+
337
+ </p><table class="source_code blame">
338
+ <caption><span class="info file"># File 'lib/io_shuten/stores/redis/key_value/collection.rb', line 12</span></caption>
339
+ <tr>
340
+ <td>
341
+ <table>
342
+
343
+
344
+
345
+ <tr>
346
+
347
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
348
+
349
+ <td class="date">2012-01-30 01:31:05</td>
350
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
351
+ <td class="lines">12</td>
352
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_read_collection'>read_collection</span></pre></td>
353
+ </tr>
354
+
355
+
356
+ <tr>
357
+
358
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
359
+
360
+ <td class="date">2012-01-30 01:31:05</td>
361
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
362
+ <td class="lines">13</td>
363
+ <td><pre class="code"> <span class='id identifier rubyid_coll'>coll</span> <span class='op'>=</span> <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@node_name</span><span class='rbrace'>}</span><span class='tstring_content'>:*</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</span></pre></td>
364
+ </tr>
365
+
366
+
367
+ <tr>
368
+
369
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
370
+
371
+ <td class="date">2012-01-30 01:31:05</td>
372
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
373
+ <td class="lines">14</td>
374
+ <td><pre class="code"> <span class='id identifier rubyid_coll'>coll</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_store'>store</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='op'>|</span></pre></td>
375
+ </tr>
376
+
377
+
378
+ <tr>
379
+
380
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
381
+
382
+ <td class="date">2012-01-30 01:31:05</td>
383
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
384
+ <td class="lines">15</td>
385
+ <td><pre class="code"> <span class='id identifier rubyid_store'>store</span> <span class='op'>&lt;&lt;</span> <span class='lparen'>(</span><span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span><span class='rparen'>)</span></pre></td>
386
+ </tr>
387
+
388
+
389
+ <tr>
390
+
391
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
392
+
393
+ <td class="date">2012-01-30 01:31:05</td>
394
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
395
+ <td class="lines">16</td>
396
+ <td><pre class="code"> <span class='id identifier rubyid_store'>store</span></pre></td>
397
+ </tr>
398
+
399
+
400
+ <tr>
401
+
402
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
403
+
404
+ <td class="date">2012-01-30 01:31:05</td>
405
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
406
+ <td class="lines">17</td>
407
+ <td><pre class="code"> <span class='kw'>end</span></pre></td>
408
+ </tr>
409
+
410
+
411
+ <tr>
412
+
413
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
414
+
415
+ <td class="date">2012-01-30 01:31:05</td>
416
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
417
+ <td class="lines">18</td>
418
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
419
+ </tr>
420
+
421
+ </table>
422
+ </td>
423
+ <td>
424
+ </tr>
425
+ </table>
426
+ </div>
427
+
428
+ <div class="method_details ">
429
+ <p class="signature " id="write-instance_method">
430
+
431
+ - (<tt>Object</tt>) <strong>write</strong>(data)
432
+
433
+
434
+
435
+ </p><table class="source_code blame">
436
+ <caption><span class="info file"># File 'lib/io_shuten/stores/redis/key_value/collection.rb', line 20</span></caption>
437
+ <tr>
438
+ <td>
439
+ <table>
440
+
441
+
442
+
443
+ <tr>
444
+
445
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
446
+
447
+ <td class="date">2012-01-30 01:31:05</td>
448
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
449
+ <td class="lines">20</td>
450
+ <td><pre class="code"><span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span> <span class='id identifier rubyid_data'>data</span></pre></td>
451
+ </tr>
452
+
453
+
454
+ <tr>
455
+
456
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
457
+
458
+ <td class="date">2012-01-30 01:31:05</td>
459
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
460
+ <td class="lines">21</td>
461
+ <td><pre class="code"> <span class='id identifier rubyid_counter'>counter</span> <span class='op'>=</span> <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@node_name</span><span class='rbrace'>}</span><span class='tstring_content'>:*</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>+</span> <span class='int'>1</span></pre></td>
462
+ </tr>
463
+
464
+
465
+ <tr>
466
+
467
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
468
+
469
+ <td class="date">2012-01-30 01:31:05</td>
470
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
471
+ <td class="lines">22</td>
472
+ <td><pre class="code"> <span class='ivar'>@redis</span><span class='period'>.</span><span class='id identifier rubyid_set'>set</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@node_name</span><span class='rbrace'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_counter'>counter</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span></pre></td>
473
+ </tr>
474
+
475
+
476
+ <tr>
477
+
478
+ <td class="author"><a href="mailto:<chris@dinarrr.com>">Christoph Grabo</a></td>
479
+
480
+ <td class="date">2012-01-30 01:31:05</td>
481
+ <td class="commit"><a title="Add basic redis backends (KeyValue)">3daf4123</a><td>
482
+ <td class="lines">23</td>
483
+ <td><pre class="code"><span class='kw'>end</span></pre></td>
484
+ </tr>
485
+
486
+ </table>
487
+ </td>
488
+ <td>
489
+ </tr>
490
+ </table>
491
+ </div>
492
+
493
+ </div>
494
+
495
+ </div>
496
+
497
+ <div id="footer">
498
+ Generated on Mon Jan 30 01:52:37 2012 by
499
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
500
+ 0.7.4 (ruby-1.9.3).
501
+ </div>
502
+
503
+ </body>
504
+ </html>