Hazelcast equcalent for Coherence local cache

大城市里の小女人 提交于 2019-12-02 15:57:46

问题


Actualy we are migrating from Coherence to Hazelcast.

In Coherence we use a local cache like this:

    <cache-mapping>
        <cache-name>INFOHUB_PROGNOSE_DATENSATZ_LOCAL</cache-name>
        <scheme-name>default-local</scheme-name>
    </cache-mapping>

    <local-scheme>
        <scheme-name>default-local</scheme-name>
    </local-scheme>

Because in coherence are local caches perm mutch better than distributed.

Is there an equvalent in Hazelcast? Something like force Hazelcast to have the cache just in the local JVM.

A plain java map is no alternative, because of all the great features like eviction that an IMap offers.


回答1:


Hazelcast's IMap's is intended to be distributed not local. You can use near-cache to keep a subset (even 100%) in the current JVM, but that's more like a materialized view.

However, you can have more than one Hazelcast instance in the same JVM. So you could have a Hazelcast server instance in your JVM with networking turned off. This would provide "distributed" IMap but only distributed across that one, so effectively local.



来源:https://stackoverflow.com/questions/50151418/hazelcast-equcalent-for-coherence-local-cache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!