ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Scherbakov <alexey.scherbak...@gmail.com>
Subject Re: [DISCUSS] Add flag methods to ClusterState enum
Date Wed, 10 Jun 2020 18:05:55 GMT
Sergey Antonov,

The proposal looks good to me.
Use of org.apache.ignite.cluster.ClusterState#active adds a
boilerplate code (a lot of static imports) and does an unnecessary state
check.




ср, 10 июн. 2020 г. в 19:02, Pavel Tupitsyn <ptupitsyn@apache.org>:

> Sergey,
>
> I disagree - looks weird.
> We have lots of enums, is this one special in some way?
>
> Thanks,
> Pavel
>
> On Wed, Jun 10, 2020 at 6:58 PM Sergey Antonov <antonovsergey93@gmail.com>
> wrote:
>
> > Igniters, I'd like to propose a small improvement in ClusterState class.
> I
> > want to remove the static method boolean ClusterState#active and add
> > methods to the enum:
> >
> >    - boolean active()
> >    - boolean readOnly()
> >    - boolean inactive()
> >
> > From my point of view these methods more useful than comparing with
> > specific enum's value.
> >
> > I'm going to do that on the ticket [1].
> >
> > Any objections?
> >
> > [1] https://issues.apache.org/jira/browse/IGNITE-13144
> > --
> > BR, Sergey Antonov
> >
>


-- 

Best regards,
Alexei Scherbakov

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