tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1488871 - in /tomcat/trunk: java/org/apache/catalina/tribes/transport/PooledSender.java webapps/docs/config/cluster-sender.xml
Date Mon, 03 Jun 2013 07:24:09 GMT
Author: kfujino
Date: Mon Jun  3 07:24:09 2013
New Revision: 1488871

URL: http://svn.apache.org/r1488871
Log:
Add maxWait attribute that the senderPool will wait when there are no available senders.

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java
    tomcat/trunk/webapps/docs/config/cluster-sender.xml

Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java?rev=1488871&r1=1488870&r2=1488871&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java Mon Jun  3 07:24:09
2013
@@ -42,6 +42,7 @@ public abstract class PooledSender exten
 
     private final SenderQueue queue;
     private int poolSize = 25;
+    private long maxWait = 3000;
     public PooledSender() {
         queue = new SenderQueue(this,poolSize);
     }
@@ -49,7 +50,7 @@ public abstract class PooledSender exten
     public abstract DataSender getNewDataSender();
 
     public DataSender getSender() {
-        return queue.getSender(getTimeout());
+        return queue.getSender(getMaxWait());
     }
 
     public void returnSender(DataSender sender) {
@@ -89,6 +90,14 @@ public abstract class PooledSender exten
         return poolSize;
     }
 
+    public long getMaxWait() {
+        return maxWait;
+    }
+
+    public void setMaxWait(long maxWait) {
+        this.maxWait = maxWait;
+    }
+
     @Override
     public boolean keepalive() {
         //do nothing, the pool checks on every return

Modified: tomcat/trunk/webapps/docs/config/cluster-sender.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluster-sender.xml?rev=1488871&r1=1488870&r2=1488871&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/cluster-sender.xml (original)
+++ tomcat/trunk/webapps/docs/config/cluster-sender.xml Mon Jun  3 07:24:09 2013
@@ -162,14 +162,18 @@
       </attribute>
     </attributes>
   </subsection>
-  <subsection name="PooledParallelSender Attributes">
+  <subsection name="Common PooledSender Attributes">
     <attributes>
       <attribute name="poolSize" required="false">
         The maximum number of concurrent connections from A to B.
         The value is based on a per-destination count.
         The default value is <code>25</code>
       </attribute>
-
+      <attribute name="maxWait" required="false">
+        The maximum number of milliseconds that the senderPool will wait when
+        there are no available senders. The default value is <code>3000</code>
+        milliseconds.(3 seconds).
+      </attribute>
     </attributes>
   </subsection>
 </section>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message