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.
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