directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pro...@apache.org
Subject svn commit: r419101 - in /directory/trunks/mina/core/src/main/java/org/apache/mina/filter: ReadThrottleFilter.java ReadThrottleFilterBuilder.java
Date Tue, 04 Jul 2006 21:06:03 GMT
Author: proyal
Date: Tue Jul  4 14:06:03 2006
New Revision: 419101

URL: http://svn.apache.org/viewvc?rev=419101&view=rev
Log:
Rename per Trustin's suggestion. Use remaining() vs capacity()

Added:
    directory/trunks/mina/core/src/main/java/org/apache/mina/filter/ReadThrottleFilterBuilder.java
      - copied, changed from r417502, directory/trunks/mina/core/src/main/java/org/apache/mina/filter/ReadThrottleFilter.java
Removed:
    directory/trunks/mina/core/src/main/java/org/apache/mina/filter/ReadThrottleFilter.java

Copied: directory/trunks/mina/core/src/main/java/org/apache/mina/filter/ReadThrottleFilterBuilder.java
(from r417502, directory/trunks/mina/core/src/main/java/org/apache/mina/filter/ReadThrottleFilter.java)
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/filter/ReadThrottleFilterBuilder.java?p2=directory/trunks/mina/core/src/main/java/org/apache/mina/filter/ReadThrottleFilterBuilder.java&p1=directory/trunks/mina/core/src/main/java/org/apache/mina/filter/ReadThrottleFilter.java&r1=417502&r2=419101&rev=419101&view=diff
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/filter/ReadThrottleFilter.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/filter/ReadThrottleFilterBuilder.java
Tue Jul  4 14:06:03 2006
@@ -39,7 +39,7 @@
  *
  * <pre><code>
  * DefaultFilterChainBuilder builder = ...
- * ReadThrottleFilter filter = new ReadThrottleFilter();
+ * ReadThrottleFilterBuilder filter = new ReadThrottleFilterBuilder();
  * filter.attach( builder );
  * </code></pre>
  *
@@ -47,17 +47,17 @@
  *
  * <pre><code>
  * IoFilterChain chain = ...
- * ReadThrottleFilter filter = new ReadThrottleFilter();
+ * ReadThrottleFilterBuilder filter = new ReadThrottleFilterBuilder();
  * filter.attach( chain );
  * </code></pre>
  *
  * @author The Apache Directory Project (mina-dev@directory.apache.org)
  * @version $Rev: 406554 $, $Date: 2006-05-15 06:46:02Z $
  */
-public class ReadThrottleFilter
+public class ReadThrottleFilterBuilder
 {
-    public static final String COUNTER = ReadThrottleFilter.class.getName() + ".counter";
-    public static final String SUSPENDED_READS = ReadThrottleFilter.class.getName() + ".suspendedReads";
+    public static final String COUNTER = ReadThrottleFilterBuilder.class.getName() + ".counter";
+    public static final String SUSPENDED_READS = ReadThrottleFilterBuilder.class.getName()
+ ".suspendedReads";
 
     private volatile int maximumConnectionBufferSize = 1024 * 1024; // 1mb
 
@@ -170,7 +170,7 @@
         {
             if( message instanceof ByteBuffer )
             {
-                add( session, ( (ByteBuffer)message ).capacity() );
+                add( session, ( (ByteBuffer)message ).remaining() );
             }
 
             nextFilter.messageReceived( session, message );



Mime
View raw message