[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Algorithm broken in WildcardAddressManager
ataylor
do-not-reply at jboss.com
Tue Jan 6 07:49:42 EST 2009
anonymous wrote : How can you add a mapping for each allowable address if there are no allowable addresses? .....
|
| Perhaps there is a terminology mix up here?
By allowable address I'm assuming you mean a destination!
so in SimpleAddressManager we would have
| public boolean addDestination(final SimpleString address)
| {
| Bindings bindings = new BindingsImpl();
| mappings.putIfAbsent(address, bindings);
| return destinations.addIfAbsent(address);
| }
this means that all destinations exist in the mappings object, except that they may have an empty Bindings object. This also means that when i check for matching addresses i don't have to check both the destinations and the mappings only the mappings. Taking this further if they exist in both destinations and mappings we don't need destinations, we can just check in the mappings, if theres an entry then its an allowable address, i.e. it has a mapping, empty or not.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199744#4199744
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199744
More information about the jboss-dev-forums
mailing list