Search code examples
ignite

Event triggering once across all cache


Hi I'm newbie in ignite.

In my case, I use three caches

I wanna knew when rebalancing is occured, so I registered event listener.

but because I have three caches, so listener triggered 3times when new node joined or node left.

can I triggering only once? I mean, I wanna trigger rebalancing event once across all caches.


Solution

  • Unfortunately, CacheRebalancingEvent does not contain topologyVersion so your best shot is comparing ((CacheRebalancingEvent)event).discoveryTimestamp(). If they're equal, you can reasonably expect that it's the same rebalancing.