Hashtable « synchronize « Java Thread Q&A

Home
Java Thread Q&A
1.concurrency
2.Development
3.Exception
4.Notify
5.Operation
6.Socket
7.State
8.synchronize
9.Thread Safe
10.ThreadPool
Java Thread Q&A » synchronize » Hashtable 

1. hashtable Synchronization    stackoverflow.com

is whole Hashtable object is syncronized? I Know,Get and Put methods are synchronized. Is it mean, each entries in the Hashtable are synchronized? If i have a hash object hsObj, and have 3 key-value ...

2. What does it mean when we say Hashtable or Vector is synchronized?    stackoverflow.com

The questions says it all, just wondering, in an interview, what would you say when they ask you, "What does it practically mean by Hashtable or Vectors being synchronized?"

3. What can we do about java.util.Calendar constructor synchronizing on a static Hashtable?    stackoverflow.com

I was horrified to see many of our app threads competing to synchronize on a java.util.Hashtable.get(xx) method that gets accessed from the Calendar's constructor.

at java.util.Hashtable.get(java.lang.Object)
at java.util.Calendar.setWeekCountData(java.util.Locale)
at java.util.Calendar.<init>(java.util.TimeZone, java.util.Locale)
at java.util.GregorianCalendar.<init>(java.util.TimeZone, java.util.Locale)
The ctor ...

4. Hashtable and HashMap Synchronization    coderanch.com

5. Hashtables are synchronized...    coderanch.com

6. HashTable Synchronized    coderanch.com

7. Synchronized HashMap Vs Hashtable    coderanch.com

10. Synchronized hashMap V/s HashTable    forums.oracle.com

According to the java tutorial, since the introduction of JCF and the Map interface, Hashtables are only there for legacy reasons. I'd stick to the synchronized hashmap, even if it's has worse performance (which I don't think it does). Also, the code between the two classes is almost identical - The only difference being Hashtables have synchronized methods, where are synchronized ...

11. synchronized methods, vector and hashtable    forums.oracle.com

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.