ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "HEWA WIDANA GAMAGE, SUBASH" <Subash.HewaWidanaGam...@fmr.com>
Subject RE: Can Ignite.getOrCreateCache(CacheConfiguration) return null ?
Date Wed, 29 Aug 2018 14:54:41 GMT
Sorry, my bad. Here’s the method. Basically I am directly invoking the Ignition.ignite()
with expiry policy.

public static <K, V> Cache<K, V> getOrCreateCache(String name, Factory factory)
    CacheConfiguration<K, V> cc = newCacheConfig(name);
    return Ignition.ignite().<K, V>getOrCreateCache(cc);

From: Denis Mekhanikov [mailto:dmekhanikov@gmail.com]
Sent: Wednesday, August 29, 2018 10:37 AM
To: user@ignite.apache.org
Subject: Re: Can Ignite.getOrCreateCache(CacheConfiguration) return null ?

This email is from an external source - exercise caution regarding links and attachments.
Please visit cybersecurity.fmr.com/phishing/ to learn more.

What does the getOrCreateCache method do internally?


ср, 29 авг. 2018 г. в 5:52, HEWA WIDANA GAMAGE, SUBASH <Subash.HewaWidanaGamage@fmr.com<mailto:Subash.HewaWidanaGamage@fmr.com>>:
Hi all,
Is there any possibility for this to happen ? We’re using Ignite 1.9.0

Following is the code we use to obtain the cache. And we call this line for every cache operation(unintentionally),
but wanted to know if following line can return a null cache instance under any circumstance.

Cache<String, String> cache = getOrCreateCache(CACHE_NAME,CreatedExpiryPolicy.factoryOf(new
Duration(TimeUnit.SECONDS, 300)));

View raw message