wal 0.0.2 → 0.0.3

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 (114) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -7
  3. data/lib/wal/noop_watcher.rb +0 -4
  4. data/lib/wal/record_watcher.rb +4 -58
  5. data/lib/wal/replicator.rb +2 -21
  6. data/lib/wal/streaming_watcher.rb +0 -9
  7. data/lib/wal/version.rb +1 -2
  8. data/lib/wal/watcher.rb +0 -25
  9. data/lib/wal.rb +5 -64
  10. data/rbi/wal.rbi +1 -81
  11. metadata +2 -161
  12. data/sorbet/config +0 -7
  13. data/sorbet/rbi/annotations/.gitattributes +0 -1
  14. data/sorbet/rbi/annotations/activemodel.rbi +0 -89
  15. data/sorbet/rbi/annotations/activerecord.rbi +0 -98
  16. data/sorbet/rbi/annotations/activesupport.rbi +0 -463
  17. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  18. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  19. data/sorbet/rbi/gems/.gitattributes +0 -1
  20. data/sorbet/rbi/gems/actioncable@8.0.2.rbi +0 -9
  21. data/sorbet/rbi/gems/actionmailbox@8.0.2.rbi +0 -9
  22. data/sorbet/rbi/gems/actionmailer@8.0.2.rbi +0 -9
  23. data/sorbet/rbi/gems/actionpack@8.0.2.rbi +0 -21122
  24. data/sorbet/rbi/gems/actiontext@8.0.2.rbi +0 -9
  25. data/sorbet/rbi/gems/actionview@8.0.2.rbi +0 -16423
  26. data/sorbet/rbi/gems/activejob@8.0.2.rbi +0 -9
  27. data/sorbet/rbi/gems/activemodel@8.0.2.rbi +0 -6866
  28. data/sorbet/rbi/gems/activerecord@8.0.2.rbi +0 -43227
  29. data/sorbet/rbi/gems/activestorage@8.0.2.rbi +0 -9
  30. data/sorbet/rbi/gems/activesupport@8.0.2.rbi +0 -21110
  31. data/sorbet/rbi/gems/ast@2.4.3.rbi +0 -585
  32. data/sorbet/rbi/gems/base64@0.3.0.rbi +0 -545
  33. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +0 -619
  34. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +0 -78
  35. data/sorbet/rbi/gems/builder@3.3.0.rbi +0 -9
  36. data/sorbet/rbi/gems/commander@5.0.0.rbi +0 -9
  37. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +0 -11657
  38. data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +0 -9
  39. data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -623
  40. data/sorbet/rbi/gems/date@3.4.1.rbi +0 -75
  41. data/sorbet/rbi/gems/diff-lcs@1.6.2.rbi +0 -1134
  42. data/sorbet/rbi/gems/docker-api@2.4.0.rbi +0 -1719
  43. data/sorbet/rbi/gems/docopt@0.6.1.rbi +0 -9
  44. data/sorbet/rbi/gems/drb@2.2.3.rbi +0 -1661
  45. data/sorbet/rbi/gems/erubi@1.13.1.rbi +0 -155
  46. data/sorbet/rbi/gems/excon@1.2.7.rbi +0 -1514
  47. data/sorbet/rbi/gems/globalid@1.2.1.rbi +0 -9
  48. data/sorbet/rbi/gems/highline@3.0.1.rbi +0 -9
  49. data/sorbet/rbi/gems/i18n@1.14.7.rbi +0 -2359
  50. data/sorbet/rbi/gems/io-console@0.8.0.rbi +0 -9
  51. data/sorbet/rbi/gems/logger@1.7.0.rbi +0 -963
  52. data/sorbet/rbi/gems/loofah@2.24.1.rbi +0 -1105
  53. data/sorbet/rbi/gems/mail@2.8.1.rbi +0 -9
  54. data/sorbet/rbi/gems/marcel@1.0.4.rbi +0 -9
  55. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +0 -9
  56. data/sorbet/rbi/gems/minitest@5.25.5.rbi +0 -1704
  57. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -268
  58. data/sorbet/rbi/gems/net-imap@0.5.9.rbi +0 -9
  59. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +0 -9
  60. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +0 -292
  61. data/sorbet/rbi/gems/net-smtp@0.5.1.rbi +0 -9
  62. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  63. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +0 -9
  64. data/sorbet/rbi/gems/nokogiri@1.18.8.rbi +0 -8206
  65. data/sorbet/rbi/gems/ostruct@0.6.2.rbi +0 -354
  66. data/sorbet/rbi/gems/parallel@1.27.0.rbi +0 -291
  67. data/sorbet/rbi/gems/parlour@9.1.1.rbi +0 -3071
  68. data/sorbet/rbi/gems/parser@3.3.8.0.rbi +0 -7338
  69. data/sorbet/rbi/gems/pg-replication-protocol@0.0.7.rbi +0 -633
  70. data/sorbet/rbi/gems/pg@1.5.9.rbi +0 -2806
  71. data/sorbet/rbi/gems/pp@0.6.2.rbi +0 -368
  72. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +0 -477
  73. data/sorbet/rbi/gems/prism@1.4.0.rbi +0 -41732
  74. data/sorbet/rbi/gems/psych@5.2.3.rbi +0 -2435
  75. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -160
  76. data/sorbet/rbi/gems/rack-session@2.1.1.rbi +0 -727
  77. data/sorbet/rbi/gems/rack-test@2.2.0.rbi +0 -734
  78. data/sorbet/rbi/gems/rack@3.1.16.rbi +0 -4940
  79. data/sorbet/rbi/gems/rackup@2.2.1.rbi +0 -230
  80. data/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi +0 -858
  81. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +0 -785
  82. data/sorbet/rbi/gems/rails@8.0.2.rbi +0 -9
  83. data/sorbet/rbi/gems/railties@8.0.2.rbi +0 -3865
  84. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  85. data/sorbet/rbi/gems/rake@13.2.1.rbi +0 -3120
  86. data/sorbet/rbi/gems/rbi@0.3.6.rbi +0 -6893
  87. data/sorbet/rbi/gems/rbs@3.9.4.rbi +0 -6978
  88. data/sorbet/rbi/gems/rdoc@6.12.0.rbi +0 -12760
  89. data/sorbet/rbi/gems/reline@0.6.0.rbi +0 -2451
  90. data/sorbet/rbi/gems/rexml@3.4.1.rbi +0 -5240
  91. data/sorbet/rbi/gems/rspec-core@3.13.4.rbi +0 -11348
  92. data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +0 -8189
  93. data/sorbet/rbi/gems/rspec-mocks@3.13.5.rbi +0 -5350
  94. data/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi +0 -164
  95. data/sorbet/rbi/gems/rspec-support@3.13.4.rbi +0 -1630
  96. data/sorbet/rbi/gems/rspec@3.13.1.rbi +0 -83
  97. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +0 -75
  98. data/sorbet/rbi/gems/spoom@1.6.3.rbi +0 -6985
  99. data/sorbet/rbi/gems/stringio@3.1.5.rbi +0 -9
  100. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +0 -3628
  101. data/sorbet/rbi/gems/testcontainers-core@0.2.0.rbi +0 -1005
  102. data/sorbet/rbi/gems/testcontainers-postgres@0.2.0.rbi +0 -145
  103. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  104. data/sorbet/rbi/gems/timeout@0.4.3.rbi +0 -157
  105. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  106. data/sorbet/rbi/gems/uri@1.0.3.rbi +0 -2349
  107. data/sorbet/rbi/gems/useragent@0.16.11.rbi +0 -9
  108. data/sorbet/rbi/gems/websocket-driver@0.8.0.rbi +0 -9
  109. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +0 -9
  110. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  111. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18379
  112. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +0 -9
  113. data/sorbet/tapioca/config.yml +0 -5
  114. data/sorbet/tapioca/require.rb +0 -12
