is there a way to check if the Map exists without actually creating it or getting all the instances

1,688 views
Skip to first unread message

Duke Tantiprasut

unread,
Jul 14, 2011, 2:28:50 PM7/14/11
to haze...@googlegroups.com
Hi Guys,

Is there a way to check if an IMap exists without doing a get and
potentially creating it? Using Hazelcast.getInstances() just to check
if a map already exists is pretty expensive.

THanks
Duke
This message contains confidential information and is intended only for the individual named. If you are not the named addressee, any delivery, disclosure, dissemination or distribution of this e-mail is unlawful and strictly prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmissions cannot be guaranteed to be secure or without error, as information could be intercepted, corrupted, lost, destroyed, arrive late, be incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which errors or omissions arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. (genE-dct1)

Fuad Malikov

unread,
Jul 15, 2011, 3:59:26 AM7/15/11
to haze...@googlegroups.com
Hi Duke,

Iterating over Hazelcast.getInstances() is the only way for now. Why do you think it is expensive?

Fuad


--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To post to this group, send email to haze...@googlegroups.com.
To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.




--
Fuad Malikov
+90.538.378.9777
http://twitter.com/fuadm


Duke

unread,
Jul 15, 2011, 11:55:03 AM7/15/11
to Hazelcast
We have many map instances. Several IMap instances are create for each
"process" execution and we have a lot of these.

Do you guys recommend that we have less maps and aggregate them as
much as possible?

Fuad Malikov

unread,
Jul 16, 2011, 5:26:17 PM7/16/11
to haze...@googlegroups.com
It shouldn't matter that much. Less map is better for managing things, but that's ok.

Hazelcast.getInstances() is a local operation, so should be faster than any distributed operation.

Fuad
Reply all
Reply to author
Forward
0 new messages