|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.nix.ert.base.Dispatcher
TODO Edit this text for a better description
This is a local dispatcher, he is responsible for all local requests. He does
not decide if the request is executed locally or remotely, he will ALWAYS
execute it remotly. It's the responsibility of each single service to relay
it to another node...
If you don't know, if the request is for local or remote execution, you can
place it in Dispatcher, but he will forward it to KeyPartitionManager who
will then decide if executed locally or remotely (according their KeyGroupID)
Method Summary | |
void |
addWork(DataItem data)
Only data which contain the "command" key are accepted, all other will be silently ignored! TODO: perhpas we could also throw an exception? |
static Dispatcher |
getInstance()
|
void |
registerQueue(Queue queue)
|
void |
registerService(java.lang.String operation,
Queue queue)
There is only ONE service allowed for each type... |
void |
run()
Start the dispatcher and ONLY ONE thread meight be inside it! |
void |
unregisterService(java.lang.String operation)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static Dispatcher getInstance()
public void addWork(DataItem data)
data
- public void registerService(java.lang.String operation, Queue queue)
queue
- The queue where incomming request are stored for this command.public void registerQueue(Queue queue)
public void unregisterService(java.lang.String operation)
public void run()
run
in interface java.lang.Runnable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |