Yes, that true in most cases unless you try to call the queue method with a different collection configuration.

In such case, an exception will be thrown.

 

From: Narsi Reddy Nallamilli
Sent: Friday, November 15, 2019 10:47 AM
To: [email protected]
Subject: Re: query if queue exist and get it like getOrCreateCache

 

Thank you Mikael.

 

On Thu, Nov 14, 2019 at 7:05 PM Mikael <[email protected]> wrote:

Hi!

If there is a queue created already with the name "abc" it will just return that queue, if it cannot find it and you have included a configuration it will create it.

Mikael

Den 2019-11-14 kl. 13:30, skrev Narsi Reddy Nallamilli:

Hi Mikael,

 

Do you mean the 4th statement will not create new Queue? and would point to ig

CollectionConfiguration colCfg = new CollectionConfiguration();
colCfg.setCollocated(true);
IgniteQueue<Object> ig = ignite.queue("abc",0,colCfg);
IgniteQueue<Object> ig1 = ignite.queue("abc",0,colCfg);

 

 

On Thu, Nov 14, 2019 at 5:42 PM Mikael <[email protected]> wrote:

What is wrong with Ignite.queue() ?

queue(String name, int cap, CollectionConfiguration cfg)

Will get a named queue from cache and create one if it has not been created yet and cfg is not null.

 

Mikael

 

Den 2019-11-14 kl. 13:02, skrev Narsi Reddy Nallamilli:

Hi!

 

I am looking for some method just like getOrCreateCache available for queue. Any help!

 

Reply via email to