0

Question 1 :

I have an existing project where ApacheIgnite Cluster is used. Instead of using Ignite api directly the wrapper class was created that implements most of methods of the Ignite interface. One of the methods is

<K,V> IgniteCache<K,V> getOrCreateCache(String cacheName)
                                 throws javax.cache.CacheException

There are multiple CacheModes in Ignite, REPLICATED and DISTRIBUTED are the most common. When we use this API what's the mode of the created cache? I checked the code and I didn't see any CacheConfiguration objects being created and used.

UPD1 : I checked ApacheIgnite in GitHub

Ignite.getOrCreateCache(String cacheName)

and this method desription is :

Gets existing cache with the given name or creates new one using template configuration.

What's "template configuration" here?

UPD2 : ApacheIgnite tutorial states https://ignite.apache.org/docs/latest/configuring-caches/configuration-overview

In the PARTITIONED mode (default)

so it looks like when CacheConfiguration is not used and there is no Ignite.xml in the classpath Ignite Api creates PARTITIONED cache

Question 2 :

When the created cache is REPLICATED cache we have a copy of a cache entry on every server node. When I update that particular cache entry :

void put(K key,V val)

update happens on the specific node and then Cluster replicates it to the remaining nodes. I understand that "put" method creates an implicit lock on that Entry, but is it happening on all the Server Nodes at the same time?

thank you in advance.

vs777
  • 564
  • 2
  • 11
  • 24

0 Answers0