JavaGroups.JavaStack.Protocols
Class STABLE
java.lang.Object
|
+--JavaGroups.JavaStack.Protocol
|
+--JavaGroups.JavaStack.MessageProtocol
|
+--JavaGroups.JavaStack.RpcProtocol
|
+--JavaGroups.JavaStack.Protocols.STABLE
- public class STABLE
- extends RpcProtocol
- implements java.lang.Runnable
Computes the broadcast messages that are stable, i.e. have been received by all members. Sends
STABLE events up te stack when this is the case. Uses a probabilistic scheme to do so, as described
in "GSGC: An Efficient Gossip-Style Garbage Collection Scheme for Scalable Reliable Multicast".
The only difference is that instead of using counters for an estimation of messages received from each
member, we retrieve this actual information from the NAKACK layer (which must be present for the STABLE
protocol to work).
|
Method Summary |
java.lang.String |
GetName()
|
void |
Gossip(ViewId view_id,
long round,
long[] highest_seqnos,
boolean[] heard,
java.lang.Object sender)
Contains the highest sequence numbers as seen by sender |
boolean |
HandleDownEvent(Event evt)
Callback. |
boolean |
HandleUpEvent(Event evt)
Callback. |
java.util.Vector |
RequiredUpServices()
List of events that are required to be answered by some layer above. |
void |
run()
|
boolean |
SetProperties(java.util.Properties props)
Configures the protocol initially. |
void |
Stability(ViewId view_id,
long round,
long[] stability_vector,
java.lang.Object sender)
Contains the highest message sequence numbers (for each member) that can safely be
deleted (because they have been seen by all members). |
| Methods inherited from class JavaGroups.JavaStack.RpcProtocol |
CallRemoteMethod,
CallRemoteMethod,
CallRemoteMethod,
CallRemoteMethod,
CallRemoteMethod,
CallRemoteMethod,
CallRemoteMethod,
CallRemoteMethods,
CallRemoteMethods,
CallRemoteMethods,
CallRemoteMethods,
CallRemoteMethods,
CallRemoteMethods,
CallRemoteMethods,
Handle |
| Methods inherited from class JavaGroups.JavaStack.Protocol |
GetDownProtocol,
GetProperties,
GetUpProtocol,
PassDown,
PassUp,
ProvidedDownServices,
ProvidedUpServices,
RequiredDownServices,
Reset,
SetDownProtocol,
SetProtocolStack,
SetUpProtocol,
StartDownHandler,
StartUpHandler,
StopInternal |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
STABLE
public STABLE()
GetName
public java.lang.String GetName()
- Overrides:
- GetName in class RpcProtocol
RequiredUpServices
public java.util.Vector RequiredUpServices()
- Description copied from class: Protocol
- List of events that are required to be answered by some layer above.
- Overrides:
- RequiredUpServices in class Protocol
- Tags copied from class: Protocol
- Returns:
- Vector (of Integers)
SetProperties
public boolean SetProperties(java.util.Properties props)
- Description copied from class: Protocol
- Configures the protocol initially. A configuration string consists of name=value
items, separated by a ';' (semicolon), e.g.:
"loopback=false;unicast_inport=4444"
- Overrides:
- SetProperties in class Protocol
Gossip
public void Gossip(ViewId view_id,
long round,
long[] highest_seqnos,
boolean[] heard,
java.lang.Object sender)
- Contains the highest sequence numbers as seen by
sender
- Parameters:
view_id - The view ID in which the gossip was sent. Must be the same as ours, otherwise
it is discardedround - The round in which the gossip was senthighest_seqnos - A vector with the highest sequence numbers as seen bu senderheard - The sender's heard_from array. This allows us to minimize the gossip msgs
for a given round as a member does not have to receive gossip msgs from each member,
but members pass gossips they've received from others on in their own gossips. E.g.
when a member P (of group {P,Q,R}) receives a gossip from R, its own gossip to Q might
be {R,P}. Q, who hasn't received a gossip from R, will not need to receive it anymore
as it is already sent by P. This simple scheme reduces the number of gossip messages
needed.sender - The sender of the gossip message (obviously :-))
Stability
public void Stability(ViewId view_id,
long round,
long[] stability_vector,
java.lang.Object sender)
- Contains the highest message sequence numbers (for each member) that can safely be
deleted (because they have been seen by all members).
HandleUpEvent
public boolean HandleUpEvent(Event evt)
- Callback. Called by superclass when event may be handled.
Do not use PassUp in this method as the event is passed up
by default by the superclass after this method returns !
- Overrides:
- HandleUpEvent in class RpcProtocol
- Returns:
- boolean Defaults to true. If false, event will not be passed up the stack.
HandleDownEvent
public boolean HandleDownEvent(Event evt)
- Callback. Called by superclass when event may be handled.
Do not use PassDown in this method as the event is passed down
by default by the superclass after this method returns !
- Overrides:
- HandleDownEvent in class RpcProtocol
- Returns:
- boolean Defaults to true. If false, event will not be passed down the stack.
run
public void run()
- Specified by:
- run in interface java.lang.Runnable