Hi Ryan,
the purpose of the HazelcastFactory is to create a pre-configured
hazelcast instance. It could be a singleton, but thanks to the Hazelcast
partition manager and cluster isolation, it's possible to have multiple
Hazelcast instances per JVM (even if we don't use it right now in Cellar).
For the HazelcastGroupManager, it's used for all cluster events (in
collaboration with the HazelcastClusterManager), so it manages several
incoming/outgoing cluster events, and manages several queues (one per
group and per resource (features, bundles, etc)).
I hope it's clear ;)
Ping me on Skype if you want more details.
Regards
JB
On 05/28/2013 03:05 AM, Ryan Moquin wrote:
I noticed that in the cellar-hazelcast blueprint.xml, a factory is used
to instantiate the hazelcast instance. I can see what that would be the
case considering how you have to construct a hazelcast instance. What I
was wonder though, was why the factory is referenced by other components
in the xml to set their instance property? Shouldn't there only be one
instance per jvm? Wouldn't you just reference the service that was
created with the factory? It appears as though the code is only
allowing a single instance to be created via the factory, so I wasn't
sure if I was mistaken or if it was a matter of preference to reference
the factory.
It also made me wonder a little bit since the HazelcastGroupManager
creates a threadpool it looks like and receives what appears to be
duplicate notifications of the local configuration changing. I just
want to make sure I'm understanding correctly. :)
Thanks!
Ryan
--
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com