michaelandrepearce edited a comment on issue #2548: ARTEMIS-2118 Enhanced 
Message Groups Support
URL: https://github.com/apache/activemq-artemis/pull/2548#issuecomment-463867719
 
 
   @franz1981 the needing to copy a IntObjectHashmap, still didnt fit right 
with me. 
   As such have had a sit and think.
   
   Have done a small refactor that means we can still use IntObjectHashmap 
without needing to clone it over.
   
   Essentially in queueimpl for message groups, we only use, 
   put
   get
   remove
   clear
   size 
   iterate over the collection so we can for remove consumers. 
   
   As such rather than using map interface i made a new Interface named 
'MessageGroups' with just this subset, as such makes implementations that are 
not backed by a plain forward map a little easier as less methods to contend 
with and also we can add or tweek an methods signature if needed, e.g. i can 
still use IntObjectHashMap but i don't have to make it fully implement 
Map<SimpleString, Consumer>. Also should others be wanted in the future as less 
methods to implement if the backing store isnt a map will be easier to 
implement. 
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to