简体   繁体   English

如何在创建Infinispan缓存设置后更改?

[英]How to change Infinispan cache settings after it is created?

In my application i'm using Infinispan 5.3 version and I want to change setting after cache is initialized. 在我的应用程序中,我正在使用Infinispan 5.3版本,我想在初始化缓存后更改设置。 Default settings will be loaded from xml file and some of the settings ( ex : eviction maxEntries, lifespan, etc ) should be able to change any time of application running (This is changed by sysadmin). 默认设置将从xml文件加载,并且一些设置(例如:eviction maxEntries,lifespan等)应该能够在应用程序运行的任何时间更改(这由sysadmin更改)。 Is there way to changed settings of already created cache ? 有没有办法改变已经创建的缓存的设置?

I tried EmbeddedCacheManager.defineConfiguration(String cacheName, Configuration configurationOverride); 我试过EmbeddedCacheManager.defineConfiguration(String cacheName, Configuration configurationOverride); but this has no effect on already created cache. 但这对已创建的缓存没有影响。

Please, take into account that in the Infinispan version 5.3 there is no possibility to change cache configuration "on the fly". 请注意,在Infinispan 5.3版本中,无法“动态”更改缓存配置。 You need to restart your service with new configuration in case of any wanted change. 如果需要更改,您需要使用新配置重新启动服务。

This is something the community might want to work on in the future. 这是社区可能希望将来开展的工作。 However, such a task is not easy because you need to figure out how to correctly deal with affected data immediately after the configuration change. 但是,这样的任务并不容易,因为您需要弄清楚如何在配置更改后立即正确处理受影响的数据。

Feel free to raise new feature request: https://issues.jboss.org/browse/ISPN/ 随意提出新功能请求: https//issues.jboss.org/browse/ISPN/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM