Class

Rinda::RingFinger

Inheritance
< Object

RingFinger is used by RingServer clients to discover the RingServer‘s TupleSpace. Typically, all a client needs to do is call RingFinger.primary to retrieve the remote TupleSpace, which it can then begin using.

Attributes

Name Visibility R/W Description
broadcast_list public RW The list of addresses where RingFinger will send query packets.
port public RW The port that RingFinger will send query packets to.
primary public RW Contain the first advertised TupleSpace after lookup_ring_any is called.

Methods

Class

Visibility Signature
public finger ()
public new (broadcast_list=@@broadcast_list, port=Ring_PORT)
public primary ()
public to_a ()

Instance

Visibility Signature
public each () {|@primary| ...}
public lookup_ring (timeout=5, &block)
public lookup_ring_any (timeout=5)
public to_a ()

Class Method Detail

finger()

Creates a singleton RingFinger and looks for a RingServer. Returns the created RingFinger.

new(broadcast_list=@@broadcast_list, port=Ring_PORT)

Creates a new RingFinger that will look for RingServers at port on the addresses in broadcast_list.

primary()

Returns the first advertised TupleSpace.

to_a()

Contains all discoverd TupleSpaces except for the primary.

Instance Method Detail

each() {|@primary| ...}

Iterates over all discovered TupleSpaces starting with the primary.

lookup_ring(timeout=5, &block)

Looks up RingServers waiting timeout seconds. RingServers will be given block as a callback, which will be called with the remote TupleSpace.

lookup_ring_any(timeout=5)

Returns the first found remote TupleSpace. Any further recovered TupleSpaces can be found by calling to_a.

to_a()

Contains all discovered TupleSpaces except for the primary.