Class: DRbFileServerPlus
- Inherits:
-
Object
- Object
- DRbFileServerPlus
- Defined in:
- lib/drb_fileserver_plus.rb
Instance Method Summary collapse
-
#initialize(host: 'localhost', port: '61010', nodes: [], sps_host: nil, sps_port: '59010', sps_topic: 'file') ⇒ DRbFileServerPlus
constructor
A new instance of DRbFileServerPlus.
- #start ⇒ Object
Constructor Details
#initialize(host: 'localhost', port: '61010', nodes: [], sps_host: nil, sps_port: '59010', sps_topic: 'file') ⇒ DRbFileServerPlus
Returns a new instance of DRbFileServerPlus.
219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/drb_fileserver_plus.rb', line 219 def initialize(host: 'localhost', port: '61010', nodes: [], sps_host: nil, sps_port: '59010', sps_topic: 'file') @host, @port, @nodes = host, port, nodes if sps_host then @sps = SPSPub.new(host: sps_host, port: sps_port) @topic = sps_topic end end |
Instance Method Details
#start ⇒ Object
231 232 233 234 235 236 237 |
# File 'lib/drb_fileserver_plus.rb', line 231 def start() DRb.start_service "druby://#{@host}:#{@port}", DRbFileServer.new(@nodes, sps: @sps, topic: @topic) DRb.thread.join end |