| |
|
| java.lang.Object java.lang.Thread org.jgroups.stack.UpHandler org.jgroups.protocols.pbcast.PBCAST
PBCAST | public class PBCAST extends Protocol implements Runnable(Code) | | Implementation of probabilistic broadcast. Sends group messages via unreliable multicast. Gossips regularly to
a random subset of group members to retransmit missing messages. Gossiping is used both for bringing all
members to the same state (having received the same messages) and to garbage-collect messages seen by all members
(gc is piggybacked in gossip messages). See DESIGN for more details.
author: Bela Ban |
desired_avg_gossip | long desired_avg_gossip(Code) | | |
gossip_handler | GossipHandler gossip_handler(Code) | | |
gossip_interval | long gossip_interval(Code) | | |
gossip_round | long gossip_round(Code) | | |
max_gossip_cache | int max_gossip_cache(Code) | | |
max_invalid_gossips | final int max_invalid_gossips(Code) | | |
mcast_gossip | boolean mcast_gossip(Code) | | |
operational | boolean operational(Code) | | |
skip_sleep | boolean skip_sleep(Code) | | |
computeGossipInterval | long computeGossipInterval(int num_mbrs, double desired_avg_gossip)(Code) | | Computes the gossip_interval. See DESIGN for details
|
getDigest | Digest getDigest()(Code) | | Returns for each sender the 'highest seen' seqno from the digest. Highest seen means the
highest seqno without any gaps, e.g. if for a sender P the messages 2 3 4 6 7 were received,
then only 2, 3 and 4 can be delivered, so 4 is the highest seen. 6 and 7 cannot because there
5 is missing. If there are no message, the highest seen seqno is -1.
|
getRandom | long getRandom(long range)(Code) | | |
handleGossip | void handleGossip(Gossip gossip)(Code) | | MOST IMPORTANT METHOD IN THIS CLASS !! This guy really decides how a gossip reaches all members,
or whether it will flood the network !
Scrutinize the gossip received and request retransmission of messages that we haven't received yet.
A gossip has a digest which carries for each sender the lowest and highest seqno seen. We check
this range against our own digest and request retransmission of missing messages if needed.
See DESIGN for a description of this method
|
handleUpMessage | void handleUpMessage(Message m, PbcastHeader hdr)(Code) | | Ensures that FIFO is observed for all messages for a certain member. The NakReceiverWindow corresponding
to a certain sender is looked up in a hashtable. Then, the message is added to the NakReceiverWindow.
As many messages as possible are then removed from the table and passed up.
|
handleXmitRequest | void handleXmitRequest(Address requester, Hashtable xmit_reqs)(Code) | | Find the messages indicated in xmit_reqs and re-send them to
requester
|
handleXmitRsp | void handleXmitRsp(List xmit_msgs)(Code) | | |
printIncomingMessageQueue | String printIncomingMessageQueue()(Code) | | |
run | public void run()(Code) | | Gossip thread. Sends gossips containing a message digest every gossip_interval msecs
|
sendGossip | void sendGossip()(Code) | | Send a gossip message with a message digest of the highest seqnos seen per sender to a subset
of the current membership. Exclude self (I receive all mcasts sent by myself).
|
setDigest | void setDigest(Digest d)(Code) | | Sets (or resets) the contents of the 'digest' table. Its current messages will be deleted and the
NakReceiverTables reset.
|
setProperties | public boolean setProperties(Properties props)(Code) | | Setup the Protocol instance acording to the configuration string
|
shunInvalidGossiper | void shunInvalidGossiper(Address invalid_gossiper)(Code) | | If sender of gossip is not a member, send a NOT_MEMBER to sender (after n gossips received).
This will cause that member to leave the group and possibly re-join.
|
startGossipHandler | void startGossipHandler()(Code) | | |
startGossipThread | void startGossipThread()(Code) | | |
stopGossipHandler | void stopGossipHandler()(Code) | | |
stopGossipThread | void stopGossipThread()(Code) | | |
Fields inherited from org.jgroups.stack.UpHandler | final protected Log log(Code)(Java Doc)
|
|
|
|