FastHashMap – a map for multithreaded environment

when we need a map kind of object, there are several options. while working with threads, there arises an issue, we are going for HashTable. When we use Hashtable, one thread has to wait with some other thread is playing with the map, which is unnecessary. One of my team mate had used some classes from beanutils for someother purpose. when going thro the API of the commons-beanutils before adding it to classpath (lazy fundoo, havnt looked at this api before!), I found org.apache.commons.collections.FastHashMap.

It has a field called ‘
fast' which decides the read property of the map. If the map is at fast mode, then read occurs concurrently, which will increase our reading capability. as the definition says, we can enable or disable fast mode. I havnt tested this. need to do it.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s