|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgroups.ReceiverAdapter
se.kth.leiflindback.distdb.client.Bank
public class Bank
The bank deposits, withdraws and adds interest to the account. If communication is reliable all accounts should always have the same balance.
Constructor Summary | |
---|---|
Bank(java.lang.String config)
Constructs a new instance and connects it to a JChannel . |
Method Summary | |
---|---|
void |
doSomeBanking()
Randomly deposits, withdraws and adds interest. |
byte[] |
getState()
Called by the jgroups runtime when som other node needs the groups state. |
static void |
main(java.lang.String[] args)
Starts the bank. |
Methods inherited from class org.jgroups.ReceiverAdapter |
---|
block, receive, setState, suspect, viewAccepted |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Bank(java.lang.String config)
JChannel
.
config
- The jgroups configuration. This string is passed to the
JChannel
constructor.Method Detail |
---|
public byte[] getState()
NullAccount
, wich will pass
the question to another node.
getState
in interface org.jgroups.MessageListener
getState
in class org.jgroups.ReceiverAdapter
public void doSomeBanking()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |