开发者

Caching mechanism cluster environment

开发者 https://www.devze.com 2023-03-04 14:34 出处:网络
If we use a static hash map for caching process in a normal class (Not a singel开发者_JS百科ton class)will it work in cluster environment?A static field\'s value is stored in the memory of the JVM, an

If we use a static hash map for caching process in a normal class (Not a singel开发者_JS百科ton class) will it work in cluster environment?


A static field's value is stored in the memory of the JVM, and each JVM will thus have its own static map. This can be OK, unless you want a unique cache for all the members of the cluster.


Seems like you're writing the requirements for a framework like Terracotta : http://terracotta.org/documentation/product-documentation-1page

You're talking about JVM memory sharing

0

精彩评论

暂无评论...
验证码 换一张
取 消