reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergiy Matusevych <sergiy.matusev...@gmail.com>
Subject Re: Tang question
Date Tue, 19 Jun 2018 18:43:44 GMT
Yes, this is very confusing indeed. E.g. in
org.apache.reef.driver.task.TaskConfiguration we bind some implementations
using .bindImplementation(), and others using .bindNamedParameter().

P.S. Quick search over java code base shows that there are only a few
places where we use .bindNamedParameter() to bind the implementation. It
shouldn't be too hard to fix it.

Thank you,
Sergiy.

On Tue, Jun 19, 2018 at 11:26 AM Tyson Condie <tcondie.apache@gmail.com>
wrote:

> Hi,
>
> I came across an interface signature that did not make sense to me. In
> ConfigurationModuleBuilder (Tang), the bindNamedParameter methods allow
> bindings to Impl:
>
> public final <T> ConfigurationModuleBuilder bindNamedParameter(
>     final Class<? extends Name<T>> iface, final Impl<? extends T> opt)
{
>
> I have solely be using bindImplementation for such bindings, and would
> assume that bindNamedParameter should (in concert) only allow bindings to
> Param.
>
> Could someone please explain why bindNamedParameter allows bindings to Impl
> implementations? Also, It looks like bindImplementation (correctly) does
> not include a method to bind to Param implementations.
>
> Thanks,
> Tyson
>
> p.s., Rusty I Bcc'ed you in case you didn't want the email I had for you
> out in the open.
>

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