Java Performance Tuning

Java(TM) - see bottom of page

|home |services |training |newsletter |tuning tips |tool reports |articles |resources |about us |site map |contact us |
Tools: | GC log analysers| Multi-tenancy tools| Books| SizeOf| Thread analysers| Heap dump analysers|

Our valued sponsors who help make this site possible
JProfiler: Get rid of your performance problems and memory leaks! 

Training online: Concurrency, Threading, GC, Advanced Java and more ... 

News January 2024

JProfiler
Get rid of your performance problems and memory leaks!

Modern Garbage Collection Tuning
Shows tuning flow chart for GC tuning


Java Performance Training Courses
COURSES AVAILABLE NOW. We can provide training courses to handle all your Java performance needs

Java Performance Tuning, 2nd ed
The classic and most comprehensive book on tuning Java

Java Performance Tuning Newsletter
Your source of Java performance news. Subscribe now!
Enter email:


Training online
Threading Essentials course


JProfiler
Get rid of your performance problems and memory leaks!


Back to newsletter 278 contents

In last month's newsletter I explained how eventual consistency and strict consistency differ. The concept usually applies to data store consistency, but one of my readers asked whether there were examples where these apply in common Java code. Any synchronized method provides strict consistency. The Hashtable class is a good example of a strictly consistent class.

For a good common example of eventual consistency, an example is the related hash map ConcurrentHashMap. It has aggregate status methods, eg size(), isEmpty(), containsValue(), which are all eventually consistent. That is, a concurrent update may have completed in another thread but these methods would not necessarily return the global state at that time. Hashtable.size() always returns the size corresponding to the last update from any thread that completed on the map (strictly consistent); ConcurrentHashMap.size() is usually accurate except when a concurrent update has recently completed on another thread (eventually consistent).

(For precisionists, ConcurrentHashmap.size() is actually an estimate rather than eventually consistent because the value returned is not necessarily one that was ever correct, whereas an eventually consistent value would have definitely been correct at some point. But I think it's a good enough example). Now on to all the usual newsletter list of links, tips, tools, news and articles, and as usual I've extracted all the tips into this month's tips page

A note from this newsletter's sponsor

JProfiler
Get rid of your performance problems and memory leaks!

News

Java performance tuning related news

Tools

Java performance tuning related tools

Articles

Jack Shirazi


Back to newsletter 278 contents


Last Updated: 2024-01-29
Copyright © 2000-2024 Fasterj.com. All Rights Reserved.
All trademarks and registered trademarks appearing on JavaPerformanceTuning.com are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. JavaPerformanceTuning.com is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
URL: http://www.JavaPerformanceTuning.com/news/news278.shtml
RSS Feed: http://www.JavaPerformanceTuning.com/newsletters.rss
Trouble with this page? Please contact us