org.javagroups.protocols
Class FD_RAND

org.javagroups.protocols.FD_RAND
All Implemented Interfaces:
java.lang.Runnable

public class FD_RAND
implements java.lang.Runnable

Failure detection based on simple heartbeat protocol. Regularly polls randomly selected members for liveness. Passes SUSPECT message up the stack when a member is not reachable. The simple algorithms works as follows: the membership is known. Each HB protocol periodically sends a 'are-you-alive' message to a randomly selected member, except itself. When a response hasn't been received for n milliseconds and m tries, the corresponding member is suspected (and eventually excluded if faulty).

FD_RAND starts when it detects (in a view change notification) that there are at least 2 members in the group. It stops running when the membership drops below 2.


Constructor Summary
FD_RAND()
           
 
Method Summary
 void down(org.javagroups.protocols.Event evt)
           
 java.lang.String getName()
           
 void run()
          Loop while more than 1 member available.
 boolean setProperties(java.util.Properties props)
           
 void up(org.javagroups.protocols.Event evt)
           
 

Constructor Detail

FD_RAND

public FD_RAND()
Method Detail

getName

public java.lang.String getName()

setProperties

public boolean setProperties(java.util.Properties props)

up

public void up(org.javagroups.protocols.Event evt)

down

public void down(org.javagroups.protocols.Event evt)

run

public void run()
Loop while more than 1 member available. Choose a member randomly (not myself !) and send a heartbeat. Wait for ack. If ack not received withing timeout, mcast SUSPECT message.
Specified by:
run in interface java.lang.Runnable


Copyright © 2001,2002 www.javagroups.com . All Rights Reserved.