Class

RingFinger

Extends:

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.

Public Attributes
broadcast_list The list of addresses where RingFinger will send query packets.
port The port that RingFinger will send query packets to.
primary Contain the first advertised TupleSpace after lookup_ring_any is called.
Public Methods
each Iterates over all discovered TupleSpaces starting with the primary.
finger Creates a singleton RingFinger and looks for a RingServer. Returns the created RingFinger.
lookup_ring 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 Returns the first found remote TupleSpace. Any further recovered TupleSpaces can be found by calling to_a.
new 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 discovered TupleSpaces except for the primary.
to_a Contains all discoverd TupleSpaces except for the primary.
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.