All Packages Class Hierarchy This Package Previous Next Index
Class JavaGroups.JavaStack.Protocols.FD_RAND
java.lang.Object
|
+----JavaGroups.JavaStack.Protocol
|
+----JavaGroups.JavaStack.Protocols.FD_RAND
- public class FD_RAND
- extends Protocol
- implements 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.
-
FD_RAND()
-
-
Down(Event)
- An event is to be sent down the stack.
-
GetName()
-
-
run()
- Loop while more than 1 member available.
-
SetProperties(Properties)
- Configures the protocol initially.
-
Up(Event)
- An event was received from the layer below.
FD_RAND
public FD_RAND()
GetName
public String GetName()
- Overrides:
- GetName in class Protocol
SetProperties
public boolean SetProperties(Properties props)
- Configures the protocol initially.
- Overrides:
- SetProperties in class Protocol
Up
public void Up(Event evt)
- An event was received from the layer below.
- Overrides:
- Up in class Protocol
Down
public void Down(Event evt)
- An event is to be sent down the stack.
- Overrides:
- Down in class Protocol
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.
All Packages Class Hierarchy This Package Previous Next Index