Build your own caching mechanisms with volatile collections

The literal definition of the word volatile is “readily vaporizable,” with a secondary connotation of “changeable.” This month’s tool matches this description nicely, as its implementation will cause the objects contained in a hashtable to vaporize, and the rate of that vaporization is indeed changeable.

But more on that in a moment. First, I’ll address reader feedback from last month’s column.


Half a dozen readers wrote in to inform me that the following block of code (which relates to the GlobalValues tool we discussed two columns back) is a performance bottleneck for multithreaded access.

To read this article in full, please click here

JavaWorld Cool Tools

Leave a Reply

Your email address will not be published. Required fields are marked *