Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 14833 invoked from network); 2 Nov 2006 15:36:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Nov 2006 15:36:14 -0000 Received: (qmail 70002 invoked by uid 500); 2 Nov 2006 15:36:25 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 69986 invoked by uid 500); 2 Nov 2006 15:36:25 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 69977 invoked by uid 99); 2 Nov 2006 15:36:25 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2006 07:36:25 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2006 07:36:13 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 18B6F1A9846; Thu, 2 Nov 2006 07:35:48 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r470390 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java Date: Thu, 02 Nov 2006 15:35:47 -0000 To: activemq-commits@geronimo.apache.org From: rajdavies@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061102153548.18B6F1A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rajdavies Date: Thu Nov 2 07:35:46 2006 New Revision: 470390 URL: http://svn.apache.org/viewvc?view=rev&rev=470390 Log: make size of io buffers configurable Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java?view=diff&rev=470390&r1=470389&r2=470390 ============================================================================== --- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java (original) +++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/tcp/TcpTransport.java Thu Nov 2 07:35:46 2006 @@ -55,7 +55,8 @@ protected int connectionTimeout = 30000; protected int soTimeout = 0; - protected int socketBufferSize = 128 * 1024; + protected int socketBufferSize = 64 * 1024; + protected int ioBufferSize = 8 * 1024; protected Socket socket; protected DataOutputStream dataOut; protected DataInputStream dataIn; @@ -241,6 +242,20 @@ public void setTcpNoDelay(Boolean tcpNoDelay) { this.tcpNoDelay = tcpNoDelay; } + + /** + * @return the ioBufferSize + */ + public int getIoBufferSize(){ + return this.ioBufferSize; + } + + /** + * @param ioBufferSize the ioBufferSize to set + */ + public void setIoBufferSize(int ioBufferSize){ + this.ioBufferSize=ioBufferSize; + } // Implementation methods @@ -350,9 +365,9 @@ } protected void initializeStreams() throws Exception { - TcpBufferedInputStream buffIn = new TcpBufferedInputStream(socket.getInputStream(), 8 * 1024); + TcpBufferedInputStream buffIn = new TcpBufferedInputStream(socket.getInputStream(), ioBufferSize); this.dataIn = new DataInputStream(buffIn); - TcpBufferedOutputStream buffOut = new TcpBufferedOutputStream(socket.getOutputStream(), 16 * 1024); + TcpBufferedOutputStream buffOut = new TcpBufferedOutputStream(socket.getOutputStream(), ioBufferSize); this.dataOut = new DataOutputStream(buffOut); } @@ -375,4 +390,8 @@ } return null; } + + + + }