mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maarten Bosteels" <mbosteels....@gmail.com>
Subject Re: connect timeout
Date Tue, 05 Feb 2008 10:53:00 GMT
On Feb 5, 2008 11:07 AM, Emmanuel Lecharny <elecharny@gmail.com> wrote:

> Maarten Bosteels wrote:
> >>
> >
> > I agree that nobody will pass in hours or days, but IMHO  it improves
> > readability a lot:
> >
> > connector.setConnectTimeout(250, TimeUnit.MILLISECONDS);
> > or
> > connector.setConnectTimeout(250);
> >
> > Especially when one is changing the API from seconds to millis, we
> should
> > try to make
> > it unambiguous and it's inline with a lot of the java.util.concurrentAPI.
> >
> The problem with changing the method parameters semantic is that it does
> not align anymore with the underlying semantic of the select( timeout )
> method :
>
>
>      select
>
> public abstract int *select*(long timeout)
>                    throws IOException <
> http://java.sun.com/j2se/1.4.2/docs/api/java/io/IOException.html>
>
> ...
>
> *Parameters:*
>    |timeout| - If positive, block for up to timeout milliseconds, more
>    or less...
>
> The method should use milliseconds, no need to be explicit with that,
> IMHO. I agree with Julien on that.
>


ok, I can live with that.
But you wouldn't even change the metod name ?
So users who are porting there code from mina 1.x to 2.x
will have to be very careful, or their timeouts will shrink with a factor of
1000.


Maarten

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