|
|||||||||
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.db.DBHandler
public class DBHandler
This class handles all communication betwwen clients and database (that is, the bank account). UDP multicast is used without any form of delivery control or ordering.
Constructor Summary | |
---|---|
DBHandler(Account account)
Creates a new instance that updates the specified account. |
Method Summary | |
---|---|
byte[] |
getState()
Called by the jgroups runtime when som other node needs the groups state. |
static void |
main(java.lang.String[] args)
Starts a database server. |
void |
receive(org.jgroups.Message msg)
Called by the jgroups runtime when a message has arrived. |
void |
setState(byte[] state)
Called by the jgroups runtime when this node has requested state info. |
void |
start(java.lang.String config)
Starts the database server. |
void |
stop()
Stops the database server. |
Methods inherited from class org.jgroups.ReceiverAdapter |
---|
block, suspect, viewAccepted |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBHandler(Account account)
account
- The account managed by this instance.Method Detail |
---|
public void receive(org.jgroups.Message msg)
receive
in interface org.jgroups.MessageListener
receive
in class org.jgroups.ReceiverAdapter
msg
- The newly arrived message.public byte[] getState()
getState
in interface org.jgroups.MessageListener
getState
in class org.jgroups.ReceiverAdapter
public void setState(byte[] state)
setState
in interface org.jgroups.MessageListener
setState
in class org.jgroups.ReceiverAdapter
state
- The current state of the group.public void stop()
public void start(java.lang.String config)
config
- The jgroups configuration. This string is passed to the
JChannel
constructor.public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |