You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by ed...@apache.org on 2009/06/24 00:39:57 UTC

svn commit: r787860 - /mina/trunk/core/src/main/java/org/apache/mina/core/service/IoServiceStatistics.java

Author: edeoliveira
Date: Tue Jun 23 22:39:56 2009
New Revision: 787860

URL: http://svn.apache.org/viewvc?rev=787860&view=rev
Log:
Added documentation

Modified:
    mina/trunk/core/src/main/java/org/apache/mina/core/service/IoServiceStatistics.java

Modified: mina/trunk/core/src/main/java/org/apache/mina/core/service/IoServiceStatistics.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/core/service/IoServiceStatistics.java?rev=787860&r1=787859&r2=787860&view=diff
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/core/service/IoServiceStatistics.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/core/service/IoServiceStatistics.java Tue Jun 23 22:39:56 2009
@@ -236,21 +236,22 @@
     }
 
     /**
-     * TODO add documentation
+     * Sets last time at which a read occurred on the service.
      */
     protected final void setLastReadTime(long lastReadTime) {
         this.lastReadTime = lastReadTime;
     }
 
     /**
-     * TODO add documentation
-     */     
+     * Sets last time at which a write occurred on the service.
+     */
     protected final void setLastWriteTime(long lastWriteTime) {
         this.lastWriteTime = lastWriteTime;
     }
     
     /**
-     * TODO add documentation
+     * Resets the throughput counters of the service if none session 
+     * is currently managed. 
      */
     private void resetThroughput() {
         if (service.getManagedSessionCount() == 0) {
@@ -262,7 +263,7 @@
     }
 
     /**
-     * TODO add documentation
+     * Updates the throughput counters.
      */    
     public void updateThroughput(long currentTime) {
         synchronized (throughputCalculationLock) {
@@ -309,7 +310,8 @@
     }
     
     /**
-     * TODO add documentation
+     * Increases the count of read bytes by <code>increment</code> and sets 
+     * the last read time to <code>currentTime</code>.
      */ 
     public final void increaseReadBytes(long increment, long currentTime) {
         readBytes.addAndGet(increment);
@@ -317,66 +319,69 @@
     }
 
     /**
-     * TODO add documentation
-     */     
+     * Increases the count of read messages by 1 and sets the last read time to 
+     * <code>currentTime</code>.
+     */ 
     public final void increaseReadMessages(long currentTime) {
         readMessages.incrementAndGet();
         lastReadTime = currentTime;
     }
     
     /**
-     * TODO add documentation
-     */
+     * Increases the count of written bytes by <code>increment</code> and sets 
+     * the last write time to <code>currentTime</code>.
+     */ 
     public final void increaseWrittenBytes(int increment, long currentTime) {
         writtenBytes.addAndGet(increment);
         lastWriteTime = currentTime;
     }
 
     /**
-     * TODO add documentation
-     */    
+     * Increases the count of written messages by 1 and sets the last write time to 
+     * <code>currentTime</code>.
+     */   
     public final void increaseWrittenMessages(long currentTime) {
         writtenMessages.incrementAndGet();
         lastWriteTime = currentTime;
     }
     
     /**
-     * TODO add documentation
+     * Returns the count of bytes scheduled for write.
      */
     public final int getScheduledWriteBytes() {
         return scheduledWriteBytes.get();
     }
 
     /**
-     * TODO add documentation
-     */    
+     * Increments by <code>increment</code> the count of bytes scheduled for write.
+     */
     public final void increaseScheduledWriteBytes(int increment) {
         scheduledWriteBytes.addAndGet(increment);
     }
 
     /**
-     * TODO add documentation
+     * Returns the count of messages scheduled for write.
      */
     public final int getScheduledWriteMessages() {
         return scheduledWriteMessages.get();
     }
 
     /**
-     * TODO add documentation
+     * Increments by 1 the count of messages scheduled for write.
      */    
     public final void increaseScheduledWriteMessages() {
         scheduledWriteMessages.incrementAndGet();
     }
 
     /**
-     * TODO add documentation
+     * Decrements by 1 the count of messages scheduled for write.
      */    
     public final void decreaseScheduledWriteMessages() {
         scheduledWriteMessages.decrementAndGet();
     }
 
     /**
-     * TODO add documentation
+     * Sets the time at which throughtput counters where updated.
      */        
     protected void setLastThroughputCalculationTime(
             long lastThroughputCalculationTime) {