directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r202328 - in /directory/network: branches/0.7/src/java/org/apache/mina/common/ branches/0.7/src/java/org/apache/mina/io/datagram/ branches/0.7/src/java/org/apache/mina/io/socket/ branches/0.7/src/java/org/apache/mina/protocol/io/ branches/0...
Date Wed, 29 Jun 2005 07:37:32 GMT
Author: trustin
Date: Wed Jun 29 00:37:30 2005
New Revision: 202328

URL: http://svn.apache.org/viewcvs?rev=202328&view=rev
Log:
* Fix for DIRMINA-67: added getWrittenWriteRequests() and getScheduledWriteRequests()
* Fixed ByteBuffer autoExpand mode doesn't initialize new buffer properly while expanding.


Modified:
    directory/network/branches/0.7/src/java/org/apache/mina/common/BaseSession.java
    directory/network/branches/0.7/src/java/org/apache/mina/common/ByteBuffer.java
    directory/network/branches/0.7/src/java/org/apache/mina/common/Session.java
    directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramAcceptor.java
    directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramConnector.java
    directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramSession.java
    directory/network/branches/0.7/src/java/org/apache/mina/io/socket/SocketIoProcessor.java
    directory/network/branches/0.7/src/java/org/apache/mina/io/socket/SocketSession.java
    directory/network/branches/0.7/src/java/org/apache/mina/protocol/io/IoProtocolSession.java
    directory/network/branches/0.7/src/java/org/apache/mina/protocol/vmpipe/VmPipeFilter.java
    directory/network/branches/0.7/src/java/org/apache/mina/protocol/vmpipe/VmPipeSession.java
    directory/network/branches/0.7/src/test/org/apache/mina/io/IoFilterChainTest.java
    directory/network/branches/0.7/src/test/org/apache/mina/protocol/ProtocolFilterChainTest.java
    directory/network/branches/0.7/src/test/org/apache/mina/protocol/codec/CumulativeProtocolDecoderTest.java
    directory/network/trunk/src/java/org/apache/mina/common/BaseIoSession.java
    directory/network/trunk/src/java/org/apache/mina/common/ByteBuffer.java
    directory/network/trunk/src/java/org/apache/mina/common/IoSession.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramSession.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
    directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketSession.java
    directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeFilter.java
    directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeSession.java
    directory/network/trunk/src/test/org/apache/mina/common/FutureTest.java
    directory/network/trunk/src/test/org/apache/mina/common/IoFilterChainTest.java
    directory/network/trunk/src/test/org/apache/mina/filter/codec/CumulativeProtocolDecoderTest.java

Modified: directory/network/branches/0.7/src/java/org/apache/mina/common/BaseSession.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/common/BaseSession.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/common/BaseSession.java (original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/common/BaseSession.java Wed Jun
29 00:37:30 2005
@@ -36,17 +36,14 @@
     private final Map attributes = new HashMap();
 
     private long readBytes;
-    
     private long writtenBytes;
+    private long writtenWriteRequests;
     
     private long lastReadTime;
-    
     private long lastWriteTime;
 
     private boolean idleForBoth;
-
     private boolean idleForRead;
-
     private boolean idleForWrite;
 
 
@@ -111,6 +108,11 @@
         return writtenBytes;
     }
 
