org.jgroups.demos
public class QuoteServer extends Object implements MembershipListener, MessageListener
This mechanism allows both for fast discovery of initial servers, and - in the case of partition merging - for reintegration of existing servers. Broadcasting the state request upon every view change (only when new members are joined) causes potentially a lot of network traffic, but it is assumes that there will not be more than 5 quote servers at most.
| Method Summary | |
|---|---|
| void | block() |
| Hashtable | getAllStocks() |
| float | getQuote(String stock_name) |
| byte[] | getState() |
| static void | main(String[] args) |
| void | printAllStocks() |
| void | receive(Message msg) |
| void | setQuote(String stock_name, Float value) |
| void | setState(byte[] state) |
| void | start() |
| void | suspect(Address suspected_mbr) |
| void | viewAccepted(View new_view) |