directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r464826 - in /directory: branches/mina/1.0/core/src/main/java/org/apache/mina/common/support/ branches/mina/1.0/core/src/main/java/org/apache/mina/filter/codec/ branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/ bran...
Date Tue, 17 Oct 2006 06:26:19 GMT
Author: trustin
Date: Mon Oct 16 23:26:18 2006
New Revision: 464826

URL: http://svn.apache.org/viewvc?view=rev&rev=464826
Log:
Fixed issue: DIRMINA-285 (Incorrect calculation of IoSession.writtenMessages())
* Moved a call to IoSession.increateWrittenMessages() to the respective I/O processors


Modified:
    directory/branches/mina/1.0/core/src/main/java/org/apache/mina/common/support/BaseIoSession.java
    directory/branches/mina/1.0/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
    directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
    directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
    directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
    directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeFilterChain.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/common/support/BaseIoSession.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
    directory/trunks/mina/core/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeFilterChain.java

Modified: directory/branches/mina/1.0/core/src/main/java/org/apache/mina/common/support/BaseIoSession.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.0/core/src/main/java/org/apache/mina/common/support/BaseIoSession.java?view=diff&rev=464826&r1=464825&r2=464826
==============================================================================
--- directory/branches/mina/1.0/core/src/main/java/org/apache/mina/common/support/BaseIoSession.java
(original)
+++ directory/branches/mina/1.0/core/src/main/java/org/apache/mina/common/support/BaseIoSession.java
Mon Oct 16 23:26:18 2006
@@ -60,7 +60,6 @@
     // Status variables
     private long readBytes;
     private long writtenBytes;
-    private long writtenWriteRequests;
     
     private long readMessages;
     private long writtenMessages;
@@ -332,7 +331,7 @@
     
     public long getWrittenWriteRequests()
     {
-        return writtenWriteRequests;
+        return writtenMessages;
     }
     
     public long getReadMessages()
@@ -359,11 +358,6 @@
         lastWriteTime = System.currentTimeMillis();
         idleCountForBoth = 0;
         idleCountForWrite = 0;
-    }
-    
-    public void increaseWrittenWriteRequests()
-    {
-        writtenWriteRequests ++;
     }
     
     public void increaseReadMessages()

Modified: directory/branches/mina/1.0/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.0/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java?view=diff&rev=464826&r1=464825&r2=464826
==============================================================================
--- directory/branches/mina/1.0/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
(original)
+++ directory/branches/mina/1.0/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
Mon Oct 16 23:26:18 2006
@@ -26,7 +26,6 @@
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.common.WriteFuture;
-import org.apache.mina.common.support.BaseIoSession;
 import org.apache.mina.common.support.DefaultWriteFuture;
 import org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput;
 import org.apache.mina.filter.codec.support.SimpleProtocolEncoderOutput;
@@ -223,11 +222,6 @@
                     new WriteRequest(
                             new MessageByteBuffer( writeRequest.getMessage() ),
                             writeRequest.getFuture(), writeRequest.getDestination() ) );
-
-            if( session instanceof BaseIoSession )
-            {
-                ( ( BaseIoSession ) session ).increaseWrittenMessages();
-            }
         }
         catch( Throwable t )
         {

Modified: directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java?view=diff&rev=464826&r1=464825&r2=464826
==============================================================================
--- directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
(original)
+++ directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
Mon Oct 16 23:26:18 2006
@@ -469,7 +469,7 @@
                     writeRequestQueue.pop();
                 }
 
-                session.increaseWrittenWriteRequests();
+                session.increaseWrittenMessages();
 
                 buf.reset();
                 session.getFilterChain().fireMessageSent( session, req );

Modified: directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java?view=diff&rev=464826&r1=464825&r2=464826
==============================================================================
--- directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
(original)
+++ directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
Mon Oct 16 23:26:18 2006
@@ -510,7 +510,7 @@
                     writeRequestQueue.pop();
                 }
 
-                session.increaseWrittenWriteRequests();
+                session.increaseWrittenMessages();
                 buf.reset();
                 ( ( DatagramFilterChain ) session.getFilterChain() ).fireMessageSent( session,
req );
                 continue;
@@ -552,7 +552,7 @@
                 }
 
                 session.increaseWrittenBytes( writtenBytes );
-                session.increaseWrittenWriteRequests();
+                session.increaseWrittenMessages();
                 buf.reset();
                 session.getFilterChain().fireMessageSent( session, req );
             }

Modified: directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java?view=diff&rev=464826&r1=464825&r2=464826
==============================================================================
--- directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
(original)
+++ directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
Mon Oct 16 23:26:18 2006
@@ -550,7 +550,7 @@
                     writeRequestQueue.pop();
                 }
 
-                session.increaseWrittenWriteRequests();
+                session.increaseWrittenMessages();
                 buf.reset();
                 session.getFilterChain().fireMessageSent( session, req );
                 continue;
@@ -586,7 +586,7 @@
                 }
 
                 session.increaseWrittenBytes( writtenBytes );
-                session.increaseWrittenWriteRequests();
+                session.increaseWrittenMessages();
                 buf.reset();
                 session.getFilterChain().fireMessageSent( session, req );
             }

