org.jgroups.demos

Class Gossip

public class Gossip extends Object implements Runnable, WindowListener, ActionListener, ChannelListener

Demos that tries to graphically illustrating the gossip (or pbcast) protocol: every sender periodically sends a DRAW command to a random subset of the group members. Each member checks whether it already received the message and applies it if not yet received. Otherwise it discards it. If not yet received, the message will be forwarded to 10% of the group members. This demo is probably only interesting when we have a larger number of members: a gossip will gradually reach all members, coloring their whiteboards.
Constructor Summary
Gossip(String props, long traffic)
Method Summary
voidactionPerformed(ActionEvent e)
voidchannelClosed(Channel channel)
voidchannelConnected(Channel channel)
voidchannelDisconnected(Channel channel)
voidchannelReconnected(Address new_addr)
voidchannelShunned()
voidclearPanel()
voidcolorPanel(int r, int g, int b)
voidgo()
static voidmain(String[] args)
voidmouseMoved(MouseEvent e)
voidrun()
voidsendClearPanelMsg()
voidwindowActivated(WindowEvent e)
voidwindowClosed(WindowEvent e)
voidwindowClosing(WindowEvent e)
voidwindowDeactivated(WindowEvent e)
voidwindowDeiconified(WindowEvent e)
voidwindowIconified(WindowEvent e)
voidwindowOpened(WindowEvent e)

Constructor Detail

Gossip

public Gossip(String props, long traffic)

Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)

channelClosed

public void channelClosed(Channel channel)

channelConnected

public void channelConnected(Channel channel)

channelDisconnected

public void channelDisconnected(Channel channel)

channelReconnected

public void channelReconnected(Address new_addr)

channelShunned

public void channelShunned()

clearPanel

public void clearPanel()

colorPanel

public void colorPanel(int r, int g, int b)

go

public void go()

main

public static void main(String[] args)

mouseMoved

public void mouseMoved(MouseEvent e)

run

public void run()

sendClearPanelMsg

public void sendClearPanelMsg()

windowActivated

public void windowActivated(WindowEvent e)

windowClosed

public void windowClosed(WindowEvent e)

windowClosing

public void windowClosing(WindowEvent e)

windowDeactivated

public void windowDeactivated(WindowEvent e)

windowDeiconified

public void windowDeiconified(WindowEvent e)

windowIconified

public void windowIconified(WindowEvent e)

windowOpened

public void windowOpened(WindowEvent e)
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.