First question
What do you mean by stop sending messages to sync with the non-existing nodes
? Infinispan does not send messages to "nobody" and, if you have a single node, the distributed cache does not send any messages to the network. See code here.
Second question
Yes, if you load your properties in a Properties object, you can do something like this:
Properties props = ... //my properties
ParserRegistry reg = new ParserRegistry(Thread.current.getContextClassLoader(), false, props);
ConfigurationBuilderHolder holder = reg.parse(/*infinispan.xml path or File*/); //check other parse methods
DefaultCacheManager manager = new DefaultCacheManager(holder, true);
Reference the key in your infinispan.xml using ${key}
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…