cshannon commented on PR #2806: URL: https://github.com/apache/activemq/pull/2806#issuecomment-6698175547
Something I just thought of is we could do some modernization to the KahaDB index interfaces (like BTreeNode) and add some new methods that exist in Map that are useful, such as computeIfAbsent, computeIfPresent, merge, etc. In particular, a [merge](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html#merge(K,V,java.util.function.BiFunction)) method would be useful in this case. We could encapsulate the new check into a function and conditionally return the new/old value. I don't think we need to do it now and would be a separate PR but there's probably other places in the code that could be a bit simpler with new methods like that. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
