Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 26007 invoked from network); 9 Jan 2007 09:22:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jan 2007 09:22:59 -0000 Received: (qmail 78160 invoked by uid 500); 9 Jan 2007 09:23:05 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 78033 invoked by uid 500); 9 Jan 2007 09:23:05 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 78022 invoked by uid 99); 9 Jan 2007 09:23:05 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jan 2007 01:23:05 -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; Tue, 09 Jan 2007 01:22:57 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 46DA31A981A; Tue, 9 Jan 2007 01:21:58 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r494347 - /cocoon/trunk/core/cocoon-thread/cocoon-thread-impl/src/main/java/org/apache/cocoon/components/thread/DefaultThreadPool.java Date: Tue, 09 Jan 2007 09:21:57 -0000 To: cvs@cocoon.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070109092158.46DA31A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cziegeler Date: Tue Jan 9 01:21:54 2007 New Revision: 494347 URL: http://svn.apache.org/viewvc?view=rev&rev=494347 Log: Adopt to our general coding style Modified: cocoon/trunk/core/cocoon-thread/cocoon-thread-impl/src/main/java/org/apache/cocoon/components/thread/DefaultThreadPool.java Modified: cocoon/trunk/core/cocoon-thread/cocoon-thread-impl/src/main/java/org/apache/cocoon/components/thread/DefaultThreadPool.java URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-thread/cocoon-thread-impl/src/main/java/org/apache/cocoon/components/thread/DefaultThreadPool.java?view=diff&rev=494347&r1=494346&r2=494347 ============================================================================== --- cocoon/trunk/core/cocoon-thread/cocoon-thread-impl/src/main/java/org/apache/cocoon/components/thread/DefaultThreadPool.java (original) +++ cocoon/trunk/core/cocoon-thread/cocoon-thread-impl/src/main/java/org/apache/cocoon/components/thread/DefaultThreadPool.java Tue Jan 9 01:21:54 2007 @@ -41,28 +41,28 @@ //~ Instance fields -------------------------------------------------------- /** Wrapps a channel */ - private ChannelWrapper m_channelWrapper; + private ChannelWrapper channelWrapper; /** By default we use the logger for this class. */ private Log logger = LogFactory.getLog(getClass()); /** The Queue */ - private Queue m_queue; + private Queue queue; /** The blocking policy */ - private String m_blockPolicy; + private String blockPolicy; /** The name of this thread pool */ - private String m_name; + private String name; /** Should we wait for running jobs to terminate on shutdown ? */ - private boolean m_shutdownGraceful; + private boolean shutdownGraceful; /** The maximum queue size */ - private int m_queueSize; + private int queueSize; /** How long to wait for running jobs to terminate on disposition */ - private int m_shutdownWaitTimeMs; + private int shutdownWaitTimeMs; //~ Constructors ----------------------------------------------------------- @@ -73,14 +73,6 @@ this( new ChannelWrapper() ); } - public Log getLogger() { - return this.logger; - } - - public void setLogger(Log l) { - this.logger = l; - } - /** * Create a new pool. * @@ -88,18 +80,26 @@ */ private DefaultThreadPool( final ChannelWrapper channel ) { super( channel ); - m_channelWrapper = channel; + channelWrapper = channel; } //~ Methods ---------------------------------------------------------------- + public Log getLogger() { + return this.logger; + } + + public void setLogger(Log l) { + this.logger = l; + } + /** * DOCUMENT ME! * * @return Returns the blockPolicy. */ public String getBlockPolicy() { - return m_blockPolicy; + return blockPolicy; } /** @@ -110,7 +110,7 @@ * @see org.apache.cocoon.components.thread.ThreadPool#getQueueSize() */ public int getMaxQueueSize() { - return ( ( m_queueSize < 0 ) ? Integer.MAX_VALUE : m_queueSize ); + return ( ( queueSize < 0 ) ? Integer.MAX_VALUE : queueSize ); } /** @@ -121,14 +121,14 @@ * @see org.apache.cocoon.components.thread.ThreadPool#getQueueSize() */ public int getMaximumQueueSize() { - return m_queueSize; + return queueSize; } /** * @see org.apache.cocoon.components.thread.ThreadPool#getName() */ public String getName() { - return m_name; + return name; } /** @@ -149,7 +149,7 @@ * @see org.apache.cocoon.components.thread.ThreadPool#getQueueSize() */ public int getQueueSize() { - return m_queue.getQueueSize(); + return queue.getQueueSize(); } /** @@ -160,7 +160,7 @@ * @see org.apache.cocoon.components.thread.ThreadPool#isQueued() */ public boolean isQueued() { - return m_queueSize != 0; + return queueSize != 0; } /** @@ -183,7 +183,7 @@ * @see org.apache.cocoon.components.thread.ThreadPool#shutdown() */ public void shutdown() { - if( m_shutdownGraceful ) { + if( shutdownGraceful ) { shutdownAfterProcessingCurrentlyQueuedTasks(); } else { shutdownNow(); @@ -212,7 +212,7 @@ * @param blockPolicy The blocking policy value */ void setBlockPolicy( final String blockPolicy ) { - m_blockPolicy = blockPolicy; + this.blockPolicy = blockPolicy; if( POLICY_ABORT.equalsIgnoreCase( blockPolicy ) ) { abortWhenBlocked( ); @@ -245,7 +245,7 @@ * @param name The name to set. */ void setName( String name ) { - m_name = name; + this.name = name; } /** @@ -256,16 +256,16 @@ void setQueue( final int queueSize ) { if( queueSize != 0 ) { if( queueSize > 0 ) { - m_queue = new BoundedQueue( queueSize ); + queue = new BoundedQueue( queueSize ); } else { - m_queue = new LinkedQueue( ); + queue = new LinkedQueue( ); } } else { - m_queue = new SynchronousChannel( ); + queue = new SynchronousChannel( ); } - m_queueSize = queueSize; - m_channelWrapper.setChannel( m_queue ); + this.queueSize = queueSize; + channelWrapper.setChannel( queue ); } /** @@ -274,7 +274,7 @@ * @param shutdownGraceful The shutdownGraceful to set. */ void setShutdownGraceful( boolean shutdownGraceful ) { - m_shutdownGraceful = shutdownGraceful; + this.shutdownGraceful = shutdownGraceful; } /** @@ -283,7 +283,7 @@ * @return Returns the shutdownGraceful. */ boolean isShutdownGraceful() { - return m_shutdownGraceful; + return shutdownGraceful; } /** @@ -292,7 +292,7 @@ * @param shutdownWaitTimeMs The shutdownWaitTimeMs to set. */ void setShutdownWaitTimeMs( int shutdownWaitTimeMs ) { - m_shutdownWaitTimeMs = shutdownWaitTimeMs; + this.shutdownWaitTimeMs = shutdownWaitTimeMs; } /** @@ -301,6 +301,6 @@ * @return Returns the shutdownWaitTimeMs. */ int getShutdownWaitTimeMs() { - return m_shutdownWaitTimeMs; + return shutdownWaitTimeMs; } }