Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • rinda/ring.rb




RingProvider uses a RingServer advertised TupleSpace as a name service. TupleSpace clients can register themselves with the remote TupleSpace and look up other provided services via the remote TupleSpace.

Services are registered with a tuple of the format [:name, klass, DRbObject, description].

Public Class Methods

new(klass, front, desc, renewer = nil) click to toggle source

Creates a RingProvider that will provide a klass service running on front, with a description. renewer is optional.

               # File rinda/ring.rb, line 232
def initialize(klass, front, desc, renewer = nil)
  @tuple = [:name, klass, front, desc]
  @renewer = renewer || Rinda::SimpleRenewer.new

Public Instance Methods

provide() click to toggle source

Advertises this service on the primary remote TupleSpace.

               # File rinda/ring.rb, line 240
def provide
  ts = Rinda::RingFinger.primary
  ts.write(@tuple, @renewer)

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.