@@ -1,1661 +0,0 @@
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
-
8
- # == Overview
9
- #
10
- # dRuby is a distributed object system for Ruby. It is written in
11
- # pure Ruby and uses its own protocol. No add-in services are needed
12
- # beyond those provided by the Ruby runtime, such as TCP sockets. It
13
- # does not rely on or interoperate with other distributed object
14
- # systems such as CORBA, RMI, or .NET.
15
- #
16
- # dRuby allows methods to be called in one Ruby process upon a Ruby
17
- # object located in another Ruby process, even on another machine.
18
- # References to objects can be passed between processes. Method
19
- # arguments and return values are dumped and loaded in marshalled
20
- # format. All of this is done transparently to both the caller of the
21
- # remote method and the object that it is called upon.
22
- #
23
- # An object in a remote process is locally represented by a
24
- # DRb::DRbObject instance. This acts as a sort of proxy for the
25
- # remote object. Methods called upon this DRbObject instance are
26
- # forwarded to its remote object. This is arranged dynamically at run
27
- # time. There are no statically declared interfaces for remote
28
- # objects, such as CORBA's IDL.
29
- #
30
- # dRuby calls made into a process are handled by a DRb::DRbServer
31
- # instance within that process. This reconstitutes the method call,
32
- # invokes it upon the specified local object, and returns the value to
33
- # the remote caller. Any object can receive calls over dRuby. There
34
- # is no need to implement a special interface, or mixin special
35
- # functionality. Nor, in the general case, does an object need to
36
- # explicitly register itself with a DRbServer in order to receive
37
- # dRuby calls.
38
- #
39
- # One process wishing to make dRuby calls upon another process must
40
- # somehow obtain an initial reference to an object in the remote
41
- # process by some means other than as the return value of a remote
42
- # method call, as there is initially no remote object reference it can
43
- # invoke a method upon. This is done by attaching to the server by
44
- # URI. Each DRbServer binds itself to a URI such as
45
- # 'druby://example.com:8787'. A DRbServer can have an object attached
46
- # to it that acts as the server's *front* *object*. A DRbObject can
47
- # be explicitly created from the server's URI. This DRbObject's
48
- # remote object will be the server's front object. This front object
49
- # can then return references to other Ruby objects in the DRbServer's
50
- # process.
51
- #
52
- # Method calls made over dRuby behave largely the same as normal Ruby
53
- # method calls made within a process. Method calls with blocks are
54
- # supported, as are raising exceptions. In addition to a method's
55
- # standard errors, a dRuby call may also raise one of the
56
- # dRuby-specific errors, all of which are subclasses of DRb::DRbError.
57
- #
58
- # Any type of object can be passed as an argument to a dRuby call or
59
- # returned as its return value. By default, such objects are dumped
60
- # or marshalled at the local end, then loaded or unmarshalled at the
61
- # remote end. The remote end therefore receives a copy of the local
62
- # object, not a distributed reference to it; methods invoked upon this
63
- # copy are executed entirely in the remote process, not passed on to
64
- # the local original. This has semantics similar to pass-by-value.
65
- #
66
- # However, if an object cannot be marshalled, a dRuby reference to it
67
- # is passed or returned instead. This will turn up at the remote end
68
- # as a DRbObject instance. All methods invoked upon this remote proxy
69
- # are forwarded to the local object, as described in the discussion of
70
- # DRbObjects. This has semantics similar to the normal Ruby
71
- # pass-by-reference.
72
- #
73
- # The easiest way to signal that we want an otherwise marshallable
74
- # object to be passed or returned as a DRbObject reference, rather
75
- # than marshalled and sent as a copy, is to include the
76
- # DRb::DRbUndumped mixin module.
77
- #
78
- # dRuby supports calling remote methods with blocks. As blocks (or
79
- # rather the Proc objects that represent them) are not marshallable,
80
- # the block executes in the local, not the remote, context. Each
81
- # value yielded to the block is passed from the remote object to the
82
- # local block, then the value returned by each block invocation is
83
- # passed back to the remote execution context to be collected, before
84
- # the collected values are finally returned to the local context as
85
- # the return value of the method invocation.
86
- #
87
- # == Examples of usage
88
- #
89
- # For more dRuby samples, see the +samples+ directory in the full
90
- # dRuby distribution.
91
- #
92
- # === dRuby in client/server mode
93
- #
94
- # This illustrates setting up a simple client-server drb
95
- # system. Run the server and client code in different terminals,
96
- # starting the server code first.
97
- #
98
- # ==== Server code
99
- #
100
- # require 'drb/drb'
101
- #
102
- # # The URI for the server to connect to
103
- # URI="druby://localhost:8787"
104
- #
105
- # class TimeServer
106
- #
107
- # def get_current_time
108
- # return Time.now
109
- # end
110
- #
111
- # end
112
- #
113
- # # The object that handles requests on the server
114
- # FRONT_OBJECT=TimeServer.new
115
- #
116
- # DRb.start_service(URI, FRONT_OBJECT)
117
- # # Wait for the drb server thread to finish before exiting.
118
- # DRb.thread.join
119
- #
120
- # ==== Client code
121
- #
122
- # require 'drb/drb'
123
- #
124
- # # The URI to connect to
125
- # SERVER_URI="druby://localhost:8787"
126
- #
127
- # # Start a local DRbServer to handle callbacks.
128
- # #
129
- # # Not necessary for this small example, but will be required
130
- # # as soon as we pass a non-marshallable object as an argument
131
- # # to a dRuby call.
132
- # #
133
- # # Note: this must be called at least once per process to take any effect.
134
- # # This is particularly important if your application forks.
135
- # DRb.start_service
136
- #
137
- # timeserver = DRbObject.new_with_uri(SERVER_URI)
138
- # puts timeserver.get_current_time
139
- #
140
- # === Remote objects under dRuby
141
- #
142
- # This example illustrates returning a reference to an object
143
- # from a dRuby call. The Logger instances live in the server
144
- # process. References to them are returned to the client process,
145
- # where methods can be invoked upon them. These methods are
146
- # executed in the server process.
147
- #
148
- # ==== Server code
149
- #
150
- # require 'drb/drb'
151
- #
152
- # URI="druby://localhost:8787"
153
- #
154
- # class Logger
155
- #
156
- # # Make dRuby send Logger instances as dRuby references,
157
- # # not copies.
158
- # include DRb::DRbUndumped
159
- #
160
- # def initialize(n, fname)
161
- # @name = n
162
- # @filename = fname
163
- # end
164
- #
165
- # def log(message)
166
- # File.open(@filename, "a") do |f|
167
- # f.puts("#{Time.now}: #{@name}: #{message}")
168
- # end
169
- # end
170
- #
171
- # end
172
- #
173
- # # We have a central object for creating and retrieving loggers.
174
- # # This retains a local reference to all loggers created. This
175
- # # is so an existing logger can be looked up by name, but also
176
- # # to prevent loggers from being garbage collected. A dRuby
177
- # # reference to an object is not sufficient to prevent it being
178
- # # garbage collected!
179
- # class LoggerFactory
180
- #
181
- # def initialize(bdir)
182
- # @basedir = bdir
183
- # @loggers = {}
184
- # end
185
- #
186
- # def get_logger(name)
187
- # if !@loggers.has_key? name
188
- # # make the filename safe, then declare it to be so
189
- # fname = name.gsub(/[.\/\\\:]/, "_")
190
- # @loggers[name] = Logger.new(name, @basedir + "/" + fname)
191
- # end
192
- # return @loggers[name]
193
- # end
194
- #
195
- # end
196
- #
197
- # FRONT_OBJECT=LoggerFactory.new("/tmp/dlog")
198
- #
199
- # DRb.start_service(URI, FRONT_OBJECT)
200
- # DRb.thread.join
201
- #
202
- # ==== Client code
203
- #
204
- # require 'drb/drb'
205
- #
206
- # SERVER_URI="druby://localhost:8787"
207
- #
208
- # DRb.start_service
209
- #
210
- # log_service=DRbObject.new_with_uri(SERVER_URI)
211
- #
212
- # ["loga", "logb", "logc"].each do |logname|
213
- #
214
- # logger=log_service.get_logger(logname)
215
- #
216
- # logger.log("Hello, world!")
217
- # logger.log("Goodbye, world!")
218
- # logger.log("=== EOT ===")
219
- #
220
- # end
221
- #
222
- # == Security
223
- #
224
- # As with all network services, security needs to be considered when
225
- # using dRuby. By allowing external access to a Ruby object, you are
226
- # not only allowing outside clients to call the methods you have
227
- # defined for that object, but by default to execute arbitrary Ruby
228
- # code on your server. Consider the following:
229
- #
230
- # # !!! UNSAFE CODE !!!
231
- # ro = DRbObject::new_with_uri("druby://your.server.com:8989")
232
- # class << ro
233
- # undef :instance_eval # force call to be passed to remote object
234
- # end
235
- # ro.instance_eval("`rm -rf *`")
236
- #
237
- # The dangers posed by instance_eval and friends are such that a
238
- # DRbServer should only be used when clients are trusted.
239
- #
240
- # A DRbServer can be configured with an access control list to
241
- # selectively allow or deny access from specified IP addresses. The
242
- # main druby distribution provides the ACL class for this purpose. In
243
- # general, this mechanism should only be used alongside, rather than
244
- # as a replacement for, a good firewall.
245
- #
246
- # == dRuby internals
247
- #
248
- # dRuby is implemented using three main components: a remote method
249
- # call marshaller/unmarshaller; a transport protocol; and an
250
- # ID-to-object mapper. The latter two can be directly, and the first
251
- # indirectly, replaced, in order to provide different behaviour and
252
- # capabilities.
253
- #
254
- # Marshalling and unmarshalling of remote method calls is performed by
255
- # a DRb::DRbMessage instance. This uses the Marshal module to dump
256
- # the method call before sending it over the transport layer, then
257
- # reconstitute it at the other end. There is normally no need to
258
- # replace this component, and no direct way is provided to do so.
259
- # However, it is possible to implement an alternative marshalling
260
- # scheme as part of an implementation of the transport layer.
261
- #
262
- # The transport layer is responsible for opening client and server
263
- # network connections and forwarding dRuby request across them.
264
- # Normally, it uses DRb::DRbMessage internally to manage marshalling
265
- # and unmarshalling. The transport layer is managed by
266
- # DRb::DRbProtocol. Multiple protocols can be installed in
267
- # DRbProtocol at the one time; selection between them is determined by
268
- # the scheme of a dRuby URI. The default transport protocol is
269
- # selected by the scheme 'druby:', and implemented by
270
- # DRb::DRbTCPSocket. This uses plain TCP/IP sockets for
271
- # communication. An alternative protocol, using UNIX domain sockets,
272
- # is implemented by DRb::DRbUNIXSocket in the file drb/unix.rb, and
273
- # selected by the scheme 'drbunix:'. A sample implementation over
274
- # HTTP can be found in the samples accompanying the main dRuby
275
- # distribution.
276
- #
277
- # The ID-to-object mapping component maps dRuby object ids to the
278
- # objects they refer to, and vice versa. The implementation to use
279
- # can be specified as part of a DRb::DRbServer's configuration. The
280
- # default implementation is provided by DRb::DRbIdConv. It uses an
281
- # object's ObjectSpace id as its dRuby id. This means that the dRuby
282
- # reference to that object only remains meaningful for the lifetime of
283
- # the object's process and the lifetime of the object within that
284
- # process. A modified implementation is provided by DRb::TimerIdConv
285
- # in the file drb/timeridconv.rb. This implementation retains a local
286
- # reference to all objects exported over dRuby for a configurable
287
- # period of time (defaulting to ten minutes), to prevent them being
288
- # garbage-collected within this time. Another sample implementation
289
- # is provided in sample/name.rb in the main dRuby distribution. This
290
- # allows objects to specify their own id or "name". A dRuby reference
291
- # can be made persistent across processes by having each process
292
- # register an object using the same dRuby name.
293
- #
294
- # source://drb//lib/drb/eq.rb#2
295
- module DRb
296
- private
297
-
298
- # Get the configuration of the current server.
299
- #
300
- # If there is no current server, this returns the default configuration.
301
- # See #current_server and DRbServer::make_config.
302
- #
303
- # source://drb//lib/drb/drb.rb#1882
304
- def config; end
305
-
306
- # Get the 'current' server.
307
- #
308
- # In the context of execution taking place within the main
309
- # thread of a dRuby server (typically, as a result of a remote
310
- # call on the server or one of its objects), the current
311
- # server is that server. Otherwise, the current server is
312
- # the primary server.
313
- #
314
- # If the above rule fails to find a server, a DRbServerNotFound
315
- # error is raised.
316
- #
317
- # @raise [DRbServerNotFound]
318
- #
319
- # source://drb//lib/drb/drb.rb#1839
320
- def current_server; end
321
-
322
- # Retrieves the server with the given +uri+.
323
- #
324
- # See also regist_server and remove_server.
325
- #
326
- # source://drb//lib/drb/drb.rb#1984
327
- def fetch_server(uri); end
328
-
329
- # Get the front object of the current server.
330
- #
331
- # This raises a DRbServerNotFound error if there is no current server.
332
- # See #current_server.
333
- #
334
- # source://drb//lib/drb/drb.rb#1893
335
- def front; end
336
-
337
- # Is +uri+ the URI for the current local server?
338
- #
339
- # @return [Boolean]
340
- #
341
- # source://drb//lib/drb/drb.rb#1872
342
- def here?(uri); end
343
-
344
- # Set the default ACL to +acl+.
345
- #
346
- # See DRb::DRbServer.default_acl.
347
- #
348
- # source://drb//lib/drb/drb.rb#1938
349
- def install_acl(acl); end
350
-
351
- # Set the default id conversion object.
352
- #
353
- # This is expected to be an instance such as DRb::DRbIdConv that responds to
354
- # #to_id and #to_obj that can convert objects to and from DRb references.
355
- #
356
- # See DRbServer#default_id_conv.
357
- #
358
- # source://drb//lib/drb/drb.rb#1930
359
- def install_id_conv(idconv); end
360
-
361
- # source://drb//lib/drb/drb.rb#1944
362
- def mutex; end
363
-
364
- # The primary local dRuby server.
365
- #
366
- # This is the server created by the #start_service call.
367
- #
368
- # source://drb//lib/drb/drb.rb#1826
369
- def primary_server; end
370
-
371
- # The primary local dRuby server.
372
- #
373
- # This is the server created by the #start_service call.
374
- #
375
- # source://drb//lib/drb/drb.rb#1826
376
- def primary_server=(_arg0); end
377
-
378
- # Registers +server+ with DRb.
379
- #
380
- # This is called when a new DRb::DRbServer is created.
381
- #
382
- # If there is no primary server then +server+ becomes the primary server.
383
- #
384
- # Example:
385
- #
386
- # require 'drb'
387
- #
388
- # s = DRb::DRbServer.new # automatically calls regist_server
389
- # DRb.fetch_server s.uri #=> #<DRb::DRbServer:0x...>
390
- #
391
- # source://drb//lib/drb/drb.rb#1962
392
- def regist_server(server); end
393
-
394
- # Removes +server+ from the list of registered servers.
395
- #
396
- # source://drb//lib/drb/drb.rb#1971
397
- def remove_server(server); end
398
-
399
- # Start a dRuby server locally.
400
- #
401
- # The new dRuby server will become the primary server, even
402
- # if another server is currently the primary server.
403
- #
404
- # +uri+ is the URI for the server to bind to. If nil,
405
- # the server will bind to random port on the default local host
406
- # name and use the default dRuby protocol.
407
- #
408
- # +front+ is the server's front object. This may be nil.
409
- #
410
- # +config+ is the configuration for the new server. This may
411
- # be nil.
412
- #
413
- # See DRbServer::new.
414
- #
415
- # source://drb//lib/drb/drb.rb#1818
416
- def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end
417
-
418
- # Stop the local dRuby server.
419
- #
420
- # This operates on the primary server. If there is no primary
421
- # server currently running, it is a noop.
422
- #
423
- # source://drb//lib/drb/drb.rb#1851
424
- def stop_service; end
425
-
426
- # Get the thread of the primary server.
427
- #
428
- # This returns nil if there is no primary server. See #primary_server.
429
- #
430
- # source://drb//lib/drb/drb.rb#1919
431
- def thread; end
432
-
433
- # Get a reference id for an object using the current server.
434
- #
435
- # This raises a DRbServerNotFound error if there is no current server.
436
- # See #current_server.
437
- #
438
- # source://drb//lib/drb/drb.rb#1910
439
- def to_id(obj); end
440
-
441
- # Convert a reference into an object using the current server.
442
- #
443
- # This raises a DRbServerNotFound error if there is no current server.
444
- # See #current_server.
445
- #
446
- # source://drb//lib/drb/drb.rb#1902
447
- def to_obj(ref); end
448
-
449
- # Get the URI defining the local dRuby space.
450
- #
451
- # This is the URI of the current server. See #current_server.
452
- #
453
- # source://drb//lib/drb/drb.rb#1860
454
- def uri; end
455
-
456
- class << self
457
- # Get the configuration of the current server.
458
- #
459
- # If there is no current server, this returns the default configuration.
460
- # See #current_server and DRbServer::make_config.
461
- #
462
- # source://drb//lib/drb/drb.rb#1882
463
- def config; end
464
-
465
- # Get the 'current' server.
466
- #
467
- # In the context of execution taking place within the main
468
- # thread of a dRuby server (typically, as a result of a remote
469
- # call on the server or one of its objects), the current
470
- # server is that server. Otherwise, the current server is
471
- # the primary server.
472
- #
473
- # If the above rule fails to find a server, a DRbServerNotFound
474
- # error is raised.
475
- #
476
- # @raise [DRbServerNotFound]
477
- #
478
- # source://drb//lib/drb/drb.rb#1839
479
- def current_server; end
480
-
481
- # Retrieves the server with the given +uri+.
482
- #
483
- # See also regist_server and remove_server.
484
- #
485
- # source://drb//lib/drb/drb.rb#1984
486
- def fetch_server(uri); end
487
-
488
- # Get the front object of the current server.
489
- #
490
- # This raises a DRbServerNotFound error if there is no current server.
491
- # See #current_server.
492
- #
493
- # source://drb//lib/drb/drb.rb#1893
494
- def front; end
495
-
496
- # Is +uri+ the URI for the current local server?
497
- #
498
- # @return [Boolean]
499
- #
500
- # source://drb//lib/drb/drb.rb#1872
501
- def here?(uri); end
502
-
503
- # Set the default ACL to +acl+.
504
- #
505
- # See DRb::DRbServer.default_acl.
506
- #
507
- # source://drb//lib/drb/drb.rb#1938
508
- def install_acl(acl); end
509
-
510
- # Set the default id conversion object.
511
- #
512
- # This is expected to be an instance such as DRb::DRbIdConv that responds to
513
- # #to_id and #to_obj that can convert objects to and from DRb references.
514
- #
515
- # See DRbServer#default_id_conv.
516
- #
517
- # source://drb//lib/drb/drb.rb#1930
518
- def install_id_conv(idconv); end
519
-
520
- # source://drb//lib/drb/drb.rb#1944
521
- def mutex; end
522
-
523
- # The primary local dRuby server.
524
- #
525
- # This is the server created by the #start_service call.
526
- #
527
- # source://drb//lib/drb/drb.rb#1826
528
- def primary_server; end
529
-
530
- # The primary local dRuby server.
531
- #
532
- # This is the server created by the #start_service call.
533
- #
534
- # source://drb//lib/drb/drb.rb#1826
535
- def primary_server=(_arg0); end
536
-
537
- # Registers +server+ with DRb.
538
- #
539
- # This is called when a new DRb::DRbServer is created.
540
- #
541
- # If there is no primary server then +server+ becomes the primary server.
542
- #
543
- # Example:
544
- #
545
- # require 'drb'
546
- #
547
- # s = DRb::DRbServer.new # automatically calls regist_server
548
- # DRb.fetch_server s.uri #=> #<DRb::DRbServer:0x...>
549
- #
550
- # source://drb//lib/drb/drb.rb#1962
551
- def regist_server(server); end
552
-
553
- # Removes +server+ from the list of registered servers.
554
- #
555
- # source://drb//lib/drb/drb.rb#1971
556
- def remove_server(server); end
557
-
558
- # Start a dRuby server locally.
559
- #
560
- # The new dRuby server will become the primary server, even
561
- # if another server is currently the primary server.
562
- #
563
- # +uri+ is the URI for the server to bind to. If nil,
564
- # the server will bind to random port on the default local host
565
- # name and use the default dRuby protocol.
566
- #
567
- # +front+ is the server's front object. This may be nil.
568
- #
569
- # +config+ is the configuration for the new server. This may
570
- # be nil.
571
- #
572
- # See DRbServer::new.
573
- #
574
- # source://drb//lib/drb/drb.rb#1818
575
- def start_service(uri = T.unsafe(nil), front = T.unsafe(nil), config = T.unsafe(nil)); end
576
-
577
- # Stop the local dRuby server.
578
- #
579
- # This operates on the primary server. If there is no primary
580
- # server currently running, it is a noop.
581
- #
582
- # source://drb//lib/drb/drb.rb#1851
583
- def stop_service; end
584
-
585
- # Get the thread of the primary server.
586
- #
587
- # This returns nil if there is no primary server. See #primary_server.
588
- #
589
- # source://drb//lib/drb/drb.rb#1919
590
- def thread; end
591
-
592
- # Get a reference id for an object using the current server.
593
- #
594
- # This raises a DRbServerNotFound error if there is no current server.
595
- # See #current_server.
596
- #
597
- # source://drb//lib/drb/drb.rb#1910
598
- def to_id(obj); end
599
-
600
- # Convert a reference into an object using the current server.
601
- #
602
- # This raises a DRbServerNotFound error if there is no current server.
603
- # See #current_server.
604
- #
605
- # source://drb//lib/drb/drb.rb#1902
606
- def to_obj(ref); end
607
-
608
- # Get the URI defining the local dRuby space.
609
- #
610
- # This is the URI of the current server. See #current_server.
611
- #
612
- # source://drb//lib/drb/drb.rb#1860
613
- def uri; end
614
- end
615
- end
616
-
617
- #
618
- # This is an internal singleton instance. This must not be used
619
- # by users.
620
- #
621
- # source://drb//lib/drb/drb.rb#382
622
- DRb::DRB_OBJECT_SPACE = T.let(T.unsafe(nil), DRb::DRbObjectSpace)
623
-
624
- # An Array wrapper that can be sent to another server via DRb.
625
- #
626
- # All entries in the array will be dumped or be references that point to
627
- # the local server.
628
- #
629
- # source://drb//lib/drb/drb.rb#546
630
- class DRb::DRbArray
631
- # Creates a new DRbArray that either dumps or wraps all the items in the
632
- # Array +ary+ so they can be loaded by a remote DRb server.
633
- #
634
- # @return [DRbArray] a new instance of DRbArray
635
- #
636
- # source://drb//lib/drb/drb.rb#551
637
- def initialize(ary); end
638
-
639
- # source://drb//lib/drb/drb.rb#570
640
- def _dump(lv); end
641
-
642
- class << self
643
- # source://drb//lib/drb/drb.rb#566
644
- def _load(s); end
645
- end
646
- end
647
-
648
- # Class handling the connection between a DRbObject and the
649
- # server the real object lives on.
650
- #
651
- # This class maintains a pool of connections, to reduce the
652
- # overhead of starting and closing down connections for each
653
- # method call.
654
- #
655
- # This class is used internally by DRbObject. The user does
656
- # not normally need to deal with it directly.
657
- #
658
- # source://drb//lib/drb/drb.rb#1284
659
- class DRb::DRbConn
660
- # @return [DRbConn] a new instance of DRbConn
661
- #
662
- # source://drb//lib/drb/drb.rb#1345
663
- def initialize(remote_uri); end
664
-
665
- # @return [Boolean]
666
- #
667
- # source://drb//lib/drb/drb.rb#1361
668
- def alive?; end
669
-
670
- # source://drb//lib/drb/drb.rb#1356
671
- def close; end
672
-
673
- # source://drb//lib/drb/drb.rb#1351
674
- def send_message(ref, msg_id, arg, block); end
675
-
676
- # source://drb//lib/drb/drb.rb#1349
677
- def uri; end
678
-
679
- class << self
680
- # source://drb//lib/drb/drb.rb#1287
681
- def make_pool; end
682
-
683
- # source://drb//lib/drb/drb.rb#1325
684
- def open(remote_uri); end
685
-
686
- # source://drb//lib/drb/drb.rb#1320
687
- def stop_pool; end
688
- end
689
- end
690
-
691
- # Class responsible for converting between an object and its id.
692
- #
693
- # This, the default implementation, uses an object's local ObjectSpace
694
- # __id__ as its id. This means that an object's identification over
695
- # drb remains valid only while that object instance remains alive
696
- # within the server runtime.
697
- #
698
- # For alternative mechanisms, see DRb::TimerIdConv in drb/timeridconv.rb
699
- # and DRbNameIdConv in sample/name.rb in the full drb distribution.
700
- #
701
- # source://drb//lib/drb/drb.rb#393
702
- class DRb::DRbIdConv
703
- # Convert an object into a reference id.
704
- #
705
- # This implementation returns the object's __id__ in the local
706
- # object space.
707
- #
708
- # source://drb//lib/drb/drb.rb#407
709
- def to_id(obj); end
710
-
711
- # Convert an object reference id to an object.
712
- #
713
- # This implementation looks up the reference id in the local object
714
- # space and returns the object it refers to.
715
- #
716
- # source://drb//lib/drb/drb.rb#399
717
- def to_obj(ref); end
718
- end
719
-
720
- # Handler for sending and receiving drb messages.
721
- #
722
- # This takes care of the low-level marshalling and unmarshalling
723
- # of drb requests and responses sent over the wire between server
724
- # and client. This relieves the implementor of a new drb
725
- # protocol layer with having to deal with these details.
726
- #
727
- # The user does not have to directly deal with this object in
728
- # normal use.
729
- #
730
- # source://drb//lib/drb/drb.rb#584
731
- class DRb::DRbMessage
732
- # @return [DRbMessage] a new instance of DRbMessage
733
- #
734
- # source://drb//lib/drb/drb.rb#585
735
- def initialize(config); end
736
-
737
- # source://drb//lib/drb/drb.rb#590
738
- def dump(obj, error = T.unsafe(nil)); end
739
-
740
- # @raise [DRbConnError]
741
- #
742
- # source://drb//lib/drb/drb.rb#607
743
- def load(soc); end
744
-
745
- # source://drb//lib/drb/drb.rb#667
746
- def recv_reply(stream); end
747
-
748
- # @raise [DRbConnError]
749
- #
750
- # source://drb//lib/drb/drb.rb#647
751
- def recv_request(stream); end
752
-
753
- # source://drb//lib/drb/drb.rb#661
754
- def send_reply(stream, succ, result); end
755
-
756
- # source://drb//lib/drb/drb.rb#633
757
- def send_request(stream, ref, msg_id, arg, b); end
758
-
759
- private
760
-
761
- # source://drb//lib/drb/drb.rb#674
762
- def make_proxy(obj, error = T.unsafe(nil)); end
763
- end
764
-
765
- # source://drb//lib/drb/eq.rb#3
766
- class DRb::DRbObject
767
- # Create a new remote object stub.
768
- #
769
- # +obj+ is the (local) object we want to create a stub for. Normally
770
- # this is +nil+. +uri+ is the URI of the remote object that this
771
- # will be a stub for.
772
- #
773
- # @return [DRbObject] a new instance of DRbObject
774
- #
775
- # source://drb//lib/drb/drb.rb#1117
776
- def initialize(obj, uri = T.unsafe(nil)); end
777
-
778
- # source://drb//lib/drb/eq.rb#4
779
- def ==(other); end
780
-
781
- # Get the reference of the object, if local.
782
- #
783
- # source://drb//lib/drb/drb.rb#1143
784
- def __drbref; end
785
-
786
- # Get the URI of the remote object.
787
- #
788
- # source://drb//lib/drb/drb.rb#1138
789
- def __drburi; end
790
-
791
- # Marshall this object.
792
- #
793
- # The URI and ref of the object are marshalled.
794
- #
795
- # source://drb//lib/drb/drb.rb#1108
796
- def _dump(lv); end
797
-
798
- # source://drb//lib/drb/eq.rb#4
799
- def eql?(other); end
800
-
801
- # source://drb//lib/drb/eq.rb#9
802
- def hash; end
803
-
804
- # source://drb//lib/drb/drb.rb#1163
805
- def method_missing(msg_id, *a, **_arg2, &b); end
806
-
807
- # source://drb//lib/drb/drb.rb#1215
808
- def pretty_print(q); end
809
-
810
- # source://drb//lib/drb/drb.rb#1219
811
- def pretty_print_cycle(q); end
812
-
813
- # Routes respond_to? to the referenced remote object.
814
- #
815
- # @return [Boolean]
816
- #
817
- # source://drb//lib/drb/drb.rb#1151
818
- def respond_to?(msg_id, priv = T.unsafe(nil)); end
819
-
820
- class << self
821
- # Unmarshall a marshalled DRbObject.
822
- #
823
- # If the referenced object is located within the local server, then
824
- # the object itself is returned. Otherwise, a new DRbObject is
825
- # created to act as a stub for the remote referenced object.
826
- #
827
- # source://drb//lib/drb/drb.rb#1079
828
- def _load(s); end
829
-
830
- # Creates a DRb::DRbObject given the reference information to the remote
831
- # host +uri+ and object +ref+.
832
- #
833
- # source://drb//lib/drb/drb.rb#1093
834
- def new_with(uri, ref); end
835
-
836
- # Create a new DRbObject from a URI alone.
837
- #
838
- # source://drb//lib/drb/drb.rb#1101
839
- def new_with_uri(uri); end
840
-
841
- # Returns a modified backtrace from +result+ with the +uri+ where each call
842
- # in the backtrace came from.
843
- #
844
- # source://drb//lib/drb/drb.rb#1201
845
- def prepare_backtrace(uri, result); end
846
-
847
- # Given the +uri+ of another host executes the block provided.
848
- #
849
- # source://drb//lib/drb/drb.rb#1188
850
- def with_friend(uri); end
851
- end
852
- end
853
-
854
- # source://drb//lib/drb/drb.rb#351
855
- class DRb::DRbObjectSpace
856
- include ::MonitorMixin
857
-
858
- # @return [DRbObjectSpace] a new instance of DRbObjectSpace
859
- #
860
- # source://drb//lib/drb/drb.rb#357
861
- def initialize; end
862
-
863
- # source://drb//lib/drb/drb.rb#362
864
- def to_id(obj); end
865
-
866
- # source://drb//lib/drb/drb.rb#369
867
- def to_obj(ref); end
868
- end
869
-
870
- # Module managing the underlying network protocol(s) used by drb.
871
- #
872
- # By default, drb uses the DRbTCPSocket protocol. Other protocols
873
- # can be defined. A protocol must define the following class methods:
874
- #
875
- # [open(uri, config)] Open a client connection to the server at +uri+,
876
- # using configuration +config+. Return a protocol
877
- # instance for this connection.
878
- # [open_server(uri, config)] Open a server listening at +uri+,
879
- # using configuration +config+. Return a
880
- # protocol instance for this listener.
881
- # [uri_option(uri, config)] Take a URI, possibly containing an option
882
- # component (e.g. a trailing '?param=val'),
883
- # and return a [uri, option] tuple.
884
- #
885
- # All of these methods should raise a DRbBadScheme error if the URI
886
- # does not identify the protocol they support (e.g. "druby:" for
887
- # the standard Ruby protocol). This is how the DRbProtocol module,
888
- # given a URI, determines which protocol implementation serves that
889
- # protocol.
890
- #
891
- # The protocol instance returned by #open_server must have the
892
- # following methods:
893
- #
894
- # [accept] Accept a new connection to the server. Returns a protocol
895
- # instance capable of communicating with the client.
896
- # [close] Close the server connection.
897
- # [uri] Get the URI for this server.
898
- #
899
- # The protocol instance returned by #open must have the following methods:
900
- #
901
- # [send_request (ref, msg_id, arg, b)]
902
- # Send a request to +ref+ with the given message id and arguments.
903
- # This is most easily implemented by calling DRbMessage.send_request,
904
- # providing a stream that sits on top of the current protocol.
905
- # [recv_reply]
906
- # Receive a reply from the server and return it as a [success-boolean,
907
- # reply-value] pair. This is most easily implemented by calling
908
- # DRb.recv_reply, providing a stream that sits on top of the
909
- # current protocol.
910
- # [alive?]
911
- # Is this connection still alive?
912
- # [close]
913
- # Close this connection.
914
- #
915
- # The protocol instance returned by #open_server().accept() must have
916
- # the following methods:
917
- #
918
- # [recv_request]
919
- # Receive a request from the client and return a [object, message,
920
- # args, block] tuple. This is most easily implemented by calling
921
- # DRbMessage.recv_request, providing a stream that sits on top of
922
- # the current protocol.
923
- # [send_reply(succ, result)]
924
- # Send a reply to the client. This is most easily implemented
925
- # by calling DRbMessage.send_reply, providing a stream that sits
926
- # on top of the current protocol.
927
- # [close]
928
- # Close this connection.
929
- #
930
- # A new protocol is registered with the DRbProtocol module using
931
- # the add_protocol method.
932
- #
933
- # For examples of other protocols, see DRbUNIXSocket in drb/unix.rb,
934
- # and HTTP0 in sample/http0.rb and sample/http0serv.rb in the full
935
- # drb distribution.
936
- #
937
- # source://drb//lib/drb/drb.rb#749
938
- module DRb::DRbProtocol
939
- private
940
-
941
- # Add a new protocol to the DRbProtocol module.
942
- #
943
- # source://drb//lib/drb/drb.rb#752
944
- def add_protocol(prot); end
945
-
946
- # source://drb//lib/drb/drb.rb#830
947
- def auto_load(uri); end
948
-
949
- # Open a client connection to +uri+ with the configuration +config+.
950
- #
951
- # The DRbProtocol module asks each registered protocol in turn to
952
- # try to open the URI. Each protocol signals that it does not handle that
953
- # URI by raising a DRbBadScheme error. If no protocol recognises the
954
- # URI, then a DRbBadURI error is raised. If a protocol accepts the
955
- # URI, but an error occurs in opening it, a DRbConnError is raised.
956
- #
957
- # @raise [DRbBadURI]
958
- #
959
- # source://drb//lib/drb/drb.rb#764
960
- def open(uri, config, first = T.unsafe(nil)); end
961
-
962
- # Open a server listening for connections at +uri+ with
963
- # configuration +config+.
964
- #
965
- # The DRbProtocol module asks each registered protocol in turn to
966
- # try to open a server at the URI. Each protocol signals that it does
967
- # not handle that URI by raising a DRbBadScheme error. If no protocol
968
- # recognises the URI, then a DRbBadURI error is raised. If a protocol
969
- # accepts the URI, but an error occurs in opening it, the underlying
970
- # error is passed on to the caller.
971
- #
972
- # @raise [DRbBadURI]
973
- #
974
- # source://drb//lib/drb/drb.rb#792
975
- def open_server(uri, config, first = T.unsafe(nil)); end
976
-
977
- # Parse +uri+ into a [uri, option] pair.
978
- #
979
- # The DRbProtocol module asks each registered protocol in turn to
980
- # try to parse the URI. Each protocol signals that it does not handle that
981
- # URI by raising a DRbBadScheme error. If no protocol recognises the
982
- # URI, then a DRbBadURI error is raised.
983
- #
984
- # @raise [DRbBadURI]
985
- #
986
- # source://drb//lib/drb/drb.rb#813
987
- def uri_option(uri, config, first = T.unsafe(nil)); end
988
-
989
- class << self
990
- # Add a new protocol to the DRbProtocol module.
991
- #
992
- # source://drb//lib/drb/drb.rb#752
993
- def add_protocol(prot); end
994
-
995
- # source://drb//lib/drb/drb.rb#830
996
- def auto_load(uri); end
997
-
998
- # Open a client connection to +uri+ with the configuration +config+.
999
- #
1000
- # The DRbProtocol module asks each registered protocol in turn to
1001
- # try to open the URI. Each protocol signals that it does not handle that
1002
- # URI by raising a DRbBadScheme error. If no protocol recognises the
1003
- # URI, then a DRbBadURI error is raised. If a protocol accepts the
1004
- # URI, but an error occurs in opening it, a DRbConnError is raised.
1005
- #
1006
- # @raise [DRbBadURI]
1007
- #
1008
- # source://drb//lib/drb/drb.rb#764
1009
- def open(uri, config, first = T.unsafe(nil)); end
1010
-
1011
- # Open a server listening for connections at +uri+ with
1012
- # configuration +config+.
1013
- #
1014
- # The DRbProtocol module asks each registered protocol in turn to
1015
- # try to open a server at the URI. Each protocol signals that it does
1016
- # not handle that URI by raising a DRbBadScheme error. If no protocol
1017
- # recognises the URI, then a DRbBadURI error is raised. If a protocol
1018
- # accepts the URI, but an error occurs in opening it, the underlying
1019
- # error is passed on to the caller.
1020
- #
1021
- # @raise [DRbBadURI]
1022
- #
1023
- # source://drb//lib/drb/drb.rb#792
1024
- def open_server(uri, config, first = T.unsafe(nil)); end
1025
-
1026
- # Parse +uri+ into a [uri, option] pair.
1027
- #
1028
- # The DRbProtocol module asks each registered protocol in turn to
1029
- # try to parse the URI. Each protocol signals that it does not handle that
1030
- # URI by raising a DRbBadScheme error. If no protocol recognises the
1031
- # URI, then a DRbBadURI error is raised.
1032
- #
1033
- # @raise [DRbBadURI]
1034
- #
1035
- # source://drb//lib/drb/drb.rb#813
1036
- def uri_option(uri, config, first = T.unsafe(nil)); end
1037
- end
1038
- end
1039
-
1040
- # An exception wrapping an error object
1041
- #
1042
- # source://drb//lib/drb/drb.rb#459
1043
- class DRb::DRbRemoteError < ::DRb::DRbError
1044
- # Creates a new remote error that wraps the Exception +error+
1045
- #
1046
- # @return [DRbRemoteError] a new instance of DRbRemoteError
1047
- #
1048
- # source://drb//lib/drb/drb.rb#462
1049
- def initialize(error); end
1050
-
1051
- # the class of the error, as a string.
1052
- #
1053
- # source://drb//lib/drb/drb.rb#469
1054
- def reason; end
1055
- end
1056
-
1057
- # Class representing a drb server instance.
1058
- #
1059
- # A DRbServer must be running in the local process before any incoming
1060
- # dRuby calls can be accepted, or any local objects can be passed as
1061
- # dRuby references to remote processes, even if those local objects are
1062
- # never actually called remotely. You do not need to start a DRbServer
1063
- # in the local process if you are only making outgoing dRuby calls
1064
- # passing marshalled parameters.
1065
- #
1066
- # Unless multiple servers are being used, the local DRbServer is normally
1067
- # started by calling DRb.start_service.
1068
- #
1069
- # source://drb//lib/drb/drb.rb#1378
1070
- class DRb::DRbServer
1071
- # Create a new DRbServer instance.
1072
- #
1073
- # +uri+ is the URI to bind to. This is normally of the form
1074
- # 'druby://<hostname>:<port>' where <hostname> is a hostname of
1075
- # the local machine. If nil, then the system's default hostname
1076
- # will be bound to, on a port selected by the system; these value
1077
- # can be retrieved from the +uri+ attribute. 'druby:' specifies
1078
- # the default dRuby transport protocol: another protocol, such
1079
- # as 'drbunix:', can be specified instead.
1080
- #
1081
- # +front+ is the front object for the server, that is, the object
1082
- # to which remote method calls on the server will be passed. If
1083
- # nil, then the server will not accept remote method calls.
1084
- #
1085
- # If +config_or_acl+ is a hash, it is the configuration to
1086
- # use for this server. The following options are recognised:
1087
- #
1088
- # :idconv :: an id-to-object conversion object. This defaults
1089
- # to an instance of the class DRb::DRbIdConv.
1090
- # :verbose :: if true, all unsuccessful remote calls on objects
1091
- # in the server will be logged to $stdout. false
1092
- # by default.
1093
- # :tcp_acl :: the access control list for this server. See
1094
- # the ACL class from the main dRuby distribution.
1095
- # :load_limit :: the maximum message size in bytes accepted by
1096
- # the server. Defaults to 25 MB (26214400).
1097
- # :argc_limit :: the maximum number of arguments to a remote
1098
- # method accepted by the server. Defaults to
1099
- # 256.
1100
- # The default values of these options can be modified on
1101
- # a class-wide basis by the class methods #default_argc_limit,
1102
- # #default_load_limit, #default_acl, #default_id_conv,
1103
- # and #verbose=
1104
- #
1105
- # If +config_or_acl+ is not a hash, but is not nil, it is
1106
- # assumed to be the access control list for this server.
1107
- # See the :tcp_acl option for more details.
1108
- #
1109
- # If no other server is currently set as the primary server,
1110
- # this will become the primary server.
1111
- #
1112
- # The server will immediately start running in its own thread.
1113
- #
1114
- # @return [DRbServer] a new instance of DRbServer
1115
- #
1116
- # source://drb//lib/drb/drb.rb#1479
1117
- def initialize(uri = T.unsafe(nil), front = T.unsafe(nil), config_or_acl = T.unsafe(nil)); end
1118
-
1119
- # Is this server alive?
1120
- #
1121
- # @return [Boolean]
1122
- #
1123
- # source://drb//lib/drb/drb.rb#1534
1124
- def alive?; end
1125
-
1126
- # Check that a method is callable via dRuby.
1127
- #
1128
- # +obj+ is the object we want to invoke the method on. +msg_id+ is the
1129
- # method name, as a Symbol.
1130
- #
1131
- # If the method is an insecure method (see #insecure_method?) a
1132
- # SecurityError is thrown. If the method is private or undefined,
1133
- # a NameError is thrown.
1134
- #
1135
- # @raise [ArgumentError]
1136
- #
1137
- # source://drb//lib/drb/drb.rb#1622
1138
- def check_insecure_method(obj, msg_id); end
1139
-
1140
- # The configuration of this DRbServer
1141
- #
1142
- # source://drb//lib/drb/drb.rb#1521
1143
- def config; end
1144
-
1145
- # The front object of the DRbServer.
1146
- #
1147
- # This object receives remote method calls made on the server's
1148
- # URI alone, with an object id.
1149
- #
1150
- # source://drb//lib/drb/drb.rb#1518
1151
- def front; end
1152
-
1153
- # Is +uri+ the URI for this server?
1154
- #
1155
- # @return [Boolean]
1156
- #
1157
- # source://drb//lib/drb/drb.rb#1539
1158
- def here?(uri); end
1159
-
1160
- # Stop this server.
1161
- #
1162
- # source://drb//lib/drb/drb.rb#1544
1163
- def stop_service; end
1164
-
1165
- # The main thread of this DRbServer.
1166
- #
1167
- # This is the thread that listens for and accepts connections
1168
- # from clients, not that handles each client's request-response
1169
- # session.
1170
- #
1171
- # source://drb//lib/drb/drb.rb#1512
1172
- def thread; end
1173
-
1174
- # Convert a local object to a dRuby reference.
1175
- #
1176
- # source://drb//lib/drb/drb.rb#1561
1177
- def to_id(obj); end
1178
-
1179
- # Convert a dRuby reference to the local object it refers to.
1180
- #
1181
- # source://drb//lib/drb/drb.rb#1554
1182
- def to_obj(ref); end
1183
-
1184
- # The URI of this DRbServer.
1185
- #
1186
- # source://drb//lib/drb/drb.rb#1505
1187
- def uri; end
1188
-
1189
- # Get whether the server is in verbose mode.
1190
- #
1191
- # In verbose mode, failed calls are logged to stdout.
1192
- #
1193
- # source://drb//lib/drb/drb.rb#1531
1194
- def verbose; end
1195
-
1196
- # Set whether to operate in verbose mode.
1197
- #
1198
- # In verbose mode, failed calls are logged to stdout.
1199
- #
1200
- # source://drb//lib/drb/drb.rb#1526
1201
- def verbose=(v); end
1202
-
1203
- private
1204
-
1205
- # Coerce an object to a string, providing our own representation if
1206
- # to_s is not defined for the object.
1207
- #
1208
- # source://drb//lib/drb/drb.rb#1608
1209
- def any_to_s(obj); end
1210
-
1211
- # source://drb//lib/drb/drb.rb#1746
1212
- def error_print(exception); end
1213
-
1214
- # Has a method been included in the list of insecure methods?
1215
- #
1216
- # @return [Boolean]
1217
- #
1218
- # source://drb//lib/drb/drb.rb#1602
1219
- def insecure_method?(msg_id); end
1220
-
1221
- # The main loop performed by a DRbServer's internal thread.
1222
- #
1223
- # Accepts a connection from a client, and starts up its own
1224
- # thread to handle it. This thread loops, receiving requests
1225
- # from the client, invoking them on a local object, and
1226
- # returning responses, until the client closes the connection
1227
- # or a local method call fails.
1228
- #
1229
- # source://drb//lib/drb/drb.rb#1764
1230
- def main_loop; end
1231
-
1232
- # Starts the DRb main loop in a new thread.
1233
- #
1234
- # source://drb//lib/drb/drb.rb#1583
1235
- def run; end
1236
-
1237
- # source://drb//lib/drb/drb.rb#1568
1238
- def shutdown; end
1239
-
1240
- class << self
1241
- # Set the default access control list to +acl+. The default ACL is +nil+.
1242
- #
1243
- # See also DRb::ACL and #new()
1244
- #
1245
- # source://drb//lib/drb/drb.rb#1403
1246
- def default_acl(acl); end
1247
-
1248
- # Set the default value for the :argc_limit option.
1249
- #
1250
- # See #new(). The initial default value is 256.
1251
- #
1252
- # source://drb//lib/drb/drb.rb#1389
1253
- def default_argc_limit(argc); end
1254
-
1255
- # Set the default value for the :id_conv option.
1256
- #
1257
- # See #new(). The initial default value is a DRbIdConv instance.
1258
- #
1259
- # source://drb//lib/drb/drb.rb#1410
1260
- def default_id_conv(idconv); end
1261
-
1262
- # Set the default value for the :load_limit option.
1263
- #
1264
- # See #new(). The initial default value is 25 MB.
1265
- #
1266
- # source://drb//lib/drb/drb.rb#1396
1267
- def default_load_limit(sz); end
1268
-
1269
- # source://drb//lib/drb/drb.rb#1426
1270
- def make_config(hash = T.unsafe(nil)); end
1271
-
1272
- # Get the default value of the :verbose option.
1273
- #
1274
- # source://drb//lib/drb/drb.rb#1422
1275
- def verbose; end
1276
-
1277
- # Set the default value of the :verbose option.
1278
- #
1279
- # See #new(). The initial default value is false.
1280
- #
1281
- # source://drb//lib/drb/drb.rb#1417
1282
- def verbose=(on); end
1283
- end
1284
- end
1285
-
1286
- # source://drb//lib/drb/drb.rb#1652
1287
- class DRb::DRbServer::InvokeMethod
1288
- # @return [InvokeMethod] a new instance of InvokeMethod
1289
- #
1290
- # source://drb//lib/drb/drb.rb#1653
1291
- def initialize(drb_server, client); end
1292
-
1293
- # source://drb//lib/drb/drb.rb#1658
1294
- def perform; end
1295
-
1296
- private
1297
-
1298
- # source://drb//lib/drb/drb.rb#1704
1299
- def block_yield(x); end
1300
-
1301
- # source://drb//lib/drb/drb.rb#1695
1302
- def check_insecure_method; end
1303
-
1304
- # source://drb//lib/drb/drb.rb#1687
1305
- def init_with_client; end
1306
-
1307
- # source://drb//lib/drb/drb.rb#1711
1308
- def perform_with_block; end
1309
-
1310
- # source://drb//lib/drb/drb.rb#1731
1311
- def perform_without_block; end
1312
-
1313
- # source://drb//lib/drb/drb.rb#1699
1314
- def setup_message; end
1315
- end
1316
-
1317
- # The default drb protocol which communicates over a TCP socket.
1318
- #
1319
- # The DRb TCP protocol URI looks like:
1320
- # <code>druby://<host>:<port>?<option></code>. The option is optional.
1321
- #
1322
- # source://drb//lib/drb/drb.rb#843
1323
- class DRb::DRbTCPSocket
1324
- # Create a new DRbTCPSocket instance.
1325
- #
1326
- # +uri+ is the URI we are connected to.
1327
- # +soc+ is the tcp socket we are bound to. +config+ is our
1328
- # configuration.
1329
- #
1330
- # @return [DRbTCPSocket] a new instance of DRbTCPSocket
1331
- #
1332
- # source://drb//lib/drb/drb.rb#931
1333
- def initialize(uri, soc, config = T.unsafe(nil)); end
1334
-
1335
- # On the server side, for an instance returned by #open_server,
1336
- # accept a client connection and return a new instance to handle
1337
- # the server's side of this client-server session.
1338
- #
1339
- # source://drb//lib/drb/drb.rb#999
1340
- def accept; end
1341
-
1342
- # Check to see if this connection is alive.
1343
- #
1344
- # @return [Boolean]
1345
- #
1346
- # source://drb//lib/drb/drb.rb#1029
1347
- def alive?; end
1348
-
1349
- # Close the connection.
1350
- #
1351
- # If this is an instance returned by #open_server, then this stops
1352
- # listening for new connections altogether. If this is an instance
1353
- # returned by #open or by #accept, then it closes this particular
1354
- # client-server session.
1355
- #
1356
- # source://drb//lib/drb/drb.rb#981
1357
- def close; end
1358
-
1359
- # Get the address of our TCP peer (the other end of the socket
1360
- # we are bound to.
1361
- #
1362
- # source://drb//lib/drb/drb.rb#946
1363
- def peeraddr; end
1364
-
1365
- # On the client side, receive a reply from the server.
1366
- #
1367
- # source://drb//lib/drb/drb.rb#969
1368
- def recv_reply; end
1369
-
1370
- # On the server side, receive a request from the client.
1371
- #
1372
- # source://drb//lib/drb/drb.rb#959
1373
- def recv_request; end
1374
-
1375
- # On the server side, send a reply to the client.
1376
- #
1377
- # source://drb//lib/drb/drb.rb#964
1378
- def send_reply(succ, result); end
1379
-
1380
- # On the client side, send a request to the server.
1381
- #
1382
- # source://drb//lib/drb/drb.rb#954
1383
- def send_request(ref, msg_id, arg, b); end
1384
-
1385
- # source://drb//lib/drb/drb.rb#1038
1386
- def set_sockopt(soc); end
1387
-
1388
- # Graceful shutdown
1389
- #
1390
- # source://drb//lib/drb/drb.rb#1024
1391
- def shutdown; end
1392
-
1393
- # Get the socket.
1394
- #
1395
- # source://drb//lib/drb/drb.rb#951
1396
- def stream; end
1397
-
1398
- # Get the URI that we are connected to.
1399
- #
1400
- # source://drb//lib/drb/drb.rb#942
1401
- def uri; end
1402
-
1403
- private
1404
-
1405
- # source://drb//lib/drb/drb.rb#1014
1406
- def accept_or_shutdown; end
1407
-
1408
- # source://drb//lib/drb/drb.rb#990
1409
- def close_shutdown_pipe; end
1410
-
1411
- class << self
1412
- # Returns the hostname of this server
1413
- #
1414
- # source://drb//lib/drb/drb.rb#873
1415
- def getservername; end
1416
-
1417
- # Open a client connection to +uri+ (DRb URI string) using configuration
1418
- # +config+.
1419
- #
1420
- # This can raise DRb::DRbBadScheme or DRb::DRbBadURI if +uri+ is not for a
1421
- # recognized protocol. See DRb::DRbServer.new for information on built-in
1422
- # URI protocols.
1423
- #
1424
- # source://drb//lib/drb/drb.rb#866
1425
- def open(uri, config); end
1426
-
1427
- # Open a server listening for connections at +uri+ using
1428
- # configuration +config+.
1429
- #
1430
- # source://drb//lib/drb/drb.rb#904
1431
- def open_server(uri, config); end
1432
-
1433
- # For the families available for +host+, returns a TCPServer on +port+.
1434
- # If +port+ is 0 the first available port is used. IPv4 servers are
1435
- # preferred over IPv6 servers.
1436
- #
1437
- # source://drb//lib/drb/drb.rb#889
1438
- def open_server_inaddr_any(host, port); end
1439
-
1440
- # source://drb//lib/drb/drb.rb#846
1441
- def parse_uri(uri); end
1442
-
1443
- # Parse +uri+ into a [uri, option] pair.
1444
- #
1445
- # source://drb//lib/drb/drb.rb#921
1446
- def uri_option(uri, config); end
1447
- end
1448
- end
1449
-
1450
- # Implements DRb over a UNIX socket
1451
- #
1452
- # DRb UNIX socket URIs look like <code>drbunix:<path>?<option></code>. The
1453
- # option is optional.
1454
- #
1455
- # source://drb//lib/drb/unix.rb#15
1456
- class DRb::DRbUNIXSocket < ::DRb::DRbTCPSocket
1457
- # @return [DRbUNIXSocket] a new instance of DRbUNIXSocket
1458
- #
1459
- # source://drb//lib/drb/unix.rb#62
1460
- def initialize(uri, soc, config = T.unsafe(nil), server_mode = T.unsafe(nil)); end
1461
-
1462
- # source://drb//lib/drb/unix.rb#105
1463
- def accept; end
1464
-
1465
- # source://drb//lib/drb/unix.rb#95
1466
- def close; end
1467
-
1468
- # source://drb//lib/drb/unix.rb#111
1469
- def set_sockopt(soc); end
1470
-
1471
- class << self
1472
- # source://drb//lib/drb/unix.rb#28
1473
- def open(uri, config); end
1474
-
1475
- # source://drb//lib/drb/unix.rb#34
1476
- def open_server(uri, config); end
1477
-
1478
- # :stopdoc:
1479
- #
1480
- # source://drb//lib/drb/unix.rb#17
1481
- def parse_uri(uri); end
1482
-
1483
- # source://drb//lib/drb/unix.rb#72
1484
- def temp_server; end
1485
-
1486
- # source://drb//lib/drb/unix.rb#57
1487
- def uri_option(uri, config); end
1488
- end
1489
- end
1490
-
1491
- # import from tempfile.rb
1492
- #
1493
- # source://drb//lib/drb/unix.rb#70
1494
- DRb::DRbUNIXSocket::Max_try = T.let(T.unsafe(nil), Integer)
1495
-
1496
- # source://drb//lib/drb/drb.rb#1049
1497
- class DRb::DRbURIOption
1498
- # @return [DRbURIOption] a new instance of DRbURIOption
1499
- #
1500
- # source://drb//lib/drb/drb.rb#1050
1501
- def initialize(option); end
1502
-
1503
- # source://drb//lib/drb/drb.rb#1056
1504
- def ==(other); end
1505
-
1506
- # source://drb//lib/drb/drb.rb#1056
1507
- def eql?(other); end
1508
-
1509
- # source://drb//lib/drb/drb.rb#1061
1510
- def hash; end
1511
-
1512
- # Returns the value of attribute option.
1513
- #
1514
- # source://drb//lib/drb/drb.rb#1053
1515
- def option; end
1516
-
1517
- # source://drb//lib/drb/drb.rb#1054
1518
- def to_s; end
1519
- end
1520
-
1521
- # Mixin module making an object undumpable or unmarshallable.
1522
- #
1523
- # If an object which includes this module is returned by method
1524
- # called over drb, then the object remains in the server space
1525
- # and a reference to the object is returned, rather than the
1526
- # object being marshalled and moved into the client space.
1527
- #
1528
- # source://drb//lib/drb/drb.rb#418
1529
- module DRb::DRbUndumped
1530
- # @raise [TypeError]
1531
- #
1532
- # source://drb//lib/drb/drb.rb#419
1533
- def _dump(dummy); end
1534
- end
1535
-
1536
- # Class wrapping a marshalled object whose type is unknown locally.
1537
- #
1538
- # If an object is returned by a method invoked over drb, but the
1539
- # class of the object is unknown in the client namespace, or
1540
- # the object is a constant unknown in the client namespace, then
1541
- # the still-marshalled object is returned wrapped in a DRbUnknown instance.
1542
- #
1543
- # If this object is passed as an argument to a method invoked over
1544
- # drb, then the wrapped object is passed instead.
1545
- #
1546
- # The class or constant name of the object can be read from the
1547
- # +name+ attribute. The marshalled object is held in the +buf+
1548
- # attribute.
1549
- #
1550
- # source://drb//lib/drb/drb.rb#485
1551
- class DRb::DRbUnknown
1552
- # Create a new DRbUnknown object.
1553
- #
1554
- # +buf+ is a string containing a marshalled object that could not
1555
- # be unmarshalled. +err+ is the error message that was raised
1556
- # when the unmarshalling failed. It is used to determine the
1557
- # name of the unmarshalled object.
1558
- #
1559
- # @return [DRbUnknown] a new instance of DRbUnknown
1560
- #
1561
- # source://drb//lib/drb/drb.rb#493
1562
- def initialize(err, buf); end
1563
-
1564
- # source://drb//lib/drb/drb.rb#522
1565
- def _dump(lv); end
1566
-
1567
- # Buffer contained the marshalled, unknown object.
1568
- #
1569
- # source://drb//lib/drb/drb.rb#512
1570
- def buf; end
1571
-
1572
- # Create a DRbUnknownError exception containing this object.
1573
- #
1574
- # source://drb//lib/drb/drb.rb#536
1575
- def exception; end
1576
-
1577
- # The name of the unknown thing.
1578
- #
1579
- # Class name for unknown objects; variable name for unknown
1580
- # constants.
1581
- #
1582
- # source://drb//lib/drb/drb.rb#509
1583
- def name; end
1584
-
1585
- # Attempt to load the wrapped marshalled object again.
1586
- #
1587
- # If the class of the object is now known locally, the object
1588
- # will be unmarshalled and returned. Otherwise, a new
1589
- # but identical DRbUnknown object will be returned.
1590
- #
1591
- # source://drb//lib/drb/drb.rb#531
1592
- def reload; end
1593
-
1594
- class << self
1595
- # source://drb//lib/drb/drb.rb#514
1596
- def _load(s); end
1597
- end
1598
- end
1599
-
1600
- # An exception wrapping a DRb::DRbUnknown object
1601
- #
1602
- # source://drb//lib/drb/drb.rb#438
1603
- class DRb::DRbUnknownError < ::DRb::DRbError
1604
- # Create a new DRbUnknownError for the DRb::DRbUnknown object +unknown+
1605
- #
1606
- # @return [DRbUnknownError] a new instance of DRbUnknownError
1607
- #
1608
- # source://drb//lib/drb/drb.rb#441
1609
- def initialize(unknown); end
1610
-
1611
- # source://drb//lib/drb/drb.rb#453
1612
- def _dump(lv); end
1613
-
1614
- # Get the wrapped DRb::DRbUnknown object.
1615
- #
1616
- # source://drb//lib/drb/drb.rb#447
1617
- def unknown; end
1618
-
1619
- class << self
1620
- # source://drb//lib/drb/drb.rb#449
1621
- def _load(s); end
1622
- end
1623
- end
1624
-
1625
- # source://drb//lib/drb/drb.rb#1227
1626
- class DRb::ThreadObject
1627
- include ::MonitorMixin
1628
-
1629
- # @return [ThreadObject] a new instance of ThreadObject
1630
- #
1631
- # source://drb//lib/drb/drb.rb#1230
1632
- def initialize(&blk); end
1633
-
1634
- # source://drb//lib/drb/drb.rb#1265
1635
- def _execute; end
1636
-
1637
- # @return [Boolean]
1638
- #
1639
- # source://drb//lib/drb/drb.rb#1241
1640
- def alive?; end
1641
-
1642
- # source://drb//lib/drb/drb.rb#1245
1643
- def kill; end
1644
-
1645
- # source://drb//lib/drb/drb.rb#1250
1646
- def method_missing(msg, *arg, &blk); end
1647
- end
1648
-
1649
- # source://drb//lib/drb/version.rb#2
1650
- DRb::VERSION = T.let(T.unsafe(nil), String)
1651
-
1652
- # source://drb//lib/drb/drb.rb#1993
1653
- DRbIdConv = DRb::DRbIdConv
1654
-
1655
- # :stopdoc:
1656
- #
1657
- # source://drb//lib/drb/drb.rb#1991
1658
- DRbObject = DRb::DRbObject
1659
-
1660
- # source://drb//lib/drb/drb.rb#1992
1661
- DRbUndumped = DRb::DRbUndumped