How to evict cache in Embedded topology?

122 views
Skip to first unread message

skaaa...@gmail.com

unread,
Jun 28, 2017, 12:41:40 PM6/28/17
to Hazelcast
Hi,

I have setup Hazelcast embedded topology and each of node have REST api to evict the cache.

I'm currently stuck on building Evict all cache button which will evict all cache from all member in cluster.

Question is, Do I have to call to my REST api to evict cache in each and every node in cluster when user click on button? or have better solution to evict all caches.


Thank in advanced!

dsukho...@gmail.com

unread,
Jun 28, 2017, 7:23:31 PM6/28/17
to Hazelcast
I'm not sure about the REST interface, I never tried it to do something with maps. But when evict invoked on a map from any node it causes the whole map eviction. Hope the same is true when it is done via REST.

HTH, Denis.

te...@hazelcast.com

unread,
Jun 30, 2017, 12:16:07 PM6/30/17
to Hazelcast
Starting with Hazelcast 3.7, Hazelcast Map uses a new eviction mechanism which is based on the sampling of entries.

The resulting eviction is the same regardless of API invocation / java/rest/jmx

Ahmet Mircik

unread,
Jul 3, 2017, 4:08:12 AM7/3/17
to Hazelcast
Hi Korrawit,

Normally, calling IMap#evictAll from a single node should be sufficient to evict all items from IMap. No need to call it from all nodes.

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+unsubscribe@googlegroups.com.
To post to this group, send email to haze...@googlegroups.com.
Visit this group at https://groups.google.com/group/hazelcast.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/3641addd-b989-4c5e-89b9-527ad63432f5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages