Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 088FE200C17 for ; Fri, 10 Feb 2017 20:51:44 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 070FF160B5C; Fri, 10 Feb 2017 19:51:44 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2C432160B4E for ; Fri, 10 Feb 2017 20:51:43 +0100 (CET) Received: (qmail 54720 invoked by uid 500); 10 Feb 2017 19:51:42 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 54708 invoked by uid 99); 10 Feb 2017 19:51:42 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2017 19:51:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9403B186128 for ; Fri, 10 Feb 2017 19:51:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id LEAre0plg4Lh for ; Fri, 10 Feb 2017 19:51:39 +0000 (UTC) Received: from mail-ot0-f170.google.com (mail-ot0-f170.google.com [74.125.82.170]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 439E25F647 for ; Fri, 10 Feb 2017 19:51:39 +0000 (UTC) Received: by mail-ot0-f170.google.com with SMTP id 65so36301673otq.2 for ; Fri, 10 Feb 2017 11:51:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=J7OWFME7pabsRh7tUQXLvyEVrgkluTRiiVGd94zcgZU=; b=DiDCsA/YJmjl5Co6gRW8Tm22LdoVw+bLKz7S5lPnajpoaLslbWiQ1F9QANzFCRbjGb 0JYPL/OaFRCQEycpvf2258D3fAfzX0cliKl9+aDgljRPcjcu4bPnOUkbwZtZptibOjyx poqhBRelzNAh25eG8fX3kiOWOc5jgKpK/HiZQ4ln2ywJqroDIcwTFyIvOAhzW4pSiN86 kgWEgadTn+0tl4yxZedM+wdNSa23+Rns4g5rYD/pS9PsywzowRs9wCxD1eedR+rKd0bs g6sG1FWVeX154jzuMN7mLvAORmrO3O1QS7WjI4PagnQbVxjEAaJKITWrJY8puY7ruUfQ 5VAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=J7OWFME7pabsRh7tUQXLvyEVrgkluTRiiVGd94zcgZU=; b=K4qTaaVK4niotnompHhVjVewhvLCPiSjwnvBrLFucpqxisp3Nj5UuJWiIuk4oBiROl DcTJrPywmeYr0fNkW9vOJd4mOd6Lenq4RqGO0VauARrNnGTreq1DNDhuWLGhmTGoM4Ie +TbOMCUw0uaxUOevOlqmJrBwZ5mRtYM1X6mLe6SNA4s2FVFiA+QkzbuQTz58Fw6nzblA J2xydNEgaZGU1pmUNWsBow9+PY+awxA3f0N/NxR6SKKKq4d89JSiIP+A5iJ8Evwdkf7E Z5k9xKIVp/kS8LkEbjcjgMrs3yfOofvzP+GVT4Itg5hjex+uHbLQ7ymnOhww206u+Awb lbIw== X-Gm-Message-State: AMke39nt5eaU7TXQxkPs2Xz1ZZ71g979/ZxzZaRkbM8i4TXrnYxU8YzcrkQ0ddyxxrDJ1cKa7MQAZqTYiegpLw== X-Received: by 10.157.40.139 with SMTP id s11mr6353964ota.226.1486756295215; Fri, 10 Feb 2017 11:51:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.33.130 with HTTP; Fri, 10 Feb 2017 11:51:34 -0800 (PST) In-Reply-To: <1486721424.7141.3.camel@apache.org> References: <1486673296.7141.1.camel@apache.org> <1486721424.7141.3.camel@apache.org> From: Gary Gregory Date: Fri, 10 Feb 2017 11:51:34 -0800 Message-ID: Subject: Re: SocketConfig (v5) To: HttpComponents Project Content-Type: multipart/alternative; boundary=001a113e3ee6d814400548326cf4 archived-at: Fri, 10 Feb 2017 19:51:44 -0000 --001a113e3ee6d814400548326cf4 Content-Type: text/plain; charset=UTF-8 On Fri, Feb 10, 2017 at 2:10 AM, Oleg Kalnichevski wrote: > On Thu, 2017-02-09 at 14:18 -0800, Gary Gregory wrote: > > On Thu, Feb 9, 2017 at 1:56 PM, Bhowmik, Bindul > com> > > > > ... > > > > How about getSoTimeout(TimeUnit) ? Maybe in addition to > > > getSoTimeoutMillis(). > > > > > > > I'm fine with that. My concern is mostly on the setter side. > > > > Gary > > > > I find getter / setter inconsistency equally not-nice. What about using > a tuple class for all time value settings > > class TimeValue { > long value; > TimeUnit unit; > > } > > Or some such? > Maybe... this becomes wordy though: config.setTimeout(TimeValue.of(1, TimeUnit.SECONDS)); instead of config.setTimeout(1, TimeUnit.SECONDS); which is what I see in the JRE here and there. The nice thing about TimeValue is that the object that uses it does not need to worry about scale in its implementation. If I am coding a Socket class, I have to remember that soTimeout is in milliseconds. If I write the ivar as "soTimeoutMillis" I am documenting the scale but I am not enforcing it. So I can see that TimeValue, DistanceValue and so one would make for safer modeling. Less risk of crashing that Mars craft because one team was thinking in metric units and the other in imperial units. So from an implementer's POV I like TimeValue. But from a user's POV should I have the convenience of setTimeout(long, TimeUnit) AND setTimeout(TimeValue). Gary > Oleg > > > > > > > > > Bindul > > > > > > > > > > > Gary > > > > > > > > > > > > > Oleg > > > > > > > > > > ------------------------------------------------------------- > > > > > -------- > > > > > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org > > > > > For additional commands, e-mail: dev-help@hc.apache.org > > > > > > > > > > > > > > > > > > > > > > -- > > > > E-Mail: garydgregory@gmail.com | ggregory@apache.org > > > > Java Persistence with Hibernate, Second Edition > > > > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459& > > > linkCode=as2&tag=garygregory- > > > 20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8> > > > > > > > > > > > 20&l=am2&o=1&a= > > > > > > 1617290459> > > > > JUnit in Action, Second Edition > > > > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021& > > > linkCode=as2&tag=garygregory- > > > 20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22 > > > > > > > > > > > > > > > 20&l=am2&o=1&a= > > > > > > 1935182021> > > > > Spring Batch in Action > > > > > > > > > tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951& > > > linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B% > > > 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action> > > > > > > > 20&l=am2&o=1&a= > > > > > > 1935182951> > > > > Blog: http://garygregory.wordpress.com > > > > Home: http://garygregory.com/ > > > > Tweet! http://twitter.com/GaryGregory > > > > > > ----------------------------------------------------------------- > > > ---- > > > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org > > > For additional commands, e-mail: dev-help@hc.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org > For additional commands, e-mail: dev-help@hc.apache.org > > -- E-Mail: garydgregory@gmail.com | ggregory@apache.org Java Persistence with Hibernate, Second Edition JUnit in Action, Second Edition Spring Batch in Action Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory --001a113e3ee6d814400548326cf4--