Class: Rinda::RingProvider (Ruby 2.7.2)
Description: Class : Rinda::RingProvider - Ruby 2.7.2

### Home Classes Methods

### In Files

- rinda/ring.rb

### Parent

Object

### Methods

- ::new
- #provide

### Class/Module Index

Quicksearch

- Rinda
- Rinda::DRbObjectTemplate
- Rinda::InvalidHashTupleKey
- Rinda::NotifyTemplateEntry
- Rinda::RequestCanceledError
- Rinda::RequestExpiredError
- Rinda::RindaError
- Rinda::RingFinger
- Rinda::RingProvider
- Rinda::RingServer
- Rinda::SimpleRenewer
- Rinda::Template
- Rinda::TemplateEntry
- Rinda::Tuple
- Rinda::TupleBag
- Rinda::TupleBag::TupleBin
- Rinda::TupleEntry
- Rinda::TupleSpace
- Rinda::TupleSpaceProxy
- Rinda::WaitTemplateEntry

No matching classes.

# Rinda::RingProvider

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 469
    def initialize(klass, front, desc, renewer = nil)
      @tuple = [:name, klass, front, desc]
      @renewer = renewer || Rinda::SimpleRenewer.new
    end

### Public Instance Methods

provide() click to toggle source

Advertises this service on the primary remote TupleSpace.

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