Reputation: 591
I'm going to "upgrade" my standalone cache to a clustered one. Until now I had the possibility to add Properties
to my ConfigurationBuilder as following.
Properties properties = new Properties();
properties.put( "default.indexwriter.max_merge_docs", "10000" );
properties.put( "default.indexwriter.ram_buffer_size", "500" );
properties.put( "default.directory_provider", "ram" );
properties.put( "default.indexmanager", "near-real-time" );
Configuration configuration = new ConfigurationBuilder().withProperties( properties ).connectionPool().addServer().host( "localhost" ).port( 11322 ).addServer().host( "localhost" ).port( 11422 ).build();
But when I'm trying to create a configuration for a RemoteCacheManager
these properties won't apply and all my records are written to disk.
My question is where can I add these properties. I looked through my server-configuration-file but I did not found the right place to put these informations.
Thank you for your help.
Upvotes: 1
Views: 89
Reputation: 5197
The RemoteCacheManager properties are just for configuring the client side behaviour. If running the server, these properties need to be added in the standalone/configuration/standalone.xml
file. More precisely, look for the cache-container
entry which is default, and then take the cache name with which you are interacting, or default, and add the properties within an element as per the XSD in your server distribution, in docs/schema/jboss-infinispan-core_X_0.xsd
file. Look at the Server Guide for more information on how to use Infinispan Servers.
Btw, RemoteCacheManager is just for using a cache remotely. If you want to use a clustered cache, you can still use the same embedded DefaultCacheManager you used before. You just need to start multiple JVMs with a clustered configuration and they should find each other.
Upvotes: 1