Modified: directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeFilterChain.java
URL: http://svn.apache.org/viewvc/directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeFilterChain.java?view=diff&rev=464826&r1=464825&r2=464826
==============================================================================
--- directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeFilterChain.java
(original)
+++ directory/branches/mina/1.0/core/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeFilterChain.java
Mon Oct 16 23:26:18 2006
@@ -97,7 +97,7 @@
                     }
                     
                     s.increaseWrittenBytes( byteCount );
-                    s.increaseWrittenWriteRequests();
+                    s.increaseWrittenMessages();
     
                     s.getFilterChain().fireMessageSent( s, writeRequest );
                     s.getRemoteSession().getFilterChain()

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/common/support/BaseIoSession.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/common/support/BaseIoSession.java?view=diff&rev=464826&r1=464825&r2=464826
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/common/support/BaseIoSession.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/common/support/BaseIoSession.java
Mon Oct 16 23:26:18 2006
@@ -60,7 +60,6 @@
     // Status variables
     private long readBytes;
     private long writtenBytes;
-    private long writtenWriteRequests;
     
     private long readMessages;
     private long writtenMessages;
@@ -332,7 +331,7 @@
     
     public long getWrittenWriteRequests()
     {
-        return writtenWriteRequests;
+        return writtenMessages;
     }
     
     public long getReadMessages()
@@ -359,11 +358,6 @@
         lastWriteTime = System.currentTimeMillis();
         idleCountForBoth = 0;
         idleCountForWrite = 0;
-    }
-    
-    public void increaseWrittenWriteRequests()
-    {
-        writtenWriteRequests ++;
     }
     
     public void increaseReadMessages()

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java?view=diff&rev=464826&r1=464825&r2=464826
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/filter/codec/ProtocolCodecFilter.java
Mon Oct 16 23:26:18 2006
@@ -26,7 +26,6 @@
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoSession;
 import org.apache.mina.common.WriteFuture;
-import org.apache.mina.common.support.BaseIoSession;
 import org.apache.mina.common.support.DefaultWriteFuture;
 import org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput;
 import org.apache.mina.filter.codec.support.SimpleProtocolEncoderOutput;
@@ -223,11 +222,6 @@
                     new WriteRequest(
                             new MessageByteBuffer( writeRequest.getMessage() ),
                             writeRequest.getFuture(), writeRequest.getDestination() ) );
-
-            if( session instanceof BaseIoSession )
-            {
-                ( ( BaseIoSession ) session ).increaseWrittenMessages();
-            }
         }
         catch( Throwable t )
         {

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java?view=diff&rev=464826&r1=464825&r2=464826
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
Mon Oct 16 23:26:18 2006
@@ -469,7 +469,7 @@
                     writeRequestQueue.pop();
                 }
 
-                session.increaseWrittenWriteRequests();
+                session.increaseWrittenMessages();
 
                 buf.reset();
                 session.getFilterChain().fireMessageSent( session, req );

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java?view=diff&rev=464826&r1=464825&r2=464826
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramAcceptorDelegate.java
Mon Oct 16 23:26:18 2006
@@ -510,7 +510,7 @@
                     writeRequestQueue.pop();
                 }
 
-                session.increaseWrittenWriteRequests();
+                session.increaseWrittenMessages();
                 buf.reset();
                 ( ( DatagramFilterChain ) session.getFilterChain() ).fireMessageSent( session,
req );
                 continue;
@@ -552,7 +552,7 @@
                 }
 
                 session.increaseWrittenBytes( writtenBytes );
-                session.increaseWrittenWriteRequests();
+                session.increaseWrittenMessages();
                 buf.reset();
                 session.getFilterChain().fireMessageSent( session, req );
             }

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java?view=diff&rev=464826&r1=464825&r2=464826
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/transport/socket/nio/support/DatagramConnectorDelegate.java
Mon Oct 16 23:26:18 2006
@@ -550,7 +550,7 @@
                     writeRequestQueue.pop();
                 }
 
-                session.increaseWrittenWriteRequests();
+                session.increaseWrittenMessages();
                 buf.reset();
                 session.getFilterChain().fireMessageSent( session, req );
                 continue;
@@ -586,7 +586,7 @@
                 }
 
                 session.increaseWrittenBytes( writtenBytes );
-                session.increaseWrittenWriteRequests();
+                session.increaseWrittenMessages();
                 buf.reset();
                 session.getFilterChain().fireMessageSent( session, req );
             }

Modified: directory/trunks/mina/core/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeFilterChain.java
URL: http://svn.apache.org/viewvc/directory/trunks/mina/core/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeFilterChain.java?view=diff&rev=464826&r1=464825&r2=464826
==============================================================================
--- directory/trunks/mina/core/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeFilterChain.java
(original)
+++ directory/trunks/mina/core/src/main/java/org/apache/mina/transport/vmpipe/support/VmPipeFilterChain.java
Mon Oct 16 23:26:18 2006
@@ -97,7 +97,7 @@
                     }
                     
                     s.increaseWrittenBytes( byteCount );
-                    s.increaseWrittenWriteRequests();
+                    s.increaseWrittenMessages();
     
                     s.getFilterChain().fireMessageSent( s, writeRequest );
                     s.getRemoteSession().getFilterChain()



Mime
View raw message