|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jgroups.protocols.TP.DefaultBundler
protected class TP.DefaultBundler
The sender's thread adds a message to the hashmap and - if the accumulated size has been exceeded - sends all bundled messages. The cost of sending the bundled messages is therefore distributed over different threads; whoever happens to send a message exceeding the max size gets to send the accumulated messages. We also use a number of timer tasks to send bundled messages after a certain time has elapsed. This is necessary e.g. when a message is added that doesn't exceed the max size, but then no further messages are added, so elapsed time will trigger the sending, not exceeding of the max size. TODO: reuse code for hashmap based bundling for the bundlers below
Constructor Summary | |
---|---|
protected |
TP.DefaultBundler()
|
Method Summary | |
---|---|
void |
send(Message msg)
|
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected TP.DefaultBundler()
Method Detail |
---|
public void start()
start
in interface TP.Bundler
public void stop()
stop
in interface TP.Bundler
public void send(Message msg) throws java.lang.Exception
send
in interface TP.Bundler
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |