Hi Bastien,

Ignore provides the ability to have distributed data structure. And in your
case an atomic long would work as a distributed counter.

For more info https://apacheignite.readme.io/docs/atomic-types


Regards,
Srikanta

On Wed, 26 Aug 2020, 12:24 pm Bastien Durel, <[email protected]> wrote:

> Hello,
>
> I whish to know if there is a supported way to implement some kind of
> shared counter in ignite, where any node could increment or decrement a
> value, which would be decremented automatically if a node is leaving
> the cluster ?
> I know I can use an AtomicInteger but there will be no decrement on
> exit, i guess ?
>
> Should I use a cache with <node_id, counter> (summing all counters) and
> manually evict rows when I get a EVT_NODE_FAILED/EVT_NODE_LEFT event,
> or is there a better way ?
>
> Thanks,
>
> --
> Bastien Durel
> DATA
> Intégration des données de l'entreprise,
> Systèmes d'information décisionnels.
>
> [email protected]
> tel : +33 (0) 1 57 19 59 28
> fax : +33 (0) 1 57 19 59 73
> 12 avenue Raspail, 94250 GENTILLY France
> www.data.fr
>
>

Reply via email to