• Post Reply Bookmark Topic Watch Topic
  • New Topic

Collection classes that support segmenting the collection  RSS feed

 
Chan Ag
Rancher
Posts: 1090
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to read and know about Collection classes that minimize the need for synchronization by segmenting the collection. I've already searched for 'Thread Aware classes' in google but the links I got point me to how we can create our own Thread safe classes ( atomic types ).

I have searched for various String combinations in google such as 'collection classes that segment the collection', 'segmenting the collection', 'collection segments' but haven't found anything useful. Are there such collection classes in Java already which support segmenting a collection type? Would you have the name of these classes so I can look them up?

Thanks,
Chan.

EDIT : I do not know if this is an internal implementation detail. I'd like to believe that we can create our own segments in our collection but I do not know.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The place to start looking is java.util.concurrent. I am not really sure what you mean by 'segmenting the collection' but if you mean provide different buckets for items to allow safe concurrent access to each bucket, then I think ConcurrentHashMap is the closest I would know of.
 
Chan Ag
Rancher
Posts: 1090
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but if you mean provide different buckets for items to allow safe concurrent access to each bucket,


Yes, that is what I am looking for. Thanks so much, Steve.

I will read about ConcurrentHashMap.

Thanks,
Chan.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!