+    public long getWrittenWriteRequests()
+    {
+        return writtenWriteRequests;
+    }
+    
     public void increaseReadBytes( int increment )
     {
         readBytes += increment;
@@ -121,6 +123,11 @@
     {
         writtenBytes += increment;
         lastWriteTime = System.currentTimeMillis();
+    }
+
+    public void increaseWrittenWriteRequests()
+    {
+        writtenWriteRequests ++;
     }
 
     public long getLastIoTime()

Modified: directory/network/branches/0.7/src/java/org/apache/mina/common/ByteBuffer.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/common/ByteBuffer.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/common/ByteBuffer.java (original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/common/ByteBuffer.java Wed Jun
29 00:37:30 2005
@@ -1465,7 +1465,9 @@
             
             java.nio.ByteBuffer oldBuf = this.buf;
             java.nio.ByteBuffer newBuf = allocate0( newCapacity, isDirect() );
-            
+            newBuf.clear();
+            newBuf.order( oldBuf.order() );
+
             int pos = oldBuf.position();
             int limit = oldBuf.limit();
             oldBuf.clear();

Modified: directory/network/branches/0.7/src/java/org/apache/mina/common/Session.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/common/Session.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/common/Session.java (original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/common/Session.java Wed Jun 29
00:37:30 2005
@@ -129,6 +129,17 @@
     long getWrittenBytes();
 
     /**
+     * Returns the total number of write requests which were written to this session.
+     */
+    long getWrittenWriteRequests();
+    
+    /**
+     * Returns the number of write requests which are scheduled to be written
+     * to this session.
+     */
+    int getScheduledWriteRequests();
+
+    /**
      * Returns the time in millis when I/O occurred lastly.
      */
     long getLastIoTime();

Modified: directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramAcceptor.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramAcceptor.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramAcceptor.java
(original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramAcceptor.java
Wed Jun 29 00:37:30 2005
@@ -394,6 +394,7 @@
                     session.getManagerFilterChain().exceptionCaught( session, e );
                 }
 
+                session.increaseWrittenWriteRequests();
                 session.getManagerFilterChain().dataWritten( session, marker );
                 continue;
             }
@@ -420,6 +421,7 @@
                 }
 
                 session.increaseWrittenBytes( writtenBytes );
+                session.increaseWrittenWriteRequests();
                 session.getManagerFilterChain().dataWritten( session, marker );
             }
         }

Modified: directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramConnector.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramConnector.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramConnector.java
(original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramConnector.java
Wed Jun 29 00:37:30 2005
@@ -391,6 +391,7 @@
                     session.getManagerFilterChain().exceptionCaught( session, e );
                 }
 
+                session.increaseWrittenWriteRequests();
                 session.getManagerFilterChain().dataWritten( session, marker );
                 continue;
             }
@@ -416,6 +417,7 @@
                 }
 
                 session.increaseWrittenBytes( writtenBytes );
+                session.increaseWrittenWriteRequests();
                 session.getManagerFilterChain().dataWritten( session, marker );
             }
         }

Modified: directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramSession.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramSession.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramSession.java
(original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/io/datagram/DatagramSession.java
Wed Jun 29 00:37:30 2005
@@ -162,6 +162,14 @@
         filterChain.filterWrite( this, buf, marker );
     }
 
+    public int getScheduledWriteRequests()
+    {
+        synchronized( writeBufferQueue )
+        {
+            return writeBufferQueue.size();
+        }
+    }
+
     public TransportType getTransportType()
     {
         return TransportType.DATAGRAM;

Modified: directory/network/branches/0.7/src/java/org/apache/mina/io/socket/SocketIoProcessor.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/io/socket/SocketIoProcessor.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/io/socket/SocketIoProcessor.java
(original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/io/socket/SocketIoProcessor.java
Wed Jun 29 00:37:30 2005
@@ -485,6 +485,7 @@
                     session.getManagerFilterChain().exceptionCaught( session, e );
                 }
 
+                session.increaseWrittenWriteRequests();
                 session.getManagerFilterChain().dataWritten( session, marker );
                 continue;
             }

Modified: directory/network/branches/0.7/src/java/org/apache/mina/io/socket/SocketSession.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/io/socket/SocketSession.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/io/socket/SocketSession.java (original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/io/socket/SocketSession.java Wed
Jun 29 00:37:30 2005
@@ -158,6 +158,14 @@
         filterChain.filterWrite( this, buf, marker );
     }
 
