Hello!

You can always do Ingnition.getOrStart(), it will be an effective singleton.
Same with getOrCreateCache().
Keeping an instance might be slightly faster but that should not be very
important.

However, if you have more than one node you better keep explicit references
to them to avoid talking to wrong instance.

Regards,
-- 
Ilya Kasnacheev


ср, 9 янв. 2019 г. в 01:01, javadevmtl <[email protected]>:

> I understand that Ignite and IgniteCache are thread safe...
>
> When I create my instance of Ignite is it better to instantiate multiple
> instances of both Ignite and IgniteCache or is it better to build them
> through a singleton?
>
> So far it doesn't seem to matter and it's easier to Ingnition.getOrStart()
> then to try to synchronize the creation of the grid instance. Also as an
> additional note Ignite is started as client only node...
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Reply via email to