ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Goncharuk <alexey.goncha...@gmail.com>
Subject Re: fastest way to check if backup
Date Mon, 09 Feb 2015 22:54:58 GMT
I do not see how we can avoid iteration in a general case because cache can
have more than one backup. But I think it makes sense to create a separate
method which will not use views and will start iteration from the second
element of nodes collection (which is always an ArrayList).

2015-02-07 3:36 GMT-08:00 Yakov Zhdanov <yzhdanov@apache.org>:

> Guys,
>
> cctx.affinity().backups(entry.key(),
> cctx.topology().topologyVersion()).contains(cctx.localNode())
>
> does not seem to be fast enough.
>
> cctx.affinity().backups() returns F.view() over ArrayList with excluded
> first element which always ends up into an iteration.
>
> Alex G, thoughts?
>
> --Yakov
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message