+    public int getScheduledWriteRequests()
+    {
+        synchronized( writeBufferQueue )
+        {
+            return writeBufferQueue.size();
+        }
+    }
+
     public TransportType getTransportType()
     {
         return TransportType.SOCKET;

Modified: directory/network/branches/0.7/src/java/org/apache/mina/protocol/io/IoProtocolSession.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/protocol/io/IoProtocolSession.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/protocol/io/IoProtocolSession.java
(original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/protocol/io/IoProtocolSession.java
Wed Jun 29 00:37:30 2005
@@ -131,6 +131,16 @@
         filterChain.filterWrite( this, message );
     }
 
+    public long getWrittenWriteRequests()
+    {
+        return session.getWrittenWriteRequests();
+    }
+
+    public int getScheduledWriteRequests()
+    {
+        return session.getScheduledWriteRequests();
+    }
+
     public TransportType getTransportType()
     {
         return session.getTransportType();

Modified: directory/network/branches/0.7/src/java/org/apache/mina/protocol/vmpipe/VmPipeFilter.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/protocol/vmpipe/VmPipeFilter.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/protocol/vmpipe/VmPipeFilter.java
(original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/protocol/vmpipe/VmPipeFilter.java
Wed Jun 29 00:37:30 2005
@@ -38,6 +38,7 @@
         vps.setIdle( IdleStatus.BOTH_IDLE, false );
         vps.setIdle( IdleStatus.WRITER_IDLE, false );
         vps.increaseWrittenBytes( 1 );
+        vps.increaseWrittenWriteRequests();
 
         nextFilter.messageSent( session, message );
     }

Modified: directory/network/branches/0.7/src/java/org/apache/mina/protocol/vmpipe/VmPipeSession.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/java/org/apache/mina/protocol/vmpipe/VmPipeSession.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/java/org/apache/mina/protocol/vmpipe/VmPipeSession.java
(original)
+++ directory/network/branches/0.7/src/java/org/apache/mina/protocol/vmpipe/VmPipeSession.java
Wed Jun 29 00:37:30 2005
@@ -145,6 +145,11 @@
         this.filterChain.filterWrite( this, message );
     }
 
+    public int getScheduledWriteRequests()
+    {
+        return 0;
+    }
+
     public TransportType getTransportType()
     {
         return TransportType.VM_PIPE;

Modified: directory/network/branches/0.7/src/test/org/apache/mina/io/IoFilterChainTest.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/test/org/apache/mina/io/IoFilterChainTest.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/test/org/apache/mina/io/IoFilterChainTest.java (original)
+++ directory/network/branches/0.7/src/test/org/apache/mina/io/IoFilterChainTest.java Wed
Jun 29 00:37:30 2005
@@ -148,6 +148,11 @@
         {
         }
 
+        public int getScheduledWriteRequests()
+        {
+            return 0;
+        }
+
         public TransportType getTransportType()
         {
             return null;

Modified: directory/network/branches/0.7/src/test/org/apache/mina/protocol/ProtocolFilterChainTest.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/test/org/apache/mina/protocol/ProtocolFilterChainTest.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/test/org/apache/mina/protocol/ProtocolFilterChainTest.java
(original)
+++ directory/network/branches/0.7/src/test/org/apache/mina/protocol/ProtocolFilterChainTest.java
Wed Jun 29 00:37:30 2005
@@ -152,6 +152,11 @@
         public void write(Object message) {
         }
 
+        public int getScheduledWriteRequests()
+        {
+            return 0;
+        }
+
         public TransportType getTransportType() {
             return null;
         }

Modified: directory/network/branches/0.7/src/test/org/apache/mina/protocol/codec/CumulativeProtocolDecoderTest.java
URL: http://svn.apache.org/viewcvs/directory/network/branches/0.7/src/test/org/apache/mina/protocol/codec/CumulativeProtocolDecoderTest.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/branches/0.7/src/test/org/apache/mina/protocol/codec/CumulativeProtocolDecoderTest.java
(original)
+++ directory/network/branches/0.7/src/test/org/apache/mina/protocol/codec/CumulativeProtocolDecoderTest.java
Wed Jun 29 00:37:30 2005
@@ -194,6 +194,11 @@
         public void write(Object message) {
         }
 
+        public int getScheduledWriteRequests()
+        {
+            return 0;
+        }
+
         public TransportType getTransportType() {
             return TransportType.SOCKET;
         }

Modified: directory/network/trunk/src/java/org/apache/mina/common/BaseIoSession.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/common/BaseIoSession.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/common/BaseIoSession.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/common/BaseIoSession.java Wed Jun 29
00:37:30 2005
@@ -33,17 +33,14 @@
     private final Map attributes = new HashMap();
 
     private long readBytes;
-    
     private long writtenBytes;
+    private long writtenWriteRequests;
     
     private long lastReadTime;
-    
     private long lastWriteTime;
 
     private boolean idleForBoth;
-
     private boolean idleForRead;
-
     private boolean idleForWrite;
 
 
@@ -102,7 +99,12 @@
     {
         return writtenBytes;
     }
-
+    
+    public long getWrittenWriteRequests()
+    {
+        return writtenWriteRequests;
+    }
+    
     public void increaseReadBytes( int increment )
     {
         readBytes += increment;
@@ -113,6 +115,11 @@
     {
         writtenBytes += increment;
         lastWriteTime = System.currentTimeMillis();
+    }
+    
+    public void increaseWrittenWriteRequests()
+    {
+        writtenWriteRequests ++;
     }
 
     public long getLastIoTime()

Modified: directory/network/trunk/src/java/org/apache/mina/common/ByteBuffer.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/common/ByteBuffer.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/common/ByteBuffer.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/common/ByteBuffer.java Wed Jun 29 00:37:30
2005
@@ -1465,7 +1465,9 @@
             
             java.nio.ByteBuffer oldBuf = this.buf;
             java.nio.ByteBuffer newBuf = allocate0( newCapacity, isDirect() );
-            
+            newBuf.clear();
+            newBuf.order( oldBuf.order() );
+
             int pos = oldBuf.position();
             int limit = oldBuf.limit();
             oldBuf.clear();

Modified: directory/network/trunk/src/java/org/apache/mina/common/IoSession.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/common/IoSession.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/common/IoSession.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/common/IoSession.java Wed Jun 29 00:37:30
2005
@@ -139,6 +139,17 @@
      * Returns the total number of bytes which were written to this session.
      */
     long getWrittenBytes();
+    
+    /**
+     * Returns the total number of write requests which were written to this session.
+     */
+    long getWrittenWriteRequests();
+    
+    /**
+     * Returns the number of write requests which are scheduled to be written
+     * to this session.
+     */
+    int getScheduledWriteRequests();
 
     /**
      * Returns the time in millis when I/O occurred lastly.

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramAcceptor.java
Wed Jun 29 00:37:30 2005
@@ -384,6 +384,7 @@
                 }
 
                 req.getFuture().setWritten( true );
+                session.increaseWrittenWriteRequests();
                 session.getManagerFilterChain().messageSent( session, buf );
                 continue;
             }
@@ -411,6 +412,7 @@
 
                 session.increaseWrittenBytes( writtenBytes );
                 req.getFuture().setWritten( true );
+                session.increaseWrittenWriteRequests();
                 session.getManagerFilterChain().messageSent( session, buf.position( pos )
);
             }
         }

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramConnector.java
Wed Jun 29 00:37:30 2005
@@ -360,6 +360,7 @@
                 }
 
                 req.getFuture().setWritten( true );
+                session.increaseWrittenWriteRequests();
                 session.getManagerFilterChain().messageSent( session, buf );
                 continue;
             }
@@ -386,6 +387,7 @@
 
                 session.increaseWrittenBytes( writtenBytes );
                 req.getFuture().setWritten( true );
+                session.increaseWrittenWriteRequests();
                 session.getManagerFilterChain().messageSent( session, buf.position( pos )
);
             }
         }

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramSession.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramSession.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramSession.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/DatagramSession.java
Wed Jun 29 00:37:30 2005
@@ -143,6 +143,14 @@
         filterChain.filterWrite( this, new WriteRequest( message, future ) );
         return future;
     }
+    
+    public int getScheduledWriteRequests()
+    {
+        synchronized( writeRequestQueue )
+        {
+            return writeRequestQueue.size();
+        }
+    }
 
     public TransportType getTransportType()
     {

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketIoProcessor.java
Wed Jun 29 00:37:30 2005
@@ -479,6 +479,7 @@
                 }
                 
                 req.getFuture().setWritten( true );
+                session.increaseWrittenWriteRequests();
                 session.getManagerFilterChain().messageSent( session, buf.reset() );
                 continue;
             }

Modified: directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketSession.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketSession.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketSession.java
(original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/socket/nio/SocketSession.java
Wed Jun 29 00:37:30 2005
@@ -129,6 +129,14 @@
         return writeRequestQueue;
     }
 
+    public int getScheduledWriteRequests()
+    {
+        synchronized( writeRequestQueue )
+        {
+            return writeRequestQueue.size();
+        }
+    }
+
     public WriteFuture write( Object message )
     {
         WriteFuture future = new WriteFuture();

Modified: directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeFilter.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeFilter.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeFilter.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeFilter.java Wed
Jun 29 00:37:30 2005
@@ -38,6 +38,7 @@
         vps.setIdle( IdleStatus.BOTH_IDLE, false );
         vps.setIdle( IdleStatus.WRITER_IDLE, false );
         vps.increaseWrittenBytes( 1 );
+        vps.increaseWrittenWriteRequests();
 
         nextFilter.messageSent( session, message );
     }

Modified: directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeSession.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeSession.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeSession.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/transport/vmpipe/VmPipeSession.java Wed
Jun 29 00:37:30 2005
@@ -154,6 +154,11 @@
         return future;
     }
 
+    public int getScheduledWriteRequests()
+    {
+        return 0;
+    }
+
     public TransportType getTransportType()
     {
         return TransportType.VM_PIPE;

Modified: directory/network/trunk/src/test/org/apache/mina/common/FutureTest.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/test/org/apache/mina/common/FutureTest.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/test/org/apache/mina/common/FutureTest.java (original)
+++ directory/network/trunk/src/test/org/apache/mina/common/FutureTest.java Wed Jun 29 00:37:30
2005
@@ -115,6 +115,11 @@
             {
                 return null;
             }
+
+            public int getScheduledWriteRequests()
+            {
+                return 0;
+            }
         };
         
         future.setSession( session );

Modified: directory/network/trunk/src/test/org/apache/mina/common/IoFilterChainTest.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/test/org/apache/mina/common/IoFilterChainTest.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/test/org/apache/mina/common/IoFilterChainTest.java (original)
+++ directory/network/trunk/src/test/org/apache/mina/common/IoFilterChainTest.java Wed Jun
29 00:37:30 2005
@@ -191,6 +191,11 @@
         {
             return null;
         }
+
+        public int getScheduledWriteRequests()
+        {
+            return 0;
+        }
     }
 
     private class EventOrderTestFilter implements IoFilter

Modified: directory/network/trunk/src/test/org/apache/mina/filter/codec/CumulativeProtocolDecoderTest.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/test/org/apache/mina/filter/codec/CumulativeProtocolDecoderTest.java?rev=202328&r1=202327&r2=202328&view=diff
==============================================================================
--- directory/network/trunk/src/test/org/apache/mina/filter/codec/CumulativeProtocolDecoderTest.java
(original)
+++ directory/network/trunk/src/test/org/apache/mina/filter/codec/CumulativeProtocolDecoderTest.java
Wed Jun 29 00:37:30 2005
@@ -218,5 +218,10 @@
         {
             return null;
         }
+
+        public int getScheduledWriteRequests()
+        {
+            return 0;
+        }
     }
 }



Mime
View raw message