|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.messaging.core.local.RoundRobinPointToPointRouter
The router will always first try the next receiver in the list to the one it tried last time. This gives a more balanced distribution than the FirstReceiverPointToPointRouter and is better suited when batching messages to consumers since we will end up with messages interleaved amongst consumers rather than in contiguous blocks.
| Constructor Summary | |
RoundRobinPointToPointRouter()
|
|
| Method Summary | |
boolean |
add(Receiver r)
Add a local receiver to this distributor. |
void |
clear()
Remove all receivers. |
boolean |
contains(Receiver r)
|
int |
getNumberOfReceivers()
|
Delivery |
handle(DeliveryObserver observer,
MessageReference ref,
Transaction tx)
A receiver can return an active, "done" or null delivery. |
java.util.Iterator |
iterator()
|
boolean |
remove(Receiver r)
Remove a local receiver from this distributor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RoundRobinPointToPointRouter()
| Method Detail |
public Delivery handle(DeliveryObserver observer,
MessageReference ref,
Transaction tx)
Receiver
handle in interface Receiverobserver - - the component the delivery should be acknowledged to.Delivery,
DeliveryObserverpublic boolean add(Receiver r)
Distributor
add in interface Distributorpublic boolean remove(Receiver r)
Distributor
remove in interface Distributorpublic void clear()
Distributor
clear in interface Distributorpublic boolean contains(Receiver r)
contains in interface Distributorpublic java.util.Iterator iterator()
iterator in interface Distributorpublic int getNumberOfReceivers()
getNumberOfReceivers in interface Distributor
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||