DiscoverySpi#setDataExchange returns concrete implementation

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

DiscoverySpi#setDataExchange returns concrete implementation

Nikolay Izhikov
Hello, guys.

public interface DiscoverySpi extends IgniteSpi {
....
    TcpDiscoverySpi setDataExchange(DiscoverySpiDataExchange var1);

    TcpDiscoverySpi setMetricsProvider(DiscoveryMetricsProvider var1);
...
}

Two methods of DiscoverySpi returns concrete implementation.
I think we should return interface, not implementation from this methods
Or why we need an interface?

I can provide simple patch to fix this issue.

--
Nikolay Izhikov
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: DiscoverySpi#setDataExchange returns concrete implementation

yzhdanov
Hi Nick! Good catch. Please go ahead and submit a patch.

--Yakov

2017-05-26 13:09 GMT+03:00 Николай Ижиков <[hidden email]>:

> Hello, guys.
>
> public interface DiscoverySpi extends IgniteSpi {
> ....
>     TcpDiscoverySpi setDataExchange(DiscoverySpiDataExchange var1);
>
>     TcpDiscoverySpi setMetricsProvider(DiscoveryMetricsProvider var1);
> ...
> }
>
> Two methods of DiscoverySpi returns concrete implementation.
> I think we should return interface, not implementation from this methods
> Or why we need an interface?
>
> I can provide simple patch to fix this issue.
>
> --
> Nikolay Izhikov
> [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

Re: DiscoverySpi#setDataExchange returns concrete implementation

Nikolay Izhikov
Hello. Here is pull request for this issue:

https://github.com/apache/ignite/pull/2022

2017-05-26 13:16 GMT+03:00 Yakov Zhdanov <[hidden email]>:

> Hi Nick! Good catch. Please go ahead and submit a patch.
>
> --Yakov
>
> 2017-05-26 13:09 GMT+03:00 Николай Ижиков <[hidden email]>:
>
> > Hello, guys.
> >
> > public interface DiscoverySpi extends IgniteSpi {
> > ....
> >     TcpDiscoverySpi setDataExchange(DiscoverySpiDataExchange var1);
> >
> >     TcpDiscoverySpi setMetricsProvider(DiscoveryMetricsProvider var1);
> > ...
> > }
> >
> > Two methods of DiscoverySpi returns concrete implementation.
> > I think we should return interface, not implementation from this methods
> > Or why we need an interface?
> >
> > I can provide simple patch to fix this issue.
> >
> > --
> > Nikolay Izhikov
> > [hidden email]
> >
>



--
Nikolay Izhikov
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: DiscoverySpi#setDataExchange returns concrete implementation

yzhdanov
Merged. Thanks for contribution, Nick. Please also see my edits.

--Yakov

2017-05-28 19:29 GMT+03:00 Николай Ижиков <[hidden email]>:

> Hello. Here is pull request for this issue:
>
> https://github.com/apache/ignite/pull/2022
>
> 2017-05-26 13:16 GMT+03:00 Yakov Zhdanov <[hidden email]>:
>
> > Hi Nick! Good catch. Please go ahead and submit a patch.
> >
> > --Yakov
> >
> > 2017-05-26 13:09 GMT+03:00 Николай Ижиков <[hidden email]>:
> >
> > > Hello, guys.
> > >
> > > public interface DiscoverySpi extends IgniteSpi {
> > > ....
> > >     TcpDiscoverySpi setDataExchange(DiscoverySpiDataExchange var1);
> > >
> > >     TcpDiscoverySpi setMetricsProvider(DiscoveryMetricsProvider var1);
> > > ...
> > > }
> > >
> > > Two methods of DiscoverySpi returns concrete implementation.
> > > I think we should return interface, not implementation from this
> methods
> > > Or why we need an interface?
> > >
> > > I can provide simple patch to fix this issue.
> > >
> > > --
> > > Nikolay Izhikov
> > > [hidden email]
> > >
> >
>
>
>
> --
> Nikolay Izhikov
> [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

Re: DiscoverySpi#setDataExchange returns concrete implementation

Nikolay Izhikov
Thanks Yakov.

I moved IGNITE-5321 to resolved state.
Is that right?

2017-05-29 17:24 GMT+03:00 Yakov Zhdanov <[hidden email]>:

> Merged. Thanks for contribution, Nick. Please also see my edits.
>
> --Yakov
>
> 2017-05-28 19:29 GMT+03:00 Николай Ижиков <[hidden email]>:
>
> > Hello. Here is pull request for this issue:
> >
> > https://github.com/apache/ignite/pull/2022
> >
> > 2017-05-26 13:16 GMT+03:00 Yakov Zhdanov <[hidden email]>:
> >
> > > Hi Nick! Good catch. Please go ahead and submit a patch.
> > >
> > > --Yakov
> > >
> > > 2017-05-26 13:09 GMT+03:00 Николай Ижиков <[hidden email]>:
> > >
> > > > Hello, guys.
> > > >
> > > > public interface DiscoverySpi extends IgniteSpi {
> > > > ....
> > > >     TcpDiscoverySpi setDataExchange(DiscoverySpiDataExchange var1);
> > > >
> > > >     TcpDiscoverySpi setMetricsProvider(DiscoveryMetricsProvider
> var1);
> > > > ...
> > > > }
> > > >
> > > > Two methods of DiscoverySpi returns concrete implementation.
> > > > I think we should return interface, not implementation from this
> > methods
> > > > Or why we need an interface?
> > > >
> > > > I can provide simple patch to fix this issue.
> > > >
> > > > --
> > > > Nikolay Izhikov
> > > > [hidden email]
> > > >
> > >
> >
> >
> >
> > --
> > Nikolay Izhikov
> > [hidden email]
> >
>



--
Nikolay Izhikov
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: DiscoverySpi#setDataExchange returns concrete implementation

yzhdanov
yes

--Yakov

2017-05-29 17:30 GMT+03:00 Николай Ижиков <[hidden email]>:

> Thanks Yakov.
>
> I moved IGNITE-5321 to resolved state.
> Is that right?
>
> 2017-05-29 17:24 GMT+03:00 Yakov Zhdanov <[hidden email]>:
>
> > Merged. Thanks for contribution, Nick. Please also see my edits.
> >
> > --Yakov
> >
> > 2017-05-28 19:29 GMT+03:00 Николай Ижиков <[hidden email]>:
> >
> > > Hello. Here is pull request for this issue:
> > >
> > > https://github.com/apache/ignite/pull/2022
> > >
> > > 2017-05-26 13:16 GMT+03:00 Yakov Zhdanov <[hidden email]>:
> > >
> > > > Hi Nick! Good catch. Please go ahead and submit a patch.
> > > >
> > > > --Yakov
> > > >
> > > > 2017-05-26 13:09 GMT+03:00 Николай Ижиков <[hidden email]>:
> > > >
> > > > > Hello, guys.
> > > > >
> > > > > public interface DiscoverySpi extends IgniteSpi {
> > > > > ....
> > > > >     TcpDiscoverySpi setDataExchange(DiscoverySpiDataExchange
> var1);
> > > > >
> > > > >     TcpDiscoverySpi setMetricsProvider(DiscoveryMetricsProvider
> > var1);
> > > > > ...
> > > > > }
> > > > >
> > > > > Two methods of DiscoverySpi returns concrete implementation.
> > > > > I think we should return interface, not implementation from this
> > > methods
> > > > > Or why we need an interface?
> > > > >
> > > > > I can provide simple patch to fix this issue.
> > > > >
> > > > > --
> > > > > Nikolay Izhikov
> > > > > [hidden email]
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Nikolay Izhikov
> > > [hidden email]
> > >
> >
>
>
>
> --
> Nikolay Izhikov
> [hidden email]
>