I have an Akka actor system where a set of partitioned caches is created in the "main thread" and these caches are used in actors for various purposes. The close() method on a cache is currently implemented to destroy a cache and its contents but there is a separate destroyCache() method if you want to achieve that. You can use getOrCreateCache() method to create a cache if it doesn't exist or get it if it does - the setClientMode() thing is separate. I create my grid cluster by running ignite.sh with an xml config file on each machine - regardless of whether there is a cache client running or not - the grid is permanent this way.
On Wed, Jun 17, 2015 at 10:53 AM, Nam-Luc Tran <[email protected]> wrote: > Hello Everyone, > > I would like to achieve the following system: a main thread creates and > initializes an Ignite data grid. Multiple child threads are created and > each have to access the grid created on the main thread. In order to > achieve this I thought of the following: > - An ignite grid is created on the main thread with parametrized cache > configurations > - The child threads initialize the same cache grid configurations but in > client mode (setClientMode(true)). > > > My questions are: > > 1/ Is this the right way of achieving the desired behaviour using Ignite? > 2/ The child thread might be stopped without going though a cleanup > method. Doing this will leave the client grid running and the process won't > terminate. Is there a way to close the grid started on the child threads > from the main thread, or a way to systematically close all the running > grids? > > Thank you and best regards, > > Tran Nam-Luc > >
