esquema 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -1
- data/CHANGELOG.md +9 -1
- data/README.md +11 -9
- data/lib/esquema/builder.rb +73 -28
- data/lib/esquema/configuration.rb +2 -1
- data/lib/esquema/keyword_validator.rb +98 -0
- data/lib/esquema/model.rb +4 -0
- data/lib/esquema/property.rb +185 -26
- data/lib/esquema/schema_enhancer.rb +55 -30
- data/lib/esquema/type_caster.rb +16 -4
- data/lib/esquema/version.rb +1 -1
- data/lib/esquema/virtual_column.rb +46 -0
- data/lib/esquema.rb +7 -1
- data/lib/generators/esquema/install/install_generator.rb +1 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/activemodel.rbi +89 -0
- data/sorbet/rbi/annotations/activerecord.rbi +92 -0
- data/sorbet/rbi/annotations/activesupport.rbi +421 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/activemodel@7.1.3.rbi +8 -0
- data/sorbet/rbi/gems/activerecord@7.1.3.rbi +8 -0
- data/sorbet/rbi/gems/activesupport@7.1.3.rbi +192 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/base64@0.2.0.rbi +8 -0
- data/sorbet/rbi/gems/bigdecimal@3.1.6.rbi +8 -0
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +3606 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +8 -0
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +1130 -0
- data/sorbet/rbi/gems/drb@2.2.0.rbi +1272 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
- data/sorbet/rbi/gems/i18n@1.14.1.rbi +8 -0
- data/sorbet/rbi/gems/json@2.7.1.rbi +1553 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14237 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
- data/sorbet/rbi/gems/minitest@5.22.2.rbi +8 -0
- data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +8 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
- data/sorbet/rbi/gems/parser@3.3.0.5.rbi +5472 -0
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +951 -0
- data/sorbet/rbi/gems/prism@0.24.0.rbi +31040 -0
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1150 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10075 -0
- data/sorbet/rbi/gems/racc@1.7.3.rbi +157 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
- data/sorbet/rbi/gems/rake@13.1.0.rbi +3027 -0
- data/sorbet/rbi/gems/rbi@0.1.9.rbi +3006 -0
- data/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +3771 -0
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +4781 -0
- data/sorbet/rbi/gems/rspec-core@3.13.0.rbi +10978 -0
- data/sorbet/rbi/gems/rspec-expectations@3.13.0.rbi +8153 -0
- data/sorbet/rbi/gems/rspec-mocks@3.13.0.rbi +5340 -0
- data/sorbet/rbi/gems/rspec-support@3.13.0.rbi +1629 -0
- data/sorbet/rbi/gems/rspec@3.13.0.rbi +82 -0
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7006 -0
- data/sorbet/rbi/gems/rubocop@1.60.2.rbi +57383 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +8 -0
- data/sorbet/rbi/gems/spoom@1.2.4.rbi +3777 -0
- data/sorbet/rbi/gems/sqlite3@1.7.2.rbi +1691 -0
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +23133 -0
- data/sorbet/rbi/gems/tapioca@0.12.0.rbi +3510 -0
- data/sorbet/rbi/gems/thor@1.3.0.rbi +4345 -0
- data/sorbet/rbi/gems/timeout@0.4.1.rbi +142 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +8 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +65 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
- data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
- data/sorbet/rbi/todo.rbi +20 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +74 -12
- data/esquema.gemspec +0 -38
@@ -0,0 +1,1272 @@
|
|
1
|
+
# typed: false
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `drb` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem drb`.
|
6
|
+
|
7
|
+
# for ruby-1.8.0
|
8
|
+
module DRb
|
9
|
+
private
|
10
|
+
|
11
|
+
# Get the configuration of the current server.
|
12
|
+
#
|
13
|
+
# If there is no current server, this returns the default configuration.
|
14
|
+
# See #current_server and DRbServer::make_config.
|
15
|
+
#
|
16
|
+
# source://drb//drb/drb.rb#1832
|
17
|
+
def config; end
|
18
|
+
|
19
|
+
# Get the 'current' server.
|
20
|
+
#
|
21
|
+
# In the context of execution taking place within the main
|
22
|
+
# thread of a dRuby server (typically, as a result of a remote
|
23
|
+
# call on the server or one of its objects), the current
|
24
|
+
# server is that server. Otherwise, the current server is
|
25
|
+
# the primary server.
|
26
|
+
#
|
27
|
+
# If the above rule fails to find a server, a DRbServerNotFound
|
28
|
+
# error is raised.
|
29
|
+
#
|
30
|
+
# @raise [DRbServerNotFound]
|
31
|
+
#
|
32
|
+
# source://drb//drb/drb.rb#1789
|
33
|
+
def current_server; end
|
34
|
+
|
35
|
+
# Retrieves the server with the given +uri+.
|
36
|
+
#
|
37
|
+
# See also regist_server and remove_server.
|
38
|
+
#
|
39
|
+
# source://drb//drb/drb.rb#1934
|
40
|
+
def fetch_server(uri); end
|
41
|
+
|
42
|
+
# Get the front object of the current server.
|
43
|
+
#
|
44
|
+
# This raises a DRbServerNotFound error if there is no current server.
|
45
|
+
# See #current_server.
|
46
|
+
#
|
47
|
+
# source://drb//drb/drb.rb#1843
|
48
|
+
def front; end
|
49
|
+
|
50
|
+
# Is +uri+ the URI for the current local server?
|
51
|
+
#
|
52
|
+
# @return [Boolean]
|
53
|
+
#
|
54
|
+
# source://drb//drb/drb.rb#1822
|
55
|
+
def here?(uri); end
|
56
|
+
|
57
|
+
# Set the default ACL to +acl+.
|
58
|
+
#
|
59
|
+
# See DRb::DRbServer.default_acl.
|
60
|
+
#
|
61
|
+
# source://drb//drb/drb.rb#1888
|
62
|
+
def install_acl(acl); end
|
63
|
+
|
64
|
+
# Set the default id conversion object.
|
65
|
+
#
|
66
|
+
# This is expected to be an instance such as DRb::DRbIdConv that responds to
|
67
|
+
# #to_id and #to_obj that can convert objects to and from DRb references.
|
68
|
+
#
|
69
|
+
# See DRbServer#default_id_conv.
|
70
|
+
#
|
71
|
+
# source://drb//drb/drb.rb#1880
|
72
|
+
def install_id_conv(idconv); end
|
73
|
+
|
74
|
+
# source://drb//drb/drb.rb#1894
|
75
|
+
def mutex; end
|
76
|
+
|
77
|
+
# The primary local dRuby server.
|
78
|
+
#
|
79
|
+
# This is the server created by the #start_service call.
|
80
|
+
#
|
81
|
+
# source://drb//drb/drb.rb#1776
|
82
|
+
def primary_server; end
|
83
|
+
|
84
|
+
# The primary local dRuby server.
|
85
|
+
#
|
86
|
+
# This is the server created by the #start_service call.
|
87
|
+
#
|
88
|
+
# source://drb//drb/drb.rb#1776
|
89
|
+
def primary_server=(_arg0); end
|
90
|
+
|
91
|
+
# Registers +server+ with DRb.
|
92
|
+
#
|
93
|
+
# This is called when a new DRb::DRbServer is created.
|
94
|
+
#
|
95
|
+
# If there is no primary server then +server+ becomes the primary server.
|
96
|
+
#
|
97
|
+
# Example:
|
98
|
+
#
|
99
|
+
# require 'drb'
|
100
|
+
#
|
101
|
+
# s = DRb::DRbServer.new # automatically calls regist_server
|
102
|
+
# DRb.fetch_server s.uri #=> #<DRb::DRbServer:0x...>
|
103
|
+
#
|
104
|
+
# source://drb//drb/drb.rb#1912
|
105
|
+
def regist_server(server); end
|
106
|
+
|
107
|
+
# Removes +server+ from the list of registered servers.
|
108
|
+
#
|
109
|
+
# source://drb//drb/drb.rb#1921
|
110
|
+
def remove_server(server); end
|
111
|
+
|
112
|
+
# Start a dRuby server locally.
|
113
|
+
#
|
114
|
+
# The new dRuby server will become the primary server, even
|
115
|
+
# if another server is currently the primary server.
|
116
|
+
#
|
117
|
+
# +uri+ is the URI for the server to bind to. If nil,
|
118
|
+
# the server will bind to random port on the default local host
|
119
|
+
# name and use the default dRuby protocol.
|
120
|
+
#
|
121
|
+
# +front+ is the server's front object. This may be nil.
|
122
|
+
#
|
123
|
+
# +config+ is the configuration for the new server. This may
|
124
|
+
# be nil.
|
125
|
+
#
|
126
|
+
# See DRbServer::new.
|
127
|
+
#
|
128
|
+
# source://drb//drb/drb.rb#1768
|
129
|
+
def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end
|
130
|
+
|
131
|
+
# Stop the local dRuby server.
|
132
|
+
#
|
133
|
+
# This operates on the primary server. If there is no primary
|
134
|
+
# server currently running, it is a noop.
|
135
|
+
#
|
136
|
+
# source://drb//drb/drb.rb#1801
|
137
|
+
def stop_service; end
|
138
|
+
|
139
|
+
# Get the thread of the primary server.
|
140
|
+
#
|
141
|
+
# This returns nil if there is no primary server. See #primary_server.
|
142
|
+
#
|
143
|
+
# source://drb//drb/drb.rb#1869
|
144
|
+
def thread; end
|
145
|
+
|
146
|
+
# Get a reference id for an object using the current server.
|
147
|
+
#
|
148
|
+
# This raises a DRbServerNotFound error if there is no current server.
|
149
|
+
# See #current_server.
|
150
|
+
#
|
151
|
+
# source://drb//drb/drb.rb#1860
|
152
|
+
def to_id(obj); end
|
153
|
+
|
154
|
+
# Convert a reference into an object using the current server.
|
155
|
+
#
|
156
|
+
# This raises a DRbServerNotFound error if there is no current server.
|
157
|
+
# See #current_server.
|
158
|
+
#
|
159
|
+
# source://drb//drb/drb.rb#1852
|
160
|
+
def to_obj(ref); end
|
161
|
+
|
162
|
+
# Get the URI defining the local dRuby space.
|
163
|
+
#
|
164
|
+
# This is the URI of the current server. See #current_server.
|
165
|
+
#
|
166
|
+
# source://drb//drb/drb.rb#1810
|
167
|
+
def uri; end
|
168
|
+
|
169
|
+
class << self
|
170
|
+
# Get the configuration of the current server.
|
171
|
+
#
|
172
|
+
# If there is no current server, this returns the default configuration.
|
173
|
+
# See #current_server and DRbServer::make_config.
|
174
|
+
#
|
175
|
+
# source://drb//drb/drb.rb#1832
|
176
|
+
def config; end
|
177
|
+
|
178
|
+
# Get the 'current' server.
|
179
|
+
#
|
180
|
+
# In the context of execution taking place within the main
|
181
|
+
# thread of a dRuby server (typically, as a result of a remote
|
182
|
+
# call on the server or one of its objects), the current
|
183
|
+
# server is that server. Otherwise, the current server is
|
184
|
+
# the primary server.
|
185
|
+
#
|
186
|
+
# If the above rule fails to find a server, a DRbServerNotFound
|
187
|
+
# error is raised.
|
188
|
+
#
|
189
|
+
# @raise [DRbServerNotFound]
|
190
|
+
#
|
191
|
+
# source://drb//drb/drb.rb#1789
|
192
|
+
def current_server; end
|
193
|
+
|
194
|
+
# Retrieves the server with the given +uri+.
|
195
|
+
#
|
196
|
+
# See also regist_server and remove_server.
|
197
|
+
#
|
198
|
+
# source://drb//drb/drb.rb#1934
|
199
|
+
def fetch_server(uri); end
|
200
|
+
|
201
|
+
# Get the front object of the current server.
|
202
|
+
#
|
203
|
+
# This raises a DRbServerNotFound error if there is no current server.
|
204
|
+
# See #current_server.
|
205
|
+
#
|
206
|
+
# source://drb//drb/drb.rb#1843
|
207
|
+
def front; end
|
208
|
+
|
209
|
+
# Is +uri+ the URI for the current local server?
|
210
|
+
#
|
211
|
+
# @return [Boolean]
|
212
|
+
#
|
213
|
+
# source://drb//drb/drb.rb#1822
|
214
|
+
def here?(uri); end
|
215
|
+
|
216
|
+
# Set the default ACL to +acl+.
|
217
|
+
#
|
218
|
+
# See DRb::DRbServer.default_acl.
|
219
|
+
#
|
220
|
+
# source://drb//drb/drb.rb#1888
|
221
|
+
def install_acl(acl); end
|
222
|
+
|
223
|
+
# Set the default id conversion object.
|
224
|
+
#
|
225
|
+
# This is expected to be an instance such as DRb::DRbIdConv that responds to
|
226
|
+
# #to_id and #to_obj that can convert objects to and from DRb references.
|
227
|
+
#
|
228
|
+
# See DRbServer#default_id_conv.
|
229
|
+
#
|
230
|
+
# source://drb//drb/drb.rb#1880
|
231
|
+
def install_id_conv(idconv); end
|
232
|
+
|
233
|
+
# source://drb//drb/drb.rb#1894
|
234
|
+
def mutex; end
|
235
|
+
|
236
|
+
# The primary local dRuby server.
|
237
|
+
#
|
238
|
+
# This is the server created by the #start_service call.
|
239
|
+
#
|
240
|
+
# source://drb//drb/drb.rb#1776
|
241
|
+
def primary_server; end
|
242
|
+
|
243
|
+
# The primary local dRuby server.
|
244
|
+
#
|
245
|
+
# This is the server created by the #start_service call.
|
246
|
+
#
|
247
|
+
# source://drb//drb/drb.rb#1776
|
248
|
+
def primary_server=(_arg0); end
|
249
|
+
|
250
|
+
# Registers +server+ with DRb.
|
251
|
+
#
|
252
|
+
# This is called when a new DRb::DRbServer is created.
|
253
|
+
#
|
254
|
+
# If there is no primary server then +server+ becomes the primary server.
|
255
|
+
#
|
256
|
+
# Example:
|
257
|
+
#
|
258
|
+
# require 'drb'
|
259
|
+
#
|
260
|
+
# s = DRb::DRbServer.new # automatically calls regist_server
|
261
|
+
# DRb.fetch_server s.uri #=> #<DRb::DRbServer:0x...>
|
262
|
+
#
|
263
|
+
# source://drb//drb/drb.rb#1912
|
264
|
+
def regist_server(server); end
|
265
|
+
|
266
|
+
# Removes +server+ from the list of registered servers.
|
267
|
+
#
|
268
|
+
# source://drb//drb/drb.rb#1921
|
269
|
+
def remove_server(server); end
|
270
|
+
|
271
|
+
# Start a dRuby server locally.
|
272
|
+
#
|
273
|
+
# The new dRuby server will become the primary server, even
|
274
|
+
# if another server is currently the primary server.
|
275
|
+
#
|
276
|
+
# +uri+ is the URI for the server to bind to. If nil,
|
277
|
+
# the server will bind to random port on the default local host
|
278
|
+
# name and use the default dRuby protocol.
|
279
|
+
#
|
280
|
+
# +front+ is the server's front object. This may be nil.
|
281
|
+
#
|
282
|
+
# +config+ is the configuration for the new server. This may
|
283
|
+
# be nil.
|
284
|
+
#
|
285
|
+
# See DRbServer::new.
|
286
|
+
#
|
287
|
+
# source://drb//drb/drb.rb#1768
|
288
|
+
def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end
|
289
|
+
|
290
|
+
# Stop the local dRuby server.
|
291
|
+
#
|
292
|
+
# This operates on the primary server. If there is no primary
|
293
|
+
# server currently running, it is a noop.
|
294
|
+
#
|
295
|
+
# source://drb//drb/drb.rb#1801
|
296
|
+
def stop_service; end
|
297
|
+
|
298
|
+
# Get the thread of the primary server.
|
299
|
+
#
|
300
|
+
# This returns nil if there is no primary server. See #primary_server.
|
301
|
+
#
|
302
|
+
# source://drb//drb/drb.rb#1869
|
303
|
+
def thread; end
|
304
|
+
|
305
|
+
# Get a reference id for an object using the current server.
|
306
|
+
#
|
307
|
+
# This raises a DRbServerNotFound error if there is no current server.
|
308
|
+
# See #current_server.
|
309
|
+
#
|
310
|
+
# source://drb//drb/drb.rb#1860
|
311
|
+
def to_id(obj); end
|
312
|
+
|
313
|
+
# Convert a reference into an object using the current server.
|
314
|
+
#
|
315
|
+
# This raises a DRbServerNotFound error if there is no current server.
|
316
|
+
# See #current_server.
|
317
|
+
#
|
318
|
+
# source://drb//drb/drb.rb#1852
|
319
|
+
def to_obj(ref); end
|
320
|
+
|
321
|
+
# Get the URI defining the local dRuby space.
|
322
|
+
#
|
323
|
+
# This is the URI of the current server. See #current_server.
|
324
|
+
#
|
325
|
+
# source://drb//drb/drb.rb#1810
|
326
|
+
def uri; end
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
330
|
+
# An Array wrapper that can be sent to another server via DRb.
|
331
|
+
#
|
332
|
+
# All entries in the array will be dumped or be references that point to
|
333
|
+
# the local server.
|
334
|
+
class DRb::DRbArray
|
335
|
+
# Creates a new DRbArray that either dumps or wraps all the items in the
|
336
|
+
# Array +ary+ so they can be loaded by a remote DRb server.
|
337
|
+
#
|
338
|
+
# @return [DRbArray] a new instance of DRbArray
|
339
|
+
#
|
340
|
+
# source://drb//drb/drb.rb#523
|
341
|
+
def initialize(ary); end
|
342
|
+
|
343
|
+
# source://drb//drb/drb.rb#542
|
344
|
+
def _dump(lv); end
|
345
|
+
|
346
|
+
class << self
|
347
|
+
# source://drb//drb/drb.rb#538
|
348
|
+
def _load(s); end
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
# Class handling the connection between a DRbObject and the
|
353
|
+
# server the real object lives on.
|
354
|
+
#
|
355
|
+
# This class maintains a pool of connections, to reduce the
|
356
|
+
# overhead of starting and closing down connections for each
|
357
|
+
# method call.
|
358
|
+
#
|
359
|
+
# This class is used internally by DRbObject. The user does
|
360
|
+
# not normally need to deal with it directly.
|
361
|
+
class DRb::DRbConn
|
362
|
+
# @return [DRbConn] a new instance of DRbConn
|
363
|
+
#
|
364
|
+
# source://drb//drb/drb.rb#1317
|
365
|
+
def initialize(remote_uri); end
|
366
|
+
|
367
|
+
# @return [Boolean]
|
368
|
+
#
|
369
|
+
# source://drb//drb/drb.rb#1333
|
370
|
+
def alive?; end
|
371
|
+
|
372
|
+
# source://drb//drb/drb.rb#1328
|
373
|
+
def close; end
|
374
|
+
|
375
|
+
# source://drb//drb/drb.rb#1323
|
376
|
+
def send_message(ref, msg_id, arg, block); end
|
377
|
+
|
378
|
+
# source://drb//drb/drb.rb#1321
|
379
|
+
def uri; end
|
380
|
+
|
381
|
+
class << self
|
382
|
+
# source://drb//drb/drb.rb#1259
|
383
|
+
def make_pool; end
|
384
|
+
|
385
|
+
# source://drb//drb/drb.rb#1297
|
386
|
+
def open(remote_uri); end
|
387
|
+
|
388
|
+
# source://drb//drb/drb.rb#1292
|
389
|
+
def stop_pool; end
|
390
|
+
end
|
391
|
+
end
|
392
|
+
|
393
|
+
# Class responsible for converting between an object and its id.
|
394
|
+
#
|
395
|
+
# This, the default implementation, uses an object's local ObjectSpace
|
396
|
+
# __id__ as its id. This means that an object's identification over
|
397
|
+
# drb remains valid only while that object instance remains alive
|
398
|
+
# within the server runtime.
|
399
|
+
#
|
400
|
+
# For alternative mechanisms, see DRb::TimerIdConv in drb/timeridconv.rb
|
401
|
+
# and DRbNameIdConv in sample/name.rb in the full drb distribution.
|
402
|
+
class DRb::DRbIdConv
|
403
|
+
# Convert an object into a reference id.
|
404
|
+
#
|
405
|
+
# This implementation returns the object's __id__ in the local
|
406
|
+
# object space.
|
407
|
+
#
|
408
|
+
# source://drb//drb/drb.rb#374
|
409
|
+
def to_id(obj); end
|
410
|
+
|
411
|
+
# Convert an object reference id to an object.
|
412
|
+
#
|
413
|
+
# This implementation looks up the reference id in the local object
|
414
|
+
# space and returns the object it refers to.
|
415
|
+
#
|
416
|
+
# source://drb//drb/drb.rb#366
|
417
|
+
def to_obj(ref); end
|
418
|
+
end
|
419
|
+
|
420
|
+
# Handler for sending and receiving drb messages.
|
421
|
+
#
|
422
|
+
# This takes care of the low-level marshalling and unmarshalling
|
423
|
+
# of drb requests and responses sent over the wire between server
|
424
|
+
# and client. This relieves the implementor of a new drb
|
425
|
+
# protocol layer with having to deal with these details.
|
426
|
+
#
|
427
|
+
# The user does not have to directly deal with this object in
|
428
|
+
# normal use.
|
429
|
+
class DRb::DRbMessage
|
430
|
+
# @return [DRbMessage] a new instance of DRbMessage
|
431
|
+
#
|
432
|
+
# source://drb//drb/drb.rb#557
|
433
|
+
def initialize(config); end
|
434
|
+
|
435
|
+
# source://drb//drb/drb.rb#562
|
436
|
+
def dump(obj, error = T.unsafe(nil)); end
|
437
|
+
|
438
|
+
# @raise [DRbConnError]
|
439
|
+
#
|
440
|
+
# source://drb//drb/drb.rb#579
|
441
|
+
def load(soc); end
|
442
|
+
|
443
|
+
# source://drb//drb/drb.rb#639
|
444
|
+
def recv_reply(stream); end
|
445
|
+
|
446
|
+
# @raise [DRbConnError]
|
447
|
+
#
|
448
|
+
# source://drb//drb/drb.rb#619
|
449
|
+
def recv_request(stream); end
|
450
|
+
|
451
|
+
# source://drb//drb/drb.rb#633
|
452
|
+
def send_reply(stream, succ, result); end
|
453
|
+
|
454
|
+
# source://drb//drb/drb.rb#605
|
455
|
+
def send_request(stream, ref, msg_id, arg, b); end
|
456
|
+
|
457
|
+
private
|
458
|
+
|
459
|
+
# source://drb//drb/drb.rb#646
|
460
|
+
def make_proxy(obj, error = T.unsafe(nil)); end
|
461
|
+
end
|
462
|
+
|
463
|
+
class DRb::DRbObject
|
464
|
+
# Create a new remote object stub.
|
465
|
+
#
|
466
|
+
# +obj+ is the (local) object we want to create a stub for. Normally
|
467
|
+
# this is +nil+. +uri+ is the URI of the remote object that this
|
468
|
+
# will be a stub for.
|
469
|
+
#
|
470
|
+
# @return [DRbObject] a new instance of DRbObject
|
471
|
+
#
|
472
|
+
# source://drb//drb/drb.rb#1089
|
473
|
+
def initialize(obj, uri = T.unsafe(nil)); end
|
474
|
+
|
475
|
+
# source://drb//drb/eq.rb#4
|
476
|
+
def ==(other); end
|
477
|
+
|
478
|
+
# Get the reference of the object, if local.
|
479
|
+
#
|
480
|
+
# source://drb//drb/drb.rb#1115
|
481
|
+
def __drbref; end
|
482
|
+
|
483
|
+
# Get the URI of the remote object.
|
484
|
+
#
|
485
|
+
# source://drb//drb/drb.rb#1110
|
486
|
+
def __drburi; end
|
487
|
+
|
488
|
+
# Marshall this object.
|
489
|
+
#
|
490
|
+
# The URI and ref of the object are marshalled.
|
491
|
+
#
|
492
|
+
# source://drb//drb/drb.rb#1080
|
493
|
+
def _dump(lv); end
|
494
|
+
|
495
|
+
# source://drb//drb/eq.rb#4
|
496
|
+
def eql?(other); end
|
497
|
+
|
498
|
+
# source://drb//drb/eq.rb#9
|
499
|
+
def hash; end
|
500
|
+
|
501
|
+
# source://drb//drb/drb.rb#1135
|
502
|
+
def method_missing(msg_id, *a, **_arg2, &b); end
|
503
|
+
|
504
|
+
# source://drb//drb/drb.rb#1187
|
505
|
+
def pretty_print(q); end
|
506
|
+
|
507
|
+
# source://drb//drb/drb.rb#1191
|
508
|
+
def pretty_print_cycle(q); end
|
509
|
+
|
510
|
+
# Routes respond_to? to the referenced remote object.
|
511
|
+
#
|
512
|
+
# @return [Boolean]
|
513
|
+
#
|
514
|
+
# source://drb//drb/drb.rb#1123
|
515
|
+
def respond_to?(msg_id, priv = T.unsafe(nil)); end
|
516
|
+
|
517
|
+
class << self
|
518
|
+
# Unmarshall a marshalled DRbObject.
|
519
|
+
#
|
520
|
+
# If the referenced object is located within the local server, then
|
521
|
+
# the object itself is returned. Otherwise, a new DRbObject is
|
522
|
+
# created to act as a stub for the remote referenced object.
|
523
|
+
#
|
524
|
+
# source://drb//drb/drb.rb#1051
|
525
|
+
def _load(s); end
|
526
|
+
|
527
|
+
# Creates a DRb::DRbObject given the reference information to the remote
|
528
|
+
# host +uri+ and object +ref+.
|
529
|
+
#
|
530
|
+
# source://drb//drb/drb.rb#1065
|
531
|
+
def new_with(uri, ref); end
|
532
|
+
|
533
|
+
# Create a new DRbObject from a URI alone.
|
534
|
+
#
|
535
|
+
# source://drb//drb/drb.rb#1073
|
536
|
+
def new_with_uri(uri); end
|
537
|
+
|
538
|
+
# Returns a modified backtrace from +result+ with the +uri+ where each call
|
539
|
+
# in the backtrace came from.
|
540
|
+
#
|
541
|
+
# source://drb//drb/drb.rb#1173
|
542
|
+
def prepare_backtrace(uri, result); end
|
543
|
+
|
544
|
+
# Given the +uri+ of another host executes the block provided.
|
545
|
+
#
|
546
|
+
# source://drb//drb/drb.rb#1160
|
547
|
+
def with_friend(uri); end
|
548
|
+
end
|
549
|
+
end
|
550
|
+
|
551
|
+
# Module managing the underlying network protocol(s) used by drb.
|
552
|
+
#
|
553
|
+
# By default, drb uses the DRbTCPSocket protocol. Other protocols
|
554
|
+
# can be defined. A protocol must define the following class methods:
|
555
|
+
#
|
556
|
+
# [open(uri, config)] Open a client connection to the server at +uri+,
|
557
|
+
# using configuration +config+. Return a protocol
|
558
|
+
# instance for this connection.
|
559
|
+
# [open_server(uri, config)] Open a server listening at +uri+,
|
560
|
+
# using configuration +config+. Return a
|
561
|
+
# protocol instance for this listener.
|
562
|
+
# [uri_option(uri, config)] Take a URI, possibly containing an option
|
563
|
+
# component (e.g. a trailing '?param=val'),
|
564
|
+
# and return a [uri, option] tuple.
|
565
|
+
#
|
566
|
+
# All of these methods should raise a DRbBadScheme error if the URI
|
567
|
+
# does not identify the protocol they support (e.g. "druby:" for
|
568
|
+
# the standard Ruby protocol). This is how the DRbProtocol module,
|
569
|
+
# given a URI, determines which protocol implementation serves that
|
570
|
+
# protocol.
|
571
|
+
#
|
572
|
+
# The protocol instance returned by #open_server must have the
|
573
|
+
# following methods:
|
574
|
+
#
|
575
|
+
# [accept] Accept a new connection to the server. Returns a protocol
|
576
|
+
# instance capable of communicating with the client.
|
577
|
+
# [close] Close the server connection.
|
578
|
+
# [uri] Get the URI for this server.
|
579
|
+
#
|
580
|
+
# The protocol instance returned by #open must have the following methods:
|
581
|
+
#
|
582
|
+
# [send_request (ref, msg_id, arg, b)]
|
583
|
+
# Send a request to +ref+ with the given message id and arguments.
|
584
|
+
# This is most easily implemented by calling DRbMessage.send_request,
|
585
|
+
# providing a stream that sits on top of the current protocol.
|
586
|
+
# [recv_reply]
|
587
|
+
# Receive a reply from the server and return it as a [success-boolean,
|
588
|
+
# reply-value] pair. This is most easily implemented by calling
|
589
|
+
# DRb.recv_reply, providing a stream that sits on top of the
|
590
|
+
# current protocol.
|
591
|
+
# [alive?]
|
592
|
+
# Is this connection still alive?
|
593
|
+
# [close]
|
594
|
+
# Close this connection.
|
595
|
+
#
|
596
|
+
# The protocol instance returned by #open_server().accept() must have
|
597
|
+
# the following methods:
|
598
|
+
#
|
599
|
+
# [recv_request]
|
600
|
+
# Receive a request from the client and return a [object, message,
|
601
|
+
# args, block] tuple. This is most easily implemented by calling
|
602
|
+
# DRbMessage.recv_request, providing a stream that sits on top of
|
603
|
+
# the current protocol.
|
604
|
+
# [send_reply(succ, result)]
|
605
|
+
# Send a reply to the client. This is most easily implemented
|
606
|
+
# by calling DRbMessage.send_reply, providing a stream that sits
|
607
|
+
# on top of the current protocol.
|
608
|
+
# [close]
|
609
|
+
# Close this connection.
|
610
|
+
#
|
611
|
+
# A new protocol is registered with the DRbProtocol module using
|
612
|
+
# the add_protocol method.
|
613
|
+
#
|
614
|
+
# For examples of other protocols, see DRbUNIXSocket in drb/unix.rb,
|
615
|
+
# and HTTP0 in sample/http0.rb and sample/http0serv.rb in the full
|
616
|
+
# drb distribution.
|
617
|
+
module DRb::DRbProtocol
|
618
|
+
private
|
619
|
+
|
620
|
+
# Add a new protocol to the DRbProtocol module.
|
621
|
+
#
|
622
|
+
# source://drb//drb/drb.rb#724
|
623
|
+
def add_protocol(prot); end
|
624
|
+
|
625
|
+
# source://drb//drb/drb.rb#802
|
626
|
+
def auto_load(uri); end
|
627
|
+
|
628
|
+
# Open a client connection to +uri+ with the configuration +config+.
|
629
|
+
#
|
630
|
+
# The DRbProtocol module asks each registered protocol in turn to
|
631
|
+
# try to open the URI. Each protocol signals that it does not handle that
|
632
|
+
# URI by raising a DRbBadScheme error. If no protocol recognises the
|
633
|
+
# URI, then a DRbBadURI error is raised. If a protocol accepts the
|
634
|
+
# URI, but an error occurs in opening it, a DRbConnError is raised.
|
635
|
+
#
|
636
|
+
# @raise [DRbBadURI]
|
637
|
+
#
|
638
|
+
# source://drb//drb/drb.rb#736
|
639
|
+
def open(uri, config, first = T.unsafe(nil)); end
|
640
|
+
|
641
|
+
# Open a server listening for connections at +uri+ with
|
642
|
+
# configuration +config+.
|
643
|
+
#
|
644
|
+
# The DRbProtocol module asks each registered protocol in turn to
|
645
|
+
# try to open a server at the URI. Each protocol signals that it does
|
646
|
+
# not handle that URI by raising a DRbBadScheme error. If no protocol
|
647
|
+
# recognises the URI, then a DRbBadURI error is raised. If a protocol
|
648
|
+
# accepts the URI, but an error occurs in opening it, the underlying
|
649
|
+
# error is passed on to the caller.
|
650
|
+
#
|
651
|
+
# @raise [DRbBadURI]
|
652
|
+
#
|
653
|
+
# source://drb//drb/drb.rb#764
|
654
|
+
def open_server(uri, config, first = T.unsafe(nil)); end
|
655
|
+
|
656
|
+
# Parse +uri+ into a [uri, option] pair.
|
657
|
+
#
|
658
|
+
# The DRbProtocol module asks each registered protocol in turn to
|
659
|
+
# try to parse the URI. Each protocol signals that it does not handle that
|
660
|
+
# URI by raising a DRbBadScheme error. If no protocol recognises the
|
661
|
+
# URI, then a DRbBadURI error is raised.
|
662
|
+
#
|
663
|
+
# @raise [DRbBadURI]
|
664
|
+
#
|
665
|
+
# source://drb//drb/drb.rb#785
|
666
|
+
def uri_option(uri, config, first = T.unsafe(nil)); end
|
667
|
+
|
668
|
+
class << self
|
669
|
+
# Add a new protocol to the DRbProtocol module.
|
670
|
+
#
|
671
|
+
# source://drb//drb/drb.rb#724
|
672
|
+
def add_protocol(prot); end
|
673
|
+
|
674
|
+
# source://drb//drb/drb.rb#802
|
675
|
+
def auto_load(uri); end
|
676
|
+
|
677
|
+
# Open a client connection to +uri+ with the configuration +config+.
|
678
|
+
#
|
679
|
+
# The DRbProtocol module asks each registered protocol in turn to
|
680
|
+
# try to open the URI. Each protocol signals that it does not handle that
|
681
|
+
# URI by raising a DRbBadScheme error. If no protocol recognises the
|
682
|
+
# URI, then a DRbBadURI error is raised. If a protocol accepts the
|
683
|
+
# URI, but an error occurs in opening it, a DRbConnError is raised.
|
684
|
+
#
|
685
|
+
# @raise [DRbBadURI]
|
686
|
+
#
|
687
|
+
# source://drb//drb/drb.rb#736
|
688
|
+
def open(uri, config, first = T.unsafe(nil)); end
|
689
|
+
|
690
|
+
# Open a server listening for connections at +uri+ with
|
691
|
+
# configuration +config+.
|
692
|
+
#
|
693
|
+
# The DRbProtocol module asks each registered protocol in turn to
|
694
|
+
# try to open a server at the URI. Each protocol signals that it does
|
695
|
+
# not handle that URI by raising a DRbBadScheme error. If no protocol
|
696
|
+
# recognises the URI, then a DRbBadURI error is raised. If a protocol
|
697
|
+
# accepts the URI, but an error occurs in opening it, the underlying
|
698
|
+
# error is passed on to the caller.
|
699
|
+
#
|
700
|
+
# @raise [DRbBadURI]
|
701
|
+
#
|
702
|
+
# source://drb//drb/drb.rb#764
|
703
|
+
def open_server(uri, config, first = T.unsafe(nil)); end
|
704
|
+
|
705
|
+
# Parse +uri+ into a [uri, option] pair.
|
706
|
+
#
|
707
|
+
# The DRbProtocol module asks each registered protocol in turn to
|
708
|
+
# try to parse the URI. Each protocol signals that it does not handle that
|
709
|
+
# URI by raising a DRbBadScheme error. If no protocol recognises the
|
710
|
+
# URI, then a DRbBadURI error is raised.
|
711
|
+
#
|
712
|
+
# @raise [DRbBadURI]
|
713
|
+
#
|
714
|
+
# source://drb//drb/drb.rb#785
|
715
|
+
def uri_option(uri, config, first = T.unsafe(nil)); end
|
716
|
+
end
|
717
|
+
end
|
718
|
+
|
719
|
+
# An exception wrapping an error object
|
720
|
+
class DRb::DRbRemoteError < ::DRb::DRbError
|
721
|
+
# Creates a new remote error that wraps the Exception +error+
|
722
|
+
#
|
723
|
+
# @return [DRbRemoteError] a new instance of DRbRemoteError
|
724
|
+
#
|
725
|
+
# source://drb//drb/drb.rb#434
|
726
|
+
def initialize(error); end
|
727
|
+
|
728
|
+
# the class of the error, as a string.
|
729
|
+
#
|
730
|
+
# source://drb//drb/drb.rb#441
|
731
|
+
def reason; end
|
732
|
+
end
|
733
|
+
|
734
|
+
class DRb::DRbServer
|
735
|
+
# Create a new DRbServer instance.
|
736
|
+
#
|
737
|
+
# +uri+ is the URI to bind to. This is normally of the form
|
738
|
+
# 'druby://<hostname>:<port>' where <hostname> is a hostname of
|
739
|
+
# the local machine. If nil, then the system's default hostname
|
740
|
+
# will be bound to, on a port selected by the system; these value
|
741
|
+
# can be retrieved from the +uri+ attribute. 'druby:' specifies
|
742
|
+
# the default dRuby transport protocol: another protocol, such
|
743
|
+
# as 'drbunix:', can be specified instead.
|
744
|
+
#
|
745
|
+
# +front+ is the front object for the server, that is, the object
|
746
|
+
# to which remote method calls on the server will be passed. If
|
747
|
+
# nil, then the server will not accept remote method calls.
|
748
|
+
#
|
749
|
+
# If +config_or_acl+ is a hash, it is the configuration to
|
750
|
+
# use for this server. The following options are recognised:
|
751
|
+
#
|
752
|
+
# :idconv :: an id-to-object conversion object. This defaults
|
753
|
+
# to an instance of the class DRb::DRbIdConv.
|
754
|
+
# :verbose :: if true, all unsuccessful remote calls on objects
|
755
|
+
# in the server will be logged to $stdout. false
|
756
|
+
# by default.
|
757
|
+
# :tcp_acl :: the access control list for this server. See
|
758
|
+
# the ACL class from the main dRuby distribution.
|
759
|
+
# :load_limit :: the maximum message size in bytes accepted by
|
760
|
+
# the server. Defaults to 25 MB (26214400).
|
761
|
+
# :argc_limit :: the maximum number of arguments to a remote
|
762
|
+
# method accepted by the server. Defaults to
|
763
|
+
# 256.
|
764
|
+
# The default values of these options can be modified on
|
765
|
+
# a class-wide basis by the class methods #default_argc_limit,
|
766
|
+
# #default_load_limit, #default_acl, #default_id_conv,
|
767
|
+
# and #verbose=
|
768
|
+
#
|
769
|
+
# If +config_or_acl+ is not a hash, but is not nil, it is
|
770
|
+
# assumed to be the access control list for this server.
|
771
|
+
# See the :tcp_acl option for more details.
|
772
|
+
#
|
773
|
+
# If no other server is currently set as the primary server,
|
774
|
+
# this will become the primary server.
|
775
|
+
#
|
776
|
+
# The server will immediately start running in its own thread.
|
777
|
+
#
|
778
|
+
# @return [DRbServer] a new instance of DRbServer
|
779
|
+
#
|
780
|
+
# source://drb//drb/drb.rb#1451
|
781
|
+
def initialize(uri = T.unsafe(nil), front = T.unsafe(nil), config_or_acl = T.unsafe(nil)); end
|
782
|
+
|
783
|
+
# Is this server alive?
|
784
|
+
#
|
785
|
+
# @return [Boolean]
|
786
|
+
#
|
787
|
+
# source://drb//drb/drb.rb#1506
|
788
|
+
def alive?; end
|
789
|
+
|
790
|
+
# Check that a method is callable via dRuby.
|
791
|
+
#
|
792
|
+
# +obj+ is the object we want to invoke the method on. +msg_id+ is the
|
793
|
+
# method name, as a Symbol.
|
794
|
+
#
|
795
|
+
# If the method is an insecure method (see #insecure_method?) a
|
796
|
+
# SecurityError is thrown. If the method is private or undefined,
|
797
|
+
# a NameError is thrown.
|
798
|
+
#
|
799
|
+
# @raise [ArgumentError]
|
800
|
+
#
|
801
|
+
# source://drb//drb/drb.rb#1594
|
802
|
+
def check_insecure_method(obj, msg_id); end
|
803
|
+
|
804
|
+
# The configuration of this DRbServer
|
805
|
+
#
|
806
|
+
# source://drb//drb/drb.rb#1493
|
807
|
+
def config; end
|
808
|
+
|
809
|
+
# The front object of the DRbServer.
|
810
|
+
#
|
811
|
+
# This object receives remote method calls made on the server's
|
812
|
+
# URI alone, with an object id.
|
813
|
+
#
|
814
|
+
# source://drb//drb/drb.rb#1490
|
815
|
+
def front; end
|
816
|
+
|
817
|
+
# Is +uri+ the URI for this server?
|
818
|
+
#
|
819
|
+
# @return [Boolean]
|
820
|
+
#
|
821
|
+
# source://drb//drb/drb.rb#1511
|
822
|
+
def here?(uri); end
|
823
|
+
|
824
|
+
# Stop this server.
|
825
|
+
#
|
826
|
+
# source://drb//drb/drb.rb#1516
|
827
|
+
def stop_service; end
|
828
|
+
|
829
|
+
# The main thread of this DRbServer.
|
830
|
+
#
|
831
|
+
# This is the thread that listens for and accepts connections
|
832
|
+
# from clients, not that handles each client's request-response
|
833
|
+
# session.
|
834
|
+
#
|
835
|
+
# source://drb//drb/drb.rb#1484
|
836
|
+
def thread; end
|
837
|
+
|
838
|
+
# Convert a local object to a dRuby reference.
|
839
|
+
#
|
840
|
+
# source://drb//drb/drb.rb#1533
|
841
|
+
def to_id(obj); end
|
842
|
+
|
843
|
+
# Convert a dRuby reference to the local object it refers to.
|
844
|
+
#
|
845
|
+
# source://drb//drb/drb.rb#1526
|
846
|
+
def to_obj(ref); end
|
847
|
+
|
848
|
+
# The URI of this DRbServer.
|
849
|
+
#
|
850
|
+
# source://drb//drb/drb.rb#1477
|
851
|
+
def uri; end
|
852
|
+
|
853
|
+
# Get whether the server is in verbose mode.
|
854
|
+
#
|
855
|
+
# In verbose mode, failed calls are logged to stdout.
|
856
|
+
#
|
857
|
+
# source://drb//drb/drb.rb#1503
|
858
|
+
def verbose; end
|
859
|
+
|
860
|
+
# Set whether to operate in verbose mode.
|
861
|
+
#
|
862
|
+
# In verbose mode, failed calls are logged to stdout.
|
863
|
+
#
|
864
|
+
# source://drb//drb/drb.rb#1498
|
865
|
+
def verbose=(v); end
|
866
|
+
|
867
|
+
private
|
868
|
+
|
869
|
+
# Coerce an object to a string, providing our own representation if
|
870
|
+
# to_s is not defined for the object.
|
871
|
+
#
|
872
|
+
# source://drb//drb/drb.rb#1580
|
873
|
+
def any_to_s(obj); end
|
874
|
+
|
875
|
+
# source://drb//drb/drb.rb#1696
|
876
|
+
def error_print(exception); end
|
877
|
+
|
878
|
+
# Has a method been included in the list of insecure methods?
|
879
|
+
#
|
880
|
+
# @return [Boolean]
|
881
|
+
#
|
882
|
+
# source://drb//drb/drb.rb#1574
|
883
|
+
def insecure_method?(msg_id); end
|
884
|
+
|
885
|
+
# The main loop performed by a DRbServer's internal thread.
|
886
|
+
#
|
887
|
+
# Accepts a connection from a client, and starts up its own
|
888
|
+
# thread to handle it. This thread loops, receiving requests
|
889
|
+
# from the client, invoking them on a local object, and
|
890
|
+
# returning responses, until the client closes the connection
|
891
|
+
# or a local method call fails.
|
892
|
+
#
|
893
|
+
# source://drb//drb/drb.rb#1714
|
894
|
+
def main_loop; end
|
895
|
+
|
896
|
+
# Starts the DRb main loop in a new thread.
|
897
|
+
#
|
898
|
+
# source://drb//drb/drb.rb#1555
|
899
|
+
def run; end
|
900
|
+
|
901
|
+
# source://drb//drb/drb.rb#1540
|
902
|
+
def shutdown; end
|
903
|
+
|
904
|
+
class << self
|
905
|
+
# Set the default access control list to +acl+. The default ACL is +nil+.
|
906
|
+
#
|
907
|
+
# See also DRb::ACL and #new()
|
908
|
+
#
|
909
|
+
# source://drb//drb/drb.rb#1375
|
910
|
+
def default_acl(acl); end
|
911
|
+
|
912
|
+
# Set the default value for the :argc_limit option.
|
913
|
+
#
|
914
|
+
# See #new(). The initial default value is 256.
|
915
|
+
#
|
916
|
+
# source://drb//drb/drb.rb#1361
|
917
|
+
def default_argc_limit(argc); end
|
918
|
+
|
919
|
+
# Set the default value for the :id_conv option.
|
920
|
+
#
|
921
|
+
# See #new(). The initial default value is a DRbIdConv instance.
|
922
|
+
#
|
923
|
+
# source://drb//drb/drb.rb#1382
|
924
|
+
def default_id_conv(idconv); end
|
925
|
+
|
926
|
+
# Set the default value for the :load_limit option.
|
927
|
+
#
|
928
|
+
# See #new(). The initial default value is 25 MB.
|
929
|
+
#
|
930
|
+
# source://drb//drb/drb.rb#1368
|
931
|
+
def default_load_limit(sz); end
|
932
|
+
|
933
|
+
# source://drb//drb/drb.rb#1398
|
934
|
+
def make_config(hash = T.unsafe(nil)); end
|
935
|
+
|
936
|
+
# Get the default value of the :verbose option.
|
937
|
+
#
|
938
|
+
# source://drb//drb/drb.rb#1394
|
939
|
+
def verbose; end
|
940
|
+
|
941
|
+
# Set the default value of the :verbose option.
|
942
|
+
#
|
943
|
+
# See #new(). The initial default value is false.
|
944
|
+
#
|
945
|
+
# source://drb//drb/drb.rb#1389
|
946
|
+
def verbose=(on); end
|
947
|
+
end
|
948
|
+
end
|
949
|
+
|
950
|
+
class DRb::DRbServer::InvokeMethod
|
951
|
+
include ::DRb::DRbServer::InvokeMethod18Mixin
|
952
|
+
|
953
|
+
# @return [InvokeMethod] a new instance of InvokeMethod
|
954
|
+
#
|
955
|
+
# source://drb//drb/drb.rb#1625
|
956
|
+
def initialize(drb_server, client); end
|
957
|
+
|
958
|
+
# source://drb//drb/drb.rb#1630
|
959
|
+
def perform; end
|
960
|
+
|
961
|
+
private
|
962
|
+
|
963
|
+
# source://drb//drb/drb.rb#1667
|
964
|
+
def check_insecure_method; end
|
965
|
+
|
966
|
+
# source://drb//drb/drb.rb#1659
|
967
|
+
def init_with_client; end
|
968
|
+
|
969
|
+
# source://drb//drb/drb.rb#1676
|
970
|
+
def perform_without_block; end
|
971
|
+
|
972
|
+
# source://drb//drb/drb.rb#1671
|
973
|
+
def setup_message; end
|
974
|
+
end
|
975
|
+
|
976
|
+
module DRb::DRbServer::InvokeMethod18Mixin
|
977
|
+
# source://drb//drb/invokemethod.rb#7
|
978
|
+
def block_yield(x); end
|
979
|
+
|
980
|
+
# source://drb//drb/invokemethod.rb#14
|
981
|
+
def perform_with_block; end
|
982
|
+
end
|
983
|
+
|
984
|
+
# The default drb protocol which communicates over a TCP socket.
|
985
|
+
#
|
986
|
+
# The DRb TCP protocol URI looks like:
|
987
|
+
# <code>druby://<host>:<port>?<option></code>. The option is optional.
|
988
|
+
class DRb::DRbTCPSocket
|
989
|
+
# Create a new DRbTCPSocket instance.
|
990
|
+
#
|
991
|
+
# +uri+ is the URI we are connected to.
|
992
|
+
# +soc+ is the tcp socket we are bound to. +config+ is our
|
993
|
+
# configuration.
|
994
|
+
#
|
995
|
+
# @return [DRbTCPSocket] a new instance of DRbTCPSocket
|
996
|
+
#
|
997
|
+
# source://drb//drb/drb.rb#903
|
998
|
+
def initialize(uri, soc, config = T.unsafe(nil)); end
|
999
|
+
|
1000
|
+
# On the server side, for an instance returned by #open_server,
|
1001
|
+
# accept a client connection and return a new instance to handle
|
1002
|
+
# the server's side of this client-server session.
|
1003
|
+
#
|
1004
|
+
# source://drb//drb/drb.rb#971
|
1005
|
+
def accept; end
|
1006
|
+
|
1007
|
+
# Check to see if this connection is alive.
|
1008
|
+
#
|
1009
|
+
# @return [Boolean]
|
1010
|
+
#
|
1011
|
+
# source://drb//drb/drb.rb#1001
|
1012
|
+
def alive?; end
|
1013
|
+
|
1014
|
+
# Close the connection.
|
1015
|
+
#
|
1016
|
+
# If this is an instance returned by #open_server, then this stops
|
1017
|
+
# listening for new connections altogether. If this is an instance
|
1018
|
+
# returned by #open or by #accept, then it closes this particular
|
1019
|
+
# client-server session.
|
1020
|
+
#
|
1021
|
+
# source://drb//drb/drb.rb#953
|
1022
|
+
def close; end
|
1023
|
+
|
1024
|
+
# Get the address of our TCP peer (the other end of the socket
|
1025
|
+
# we are bound to.
|
1026
|
+
#
|
1027
|
+
# source://drb//drb/drb.rb#918
|
1028
|
+
def peeraddr; end
|
1029
|
+
|
1030
|
+
# On the client side, receive a reply from the server.
|
1031
|
+
#
|
1032
|
+
# source://drb//drb/drb.rb#941
|
1033
|
+
def recv_reply; end
|
1034
|
+
|
1035
|
+
# On the server side, receive a request from the client.
|
1036
|
+
#
|
1037
|
+
# source://drb//drb/drb.rb#931
|
1038
|
+
def recv_request; end
|
1039
|
+
|
1040
|
+
# On the server side, send a reply to the client.
|
1041
|
+
#
|
1042
|
+
# source://drb//drb/drb.rb#936
|
1043
|
+
def send_reply(succ, result); end
|
1044
|
+
|
1045
|
+
# On the client side, send a request to the server.
|
1046
|
+
#
|
1047
|
+
# source://drb//drb/drb.rb#926
|
1048
|
+
def send_request(ref, msg_id, arg, b); end
|
1049
|
+
|
1050
|
+
# source://drb//drb/drb.rb#1010
|
1051
|
+
def set_sockopt(soc); end
|
1052
|
+
|
1053
|
+
# Graceful shutdown
|
1054
|
+
#
|
1055
|
+
# source://drb//drb/drb.rb#996
|
1056
|
+
def shutdown; end
|
1057
|
+
|
1058
|
+
# Get the socket.
|
1059
|
+
#
|
1060
|
+
# source://drb//drb/drb.rb#923
|
1061
|
+
def stream; end
|
1062
|
+
|
1063
|
+
# Get the URI that we are connected to.
|
1064
|
+
#
|
1065
|
+
# source://drb//drb/drb.rb#914
|
1066
|
+
def uri; end
|
1067
|
+
|
1068
|
+
private
|
1069
|
+
|
1070
|
+
# source://drb//drb/drb.rb#986
|
1071
|
+
def accept_or_shutdown; end
|
1072
|
+
|
1073
|
+
# source://drb//drb/drb.rb#962
|
1074
|
+
def close_shutdown_pipe; end
|
1075
|
+
|
1076
|
+
class << self
|
1077
|
+
# Returns the hostname of this server
|
1078
|
+
#
|
1079
|
+
# source://drb//drb/drb.rb#845
|
1080
|
+
def getservername; end
|
1081
|
+
|
1082
|
+
# Open a client connection to +uri+ (DRb URI string) using configuration
|
1083
|
+
# +config+.
|
1084
|
+
#
|
1085
|
+
# This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a
|
1086
|
+
# recognized protocol. See DRb::DRbServer.new for information on built-in
|
1087
|
+
# URI protocols.
|
1088
|
+
#
|
1089
|
+
# source://drb//drb/drb.rb#838
|
1090
|
+
def open(uri, config); end
|
1091
|
+
|
1092
|
+
# Open a server listening for connections at +uri+ using
|
1093
|
+
# configuration +config+.
|
1094
|
+
#
|
1095
|
+
# source://drb//drb/drb.rb#876
|
1096
|
+
def open_server(uri, config); end
|
1097
|
+
|
1098
|
+
# For the families available for +host+, returns a TCPServer on +port+.
|
1099
|
+
# If +port+ is 0 the first available port is used. IPv4 servers are
|
1100
|
+
# preferred over IPv6 servers.
|
1101
|
+
#
|
1102
|
+
# source://drb//drb/drb.rb#861
|
1103
|
+
def open_server_inaddr_any(host, port); end
|
1104
|
+
|
1105
|
+
# source://drb//drb/drb.rb#818
|
1106
|
+
def parse_uri(uri); end
|
1107
|
+
|
1108
|
+
# Parse +uri+ into a [uri, option] pair.
|
1109
|
+
#
|
1110
|
+
# source://drb//drb/drb.rb#893
|
1111
|
+
def uri_option(uri, config); end
|
1112
|
+
end
|
1113
|
+
end
|
1114
|
+
|
1115
|
+
class DRb::DRbURIOption
|
1116
|
+
# @return [DRbURIOption] a new instance of DRbURIOption
|
1117
|
+
#
|
1118
|
+
# source://drb//drb/drb.rb#1022
|
1119
|
+
def initialize(option); end
|
1120
|
+
|
1121
|
+
# source://drb//drb/drb.rb#1028
|
1122
|
+
def ==(other); end
|
1123
|
+
|
1124
|
+
# source://drb//drb/drb.rb#1028
|
1125
|
+
def eql?(other); end
|
1126
|
+
|
1127
|
+
# source://drb//drb/drb.rb#1033
|
1128
|
+
def hash; end
|
1129
|
+
|
1130
|
+
# Returns the value of attribute option.
|
1131
|
+
#
|
1132
|
+
# source://drb//drb/drb.rb#1025
|
1133
|
+
def option; end
|
1134
|
+
|
1135
|
+
# source://drb//drb/drb.rb#1026
|
1136
|
+
def to_s; end
|
1137
|
+
end
|
1138
|
+
|
1139
|
+
# Mixin module making an object undumpable or unmarshallable.
|
1140
|
+
#
|
1141
|
+
# If an object which includes this module is returned by method
|
1142
|
+
# called over drb, then the object remains in the server space
|
1143
|
+
# and a reference to the object is returned, rather than the
|
1144
|
+
# object being marshalled and moved into the client space.
|
1145
|
+
module DRb::DRbUndumped
|
1146
|
+
# @raise [TypeError]
|
1147
|
+
#
|
1148
|
+
# source://drb//drb/drb.rb#391
|
1149
|
+
def _dump(dummy); end
|
1150
|
+
end
|
1151
|
+
|
1152
|
+
# Class wrapping a marshalled object whose type is unknown locally.
|
1153
|
+
#
|
1154
|
+
# If an object is returned by a method invoked over drb, but the
|
1155
|
+
# class of the object is unknown in the client namespace, or
|
1156
|
+
# the object is a constant unknown in the client namespace, then
|
1157
|
+
# the still-marshalled object is returned wrapped in a DRbUnknown instance.
|
1158
|
+
#
|
1159
|
+
# If this object is passed as an argument to a method invoked over
|
1160
|
+
# drb, then the wrapped object is passed instead.
|
1161
|
+
#
|
1162
|
+
# The class or constant name of the object can be read from the
|
1163
|
+
# +name+ attribute. The marshalled object is held in the +buf+
|
1164
|
+
# attribute.
|
1165
|
+
class DRb::DRbUnknown
|
1166
|
+
# Create a new DRbUnknown object.
|
1167
|
+
#
|
1168
|
+
# +buf+ is a string containing a marshalled object that could not
|
1169
|
+
# be unmarshalled. +err+ is the error message that was raised
|
1170
|
+
# when the unmarshalling failed. It is used to determine the
|
1171
|
+
# name of the unmarshalled object.
|
1172
|
+
#
|
1173
|
+
# @return [DRbUnknown] a new instance of DRbUnknown
|
1174
|
+
#
|
1175
|
+
# source://drb//drb/drb.rb#465
|
1176
|
+
def initialize(err, buf); end
|
1177
|
+
|
1178
|
+
# source://drb//drb/drb.rb#494
|
1179
|
+
def _dump(lv); end
|
1180
|
+
|
1181
|
+
# Buffer contained the marshalled, unknown object.
|
1182
|
+
#
|
1183
|
+
# source://drb//drb/drb.rb#484
|
1184
|
+
def buf; end
|
1185
|
+
|
1186
|
+
# Create a DRbUnknownError exception containing this object.
|
1187
|
+
#
|
1188
|
+
# source://drb//drb/drb.rb#508
|
1189
|
+
def exception; end
|
1190
|
+
|
1191
|
+
# The name of the unknown thing.
|
1192
|
+
#
|
1193
|
+
# Class name for unknown objects; variable name for unknown
|
1194
|
+
# constants.
|
1195
|
+
#
|
1196
|
+
# source://drb//drb/drb.rb#481
|
1197
|
+
def name; end
|
1198
|
+
|
1199
|
+
# Attempt to load the wrapped marshalled object again.
|
1200
|
+
#
|
1201
|
+
# If the class of the object is now known locally, the object
|
1202
|
+
# will be unmarshalled and returned. Otherwise, a new
|
1203
|
+
# but identical DRbUnknown object will be returned.
|
1204
|
+
#
|
1205
|
+
# source://drb//drb/drb.rb#503
|
1206
|
+
def reload; end
|
1207
|
+
|
1208
|
+
class << self
|
1209
|
+
# source://drb//drb/drb.rb#486
|
1210
|
+
def _load(s); end
|
1211
|
+
end
|
1212
|
+
end
|
1213
|
+
|
1214
|
+
# An exception wrapping a DRb::DRbUnknown object
|
1215
|
+
class DRb::DRbUnknownError < ::DRb::DRbError
|
1216
|
+
# Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+
|
1217
|
+
#
|
1218
|
+
# @return [DRbUnknownError] a new instance of DRbUnknownError
|
1219
|
+
#
|
1220
|
+
# source://drb//drb/drb.rb#413
|
1221
|
+
def initialize(unknown); end
|
1222
|
+
|
1223
|
+
# source://drb//drb/drb.rb#425
|
1224
|
+
def _dump(lv); end
|
1225
|
+
|
1226
|
+
# Get the wrapped DRb::DRbUnknown object.
|
1227
|
+
#
|
1228
|
+
# source://drb//drb/drb.rb#419
|
1229
|
+
def unknown; end
|
1230
|
+
|
1231
|
+
class << self
|
1232
|
+
# source://drb//drb/drb.rb#421
|
1233
|
+
def _load(s); end
|
1234
|
+
end
|
1235
|
+
end
|
1236
|
+
|
1237
|
+
class DRb::ThreadObject
|
1238
|
+
include ::MonitorMixin
|
1239
|
+
|
1240
|
+
# @return [ThreadObject] a new instance of ThreadObject
|
1241
|
+
#
|
1242
|
+
# source://drb//drb/drb.rb#1202
|
1243
|
+
def initialize(&blk); end
|
1244
|
+
|
1245
|
+
# source://drb//drb/drb.rb#1237
|
1246
|
+
def _execute; end
|
1247
|
+
|
1248
|
+
# @return [Boolean]
|
1249
|
+
#
|
1250
|
+
# source://drb//drb/drb.rb#1213
|
1251
|
+
def alive?; end
|
1252
|
+
|
1253
|
+
# source://drb//drb/drb.rb#1217
|
1254
|
+
def kill; end
|
1255
|
+
|
1256
|
+
# source://drb//drb/drb.rb#1222
|
1257
|
+
def method_missing(msg, *arg, &blk); end
|
1258
|
+
end
|
1259
|
+
|
1260
|
+
# source://drb//drb/version.rb#2
|
1261
|
+
DRb::VERSION = T.let(T.unsafe(nil), String)
|
1262
|
+
|
1263
|
+
# source://drb//drb/drb.rb#1943
|
1264
|
+
DRbIdConv = DRb::DRbIdConv
|
1265
|
+
|
1266
|
+
# :stopdoc:
|
1267
|
+
#
|
1268
|
+
# source://drb//drb/drb.rb#1941
|
1269
|
+
DRbObject = DRb::DRbObject
|
1270
|
+
|
1271
|
+
# source://drb//drb/drb.rb#1942
|
1272
|
+
DRbUndumped = DRb::DRbUndumped
|