On 5/6/2018 3:10 PM, Phil Steitz wrote:
Above looks like it will work, but it introduces a synchronization bottleneck in your app. If you have high concurrency and lots of queries being submitted, threads are going to line up waiting for the lock on the map.
I believe that all the usages of the synchronized map should be fast enough to keep that from being a problem. The map will never hold more than about a dozen entries unless something goes REALLY wrong with the program operation. Most of the time, there should be more like one or two entries. The concurrency on the database is not high.
I have added a check in my watchdog thread to log a warning if the map's size gets bigger than about twice what's expected, and to send an alarm if that state persists for too long. If it all goes pear-shaped, I should get a notification before things degrade horribly.
Thanks for your input! --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org