roma-client 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -1,6 +1,7 @@
1
1
  require 'digest/sha1'
2
2
  require 'socket'
3
3
  require 'singleton'
4
+ require 'timeout'
4
5
  require 'roma/client/con_pool'
5
6
  require 'roma/client/client_rttable'
6
7
  require 'roma/client/sender'
@@ -402,7 +403,7 @@ module Roma
402
403
  nid, d = @rttable.search_node(key)
403
404
  cmd2 = sprintf(cmd, "#{key}\e#{@default_hash_name}", *params)
404
405
 
405
- timeout(@@timeout){
406
+ Timeout.timeout(@@timeout){
406
407
  return @sender.send_command(nid, cmd2, value, receiver)
407
408
  }
408
409
  rescue => e
@@ -10,7 +10,7 @@ module Roma
10
10
  end
11
11
 
12
12
  def send_route_mklhash_command(node_id)
13
- timeout(1) do
13
+ Timeout.timeout(1) do
14
14
  conn = ConPool.instance.get_connection(node_id)
15
15
  conn.write "mklhash 0\r\n"
16
16
  ret = conn.gets
@@ -23,7 +23,7 @@ module Roma
23
23
  end
24
24
 
25
25
  def send_routedump_command(node_id)
26
- timeout(1) do
26
+ Timeout.timeout(1) do
27
27
  buf = RUBY_VERSION.split('.')
28
28
  if buf[0].to_i == 1 && buf[1].to_i == 8
29
29
  return send_routedump_yaml_command(node_id)
@@ -12,7 +12,7 @@ module Roma #:nodoc:
12
12
 
13
13
  MINOR = 4
14
14
 
15
- TINY = 3
15
+ TINY = 4
16
16
 
17
17
  STRING = [MAJOR, MINOR, TINY].join('.')
18
18
  end
data/lib/roma/client.rb CHANGED
@@ -1,22 +1 @@
1
1
  require 'roma/client/rclient'
2
-
3
- # = Overview
4
- # The ROMA client library is used for roma client.
5
- #
6
- # == Example
7
- # require 'rubygems'
8
- # require 'roma/client'
9
- #
10
- # nodes = ['host1:11211', 'host2:11211']
11
- # client = Roma::Client::RomaClient.new(nodes)
12
- #
13
- # key = 'key'
14
- # res = client.set(key, 'valie')
15
- # puts "put:#{res}"
16
- #
17
- # puts "get:#{client.get key}"
18
- #
19
- # res = client.delete key
20
- # puts "del:#{res}"
21
- # puts "get:#{client.get key}"
22
- #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roma-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muga Nishizawa
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-19 00:00:00.000000000 Z
12
+ date: 2016-08-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -72,18 +72,92 @@ email:
72
72
  executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files:
75
- - README
76
- - CHANGELOG
75
+ - README.md
76
+ - CHANGELOG.md
77
77
  files:
78
- - CHANGELOG
78
+ - CHANGELOG.md
79
79
  - Gemfile
80
80
  - Gemfile.lock
81
81
  - LICENSE
82
- - README
82
+ - README.md
83
83
  - Rakefile
84
84
  - bin/rcdaemon
85
85
  - bin/sample
86
86
  - bin/showbalance
87
+ - doc/CHANGELOG_md.html
88
+ - doc/README_md.html
89
+ - doc/Roma.html
90
+ - doc/Roma/Client.html
91
+ - doc/Roma/Client/ClientPool.html
92
+ - doc/Roma/Client/ClientRoutingTable.html
93
+ - doc/Roma/Client/ConPool.html
94
+ - doc/Roma/Client/Plugin.html
95
+ - doc/Roma/Client/Plugin/Alist.html
96
+ - doc/Roma/Client/Plugin/Map.html
97
+ - doc/Roma/Client/Plugin/MapCount.html
98
+ - doc/Roma/Client/Proxy.html
99
+ - doc/Roma/Client/Proxy/ClientHandler.html
100
+ - doc/Roma/Client/Proxy/Conpool.html
101
+ - doc/Roma/Client/Proxy/Daemon.html
102
+ - doc/Roma/Client/Proxy/RomaHandler.html
103
+ - doc/Roma/Client/RomaClient.html
104
+ - doc/Roma/Client/Sender.html
105
+ - doc/Roma/Client/Stats.html
106
+ - doc/Roma/Client/VERSION.html
107
+ - doc/Roma/Logging.html
108
+ - doc/Roma/Logging/RLogger.html
109
+ - doc/Roma/Logging/RLogger/ExtLogDev.html
110
+ - doc/Roma/Logging/RLogger/ExtShiftAge.html
111
+ - doc/Roma/Logging/RLogger/ExtTrace.html
112
+ - doc/Roma/Logging/RLogger/Severity.html
113
+ - doc/Roma/Routing.html
114
+ - doc/Roma/Routing/RoutingData.html
115
+ - doc/Roma/Routing/RoutingData/RandomNodeListMaker.html
116
+ - doc/created.rid
117
+ - doc/css/fonts.css
118
+ - doc/css/rdoc.css
119
+ - doc/fonts/Lato-Light.ttf
120
+ - doc/fonts/Lato-LightItalic.ttf
121
+ - doc/fonts/Lato-Regular.ttf
122
+ - doc/fonts/Lato-RegularItalic.ttf
123
+ - doc/fonts/SourceCodePro-Bold.ttf
124
+ - doc/fonts/SourceCodePro-Regular.ttf
125
+ - doc/images/add.png
126
+ - doc/images/arrow_up.png
127
+ - doc/images/brick.png
128
+ - doc/images/brick_link.png
129
+ - doc/images/bug.png
130
+ - doc/images/bullet_black.png
131
+ - doc/images/bullet_toggle_minus.png
132
+ - doc/images/bullet_toggle_plus.png
133
+ - doc/images/date.png
134
+ - doc/images/delete.png
135
+ - doc/images/find.png
136
+ - doc/images/loadingAnimation.gif
137
+ - doc/images/macFFBgHack.png
138
+ - doc/images/package.png
139
+ - doc/images/page_green.png
140
+ - doc/images/page_white_text.png
141
+ - doc/images/page_white_width.png
142
+ - doc/images/plugin.png
143
+ - doc/images/ruby.png
144
+ - doc/images/tag_blue.png
145
+ - doc/images/tag_green.png
146
+ - doc/images/transparent.png
147
+ - doc/images/wrench.png
148
+ - doc/images/wrench_orange.png
149
+ - doc/images/zoom.png
150
+ - doc/index.html
151
+ - doc/js/darkfish.js
152
+ - doc/js/jquery.js
153
+ - doc/js/navigation.js
154
+ - doc/js/navigation.js.gz
155
+ - doc/js/search.js
156
+ - doc/js/search_index.js
157
+ - doc/js/search_index.js.gz
158
+ - doc/js/searcher.js
159
+ - doc/js/searcher.js.gz
160
+ - doc/table_of_contents.html
87
161
  - lib/roma-client.rb
88
162
  - lib/roma/client.rb
89
163
  - lib/roma/client/client_pool.rb
@@ -114,15 +188,15 @@ rdoc_options:
114
188
  - "--line-numbers"
115
189
  - "--inline-source"
116
190
  - "--main"
117
- - README
191
+ - README.md
118
192
  - "-c UTF-8"
119
193
  require_paths:
120
194
  - lib
121
195
  required_ruby_version: !ruby/object:Gem::Requirement
122
196
  requirements:
123
- - - ">="
197
+ - - ">"
124
198
  - !ruby/object:Gem::Version
125
- version: '0'
199
+ version: 2.1.0
126
200
  required_rubygems_version: !ruby/object:Gem::Requirement
127
201
  requirements:
128
202
  - - ">="
@@ -130,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
204
  version: '0'
131
205
  requirements: []
132
206
  rubyforge_project:
133
- rubygems_version: 2.2.2
207
+ rubygems_version: 2.5.1
134
208
  signing_key:
135
209
  specification_version: 4
136
210
  summary: ROMA client library
data/README DELETED
@@ -1,17 +0,0 @@
1
- ================================================================
2
- ROMA: A Distributed Key-Value Store in Ruby
3
- Copyright (C) 2009 Rakuten, Inc.
4
- ================================================================
5
-
6
- ROMA is one of the data storing systems for distributed key-value
7
- stores. It is a completely decentralized distributed system that
8
- consists of multiple processes, called nodes, on several machines. It
9
- is based on pure P2P architecture like a distributed hash table, thus
10
- it provides high availability and scalability.
11
-
12
- ROMA is written in Ruby. However, following choices are available to
13
- access to ROMA.
14
-
15
- * Client libraries of Ruby and Java are available.
16
- * ROMA protocol is compatible with memcached text-based one so that
17
- any memcached client libraries allows users to interact with ROMA.