Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 32C9617E38 for ; Mon, 2 Mar 2015 03:55:24 +0000 (UTC) Received: (qmail 81505 invoked by uid 500); 2 Mar 2015 03:55:24 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 81424 invoked by uid 500); 2 Mar 2015 03:55:24 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 81251 invoked by uid 99); 2 Mar 2015 03:55:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2015 03:55:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 02 Mar 2015 03:55:21 +0000 Received: (qmail 80657 invoked by uid 99); 2 Mar 2015 03:55:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2015 03:55:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0EC18E0D39; Mon, 2 Mar 2015 03:55:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: akuznetsov@apache.org To: commits@ignite.incubator.apache.org Date: Mon, 02 Mar 2015 03:55:02 -0000 Message-Id: <65e1e4dde0d944d5a1efa8eab2d70223@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [02/14] incubator-ignite git commit: # IGNITE-11 Use Executors.newFixedThreadPool() to create executor service. X-Virus-Checked: Checked by ClamAV on apache.org # IGNITE-11 Use Executors.newFixedThreadPool() to create executor service. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e7171b06 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e7171b06 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e7171b06 Branch: refs/heads/ignite-187 Commit: e7171b064457e50ce141261f0946326f4165f565 Parents: a9ecd99 Author: sevdokimov Authored: Sun Feb 22 13:10:25 2015 +0300 Committer: sevdokimov Committed: Sun Feb 22 13:10:25 2015 +0300 ---------------------------------------------------------------------- .../apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e7171b06/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java index 87ee2fe..6bd50d6 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiAdapter.java @@ -1030,8 +1030,7 @@ abstract class TcpDiscoverySpiAdapter extends IgniteSpiAdapter implements Discov public SocketMultiConnector(Collection addrs, final int retryCnt) { connInProgress = addrs.size(); - executor = new ThreadPoolExecutor(0, 10, 1L, TimeUnit.MILLISECONDS, - new SynchronousQueue()); + executor = Executors.newFixedThreadPool(Math.min(10, addrs.size())); for (final InetSocketAddress addr : addrs) { executor.execute(new Runnable() {