Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Memory Analyzer (MAT) » Reading values of HashMap(Reading values of HashMap(concurrrent))
Reading values of HashMap [message #532896] Tue, 11 May 2010 13:50 Go to next message
Sudheer Krishna is currently offline Sudheer KrishnaFriend
Messages: 2
Registered: May 2010
Junior Member
Hi,

I have taken a heap dump using jconsole.

But i am not able to see values inside th HashMap present in one of my objects.

How do i use MAT to get teh values ?

Also how do i get values in case of ConcurretnHashmap and lIsts which are synchronised using Java Collections.
Re: Reading values of HashMap [message #533517 is a reply to message #532896] Fri, 14 May 2010 11:41 Go to previous messageGo to next message
Krum Tsvetkov is currently offline Krum TsvetkovFriend
Messages: 149
Registered: July 2009
Senior Member
Hi,

there are several ways to look at content of collections.

- The simplest one is to look at the outbound references of the HashMap object, then go through the HashMap$Entry[] and then inspect each entry individually. This is however not very convenient
- Another way is to use the Hash Entries query: select one or more HashMaps and using the context menu open "Java Collections" -> "Hash Entries". This will give you one column for the keys and one column for the value. It is the more convenient way to look at collections content.

Is none of these working for you?

About ConcurrentHashMap - the Hash Entries query will work only on the individual Segment objects inside the map.

About lists synchronized with Java collections - I have to chek. I can't reply right now.

Regards,
Krum
Re: Reading values of HashMap [message #533607 is a reply to message #533517] Fri, 14 May 2010 17:04 Go to previous message
Sudheer Krishna is currently offline Sudheer KrishnaFriend
Messages: 2
Registered: May 2010
Junior Member
Hi Krum,

Thanks for teh reply.

In my case i had concurrent HashMap and I was not able to get the values.

Is there any demo(with snapshots) or webinar which exactly shows how to get these values as it would be of great help,

I did try googling and also checked the webinar which was quite old,but did not find in it.

Previous Topic:Can't access to svn repo
Next Topic:Memory Analyzer 1.0 Is Released
Goto Forum:
  


Current Time: Sat Dec 20 15:16:47 GMT 2014

Powered by FUDForum. Page generated in 0.10413 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software