java - Ehcache 复制缓存 RMI Bootstrap

标签 java caching replication rmi ehcache

我的问题是关于使用 ehcache 通过 RMI 进行缓存复制的。假设我有 3 台服务器,它们相互复制缓存。在启动时,我想从其他正在运行的实例( Bootstrap )加载缓存。我关心的是这些主题:

  1. 我在所有节点上都有内存缓存。我重新启动一个 node1 并在启动时(我同步引导 - bootstrapAsynchronously=false)我从 node2 加载缓存。如果在缓存完全复制之前 node2 突然关闭,会发生什么情况?复制会从 node3 继续吗(它也加载了它)?
  2. 如果我在异步模式下设置 Bootstrap - 它会抛出一些关于复制已完成且实例已完全加载缓存这一事实的事件吗?

最佳答案

第一部分的答案是缓存不会启动。

参见 http://ehcache.org/documentation/user-guide/rmi-replicated-caching#configuring-bootstrap-from-a-cache-peer :

When a peer comes up, it will be incoherent with other caches. When the bootstrap completes it will be partially coherent. Bootstrap gets the list of keys from a random peer, and then loads those in batches from random peers. If bootstrap fails then the Cache will not start. However if a cache replication operation occurs which is then overwritten by bootstrap there is a chance that the cache could be inconsistent.

关于java - Ehcache 复制缓存 RMI Bootstrap ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19026125/

相关文章:

java - Ehcache搭配tomcat简单例子

mysql 复制 : one master with lots of databases, 两个从站 - 一个用于所有数据库,另一个 - 仅用于其中一个数据库

linux - 保持 Redis 实例的副本同步?

java - 比较 Java 和 GPar

java - 如何指定要传递给 Ant 任务运行的 Java 进程的文件?

java - 异常 : Unexpected end of ZLIB input stream

java - gwt主机中是否需要使用iframe标签?

html - 有长缓存过期 : need to rename background img files as well as css?

mysql - my.ini server-id 变量不会改变

python - Django - 服务器效率的缓存与 QuerySet 过滤器?