Forums Register Login

Hashtable vs Hashmap for Locking

+Pie Number of slices to send: Send
Hi Everybody
I have a doubt regarding choice for Hashtable or synchronized(new Hashmap()) in Locking.
Both have some advantages as well as disadvantages
Hashtable is already synchronized but its a bit slow.
On the other hand Hashmap needs to be synchronized though its very fast.
Pls guide me as which one should i use in FBN project ?
+Pie Number of slices to send: Send
 

Originally posted by amitplace:
I have a doubt regarding choice for Hashtable or synchronized(new Hashmap()) in Locking.

I don't The answer is, as far as I'm concerned, "neither". Look carefully at the algorithms you are going to use when locking and unlocking records and ask yourself: is a pre-synchronized data structure going to do the job, or do you need to do your own synchronization?
- Peter
+Pie Number of slices to send: Send
amitplace
Welcome to Javaranch. We follow certain conventions with respect to the User name as given in the document here .
Your user name does not follow these conventions. Please re-register with a name following these conventions.
Thanks.
[This message has been edited by Rahul Mahindrakar (edited August 13, 2001).]
Put the moon back where you found it! We need it for tides and poetry and stuff. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 581 times.
Similar Threads
Hashtable or HashMap
Hashtable vs HashMap
WeakHashMap
Locking problem
why hashmap allows only 1 null value..?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 22:23:15.