EhCache 3.8.1 BootstrapCacheLoader

EhCache 3.8.1 BootstrapCacheLoader

我在跨不同模块使用缓存时遇到问题。起初,我使用的是 Ehcache 2.10.6,所以在我的配置 ehcache.xml 文件中我有这样的东西:

<bootstrapCacheLoaderFactory
            class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>

我用它作为 cache.bootstrap();

升级到 3.x 版本 (3.8.1) 后,该版本不可用,我也看不到任何替代品。是否有任何替代方法或其他方法来复制上面的配置?

谢谢。

基于 RMI 的复制已在 Ehcache 3.x 中停止。它在 Ehcache 2.x 中的实现缺乏语义:写入可能会丢失,读取不能保证一致等......

相反,您应该查看 cache clustering with Terracotta