You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Alexey Kuznetsov <ak...@gridgain.com> on 2015/04/16 06:01:28 UTC
ClusterGroup is missing isEmpty() method.
Hi!
Recently I have to write a lot of code involving *ClusterGroup*
manipulations.
And found my self that I missed *isEmpty()* method on *ClusterGroup* class.
Instead I forced to write *prj.nodes().isEmpty().*
Also I think that *isEmpty()* method could be implemented in more
efficient (no need to iterate over all nodes) and optimized manner, without
creating underlying collection for nodes.
Thoughts?
--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com
Re: ClusterGroup is missing isEmpty() method.
Posted by Alexey Kuznetsov <ak...@gridgain.com>.
It seems that we have method node() that do the trick.
But it is implemented not optimal (will create collection of nodes and take
first one) as F.first(nodes());
On Thu, Apr 16, 2015 at 11:01 AM, Alexey Kuznetsov <ak...@gridgain.com>
wrote:
> Hi!
>
> Recently I have to write a lot of code involving *ClusterGroup*
> manipulations.
> And found my self that I missed *isEmpty()* method on *ClusterGroup*
> class.
> Instead I forced to write *prj.nodes().isEmpty().*
>
> Also I think that *isEmpty()* method could be implemented in more
> efficient (no need to iterate over all nodes) and optimized manner, without
> creating underlying collection for nodes.
>
>
> Thoughts?
>
> --
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com
>
--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com