0

Is it possible to run embedded infinispan with non-clustered mode?

I have searched alot but could not find support for SimpleCache with EmbeddedCacheManager.

Is there a way to run embedded infinispan with local mode?

webbed
  • 21
  • 3

1 Answers1

1

have you checked this part of the documentation? It might be what you need. http://infinispan.org/docs/stable/user_guide/user_guide.html#which_cache_mode_should_i_use http://infinispan.org/docs/stable/user_guide/user_guide.html#simple_cache http://blog.infinispan.org/2015/09/simple-cache.html

karesti
  • 328
  • 1
  • 5
  • Yes, I have gone through all 3 links. It is mentioned in 3rd link that Simple cache is not compatible with embedded and server modes and it also does not support persistence, which is required in my case as I have to deal with large data. I want to run embedded infinispan without any cluster node i.e. in local mode, but DefaultCacheManager by default creates cluster node on cache start. see start API : https://www.javatips.net/api/infinispan-master/core/src/main/java/org/infinispan/manager/DefaultCacheManager.java – webbed Feb 07 '18 at 10:13
  • By default, the cluster mode in the configuration is LOCAL, which means there is no cluster. `DefaultCacheManager cacheManager = new DefaultCacheManager(); cacheManager.defineConfiguration("toto", new ConfigurationBuilder().build()); Cache totoCache = cacheManager.getCache("toto"); totoCache.put("k", "v"); System.out.println(totoCache.get("k")); cacheManager.stop();` – karesti Feb 08 '18 at 16:38