org.jgroups.protocols
public class FLUSH extends RpcProtocol
Example:
FLUSH ---> (p=10, q=22, r=7) <-- (p=10, q=20, r=7) (did not receive 2 messages from q) <-- (p=12, q=23, r=7) (attached are messages p11, p12, and q23) <-- (p=10, q=22, r=8) (attached is message r8) --------------------- min: 11 21 8 max: 12 23 8The coordinator now computes the range for each member and re-broadcasts messages p11, p12, q21, q22, q23 and r8. This is essentially the exclusive min and inclusive max of all replies. Note that messages p11, p12 and q23 were not received by the coordinator itself before. They were only returned as result of the FLUSH replies and the coordinator now re-broadcasts them.
Method Summary | |
---|---|
String | getName() |
boolean | handleDownEvent(Event evt)
Callback. |
Digest | handleFlush(Vector flush_dests, long[] highest_seqnos)
Called by coordinator running the FLUSH protocol. |
boolean | handleUpEvent(Event evt)
Callback. |
Vector | providedUpServices() |
void | receiveDownEvent(Event evt)
The default handling adds the event to the down-queue where events are handled in order of
addition by a thread. |
Vector | requiredDownServices() |
boolean | setProperties(Properties props) |
void | start() |
Do not use PassDown
in this method as the event is passed down
by default by the superclass after this method returns !
Returns: boolean Defaults to true. If false, event will not be passed down the stack.
handleFlush()
checks for each member its
own highest seqno seen for that member. If it is higher than the one seen by the coordinator,
all higher messages are attached to the return value (a message digest).Parameters: flush_dests The members to which this message is sent. Processes not in this list just ignore the handleFlush() message. highest_seqnos The highest sequence numbers (order corresponding to membership) as seen by coordinator.
Returns: Digest An array of the highest seqnos for each member, as seen by this member. If this
member's seqno for a member P is higher than the one in highest_seqnos
,
the missing messages are added to the message digest as well. This allows the
coordinator to re-broadcast missing messages.
Do not use PassUp
in this method as the event is passed up
by default by the superclass after this method returns !
Returns: boolean Defaults to true. If false, event will not be passed up the stack.