com.google.code.yanf4j.statistics.impl
Class DefaultStatistics

java.lang.Object
  extended by com.google.code.yanf4j.statistics.impl.DefaultStatistics
All Implemented Interfaces:
Statistics

public class DefaultStatistics
extends java.lang.Object
implements Statistics

Default statistics implementation

Author:
dennis

Constructor Summary
DefaultStatistics()
           
 
Method Summary
 double getAcceptCountPerSecond()
           
 double getProcessedMessageAverageTime()
           
 long getProcessedMessageCount()
           
 double getReceiveBytesPerSecond()
           
 double getReceiveThroughputLimit()
           
 long getRecvMessageAverageSize()
           
 long getRecvMessageCount()
           
 double getRecvMessageCountPerSecond()
           
 long getRecvMessageTotalSize()
           
 double getSendBytesPerSecond()
           
 double getSendThroughputLimit()
           
 long getStartedTime()
           
 long getWriteMessageAverageSize()
           
 long getWriteMessageCount()
           
 double getWriteMessageCountPerSecond()
           
 long getWriteMessageTotalSize()
           
 boolean isReceiveOverFlow()
          Check session if receive bytes per second is over flow controll
 boolean isSendOverFlow()
          Check session if receive bytes per second is over flow controll
 boolean isStatistics()
           
 void reset()
           
 void restart()
           
 void setReceiveThroughputLimit(double receivePacketRate)
           
 void setSendThroughputLimit(double sendThroughputLimit)
           
 void start()
           
 void statisticsAccept()
           
 void statisticsProcess(long n)
           
 void statisticsRead(long n)
           
 void statisticsWrite(long n)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultStatistics

public DefaultStatistics()
Method Detail

start

public void start()
Specified by:
start in interface Statistics

getSendBytesPerSecond

public double getSendBytesPerSecond()
Specified by:
getSendBytesPerSecond in interface Statistics

getReceiveBytesPerSecond

public double getReceiveBytesPerSecond()
Specified by:
getReceiveBytesPerSecond in interface Statistics

isStatistics

public boolean isStatistics()
Specified by:
isStatistics in interface Statistics

getStartedTime

public long getStartedTime()
Specified by:
getStartedTime in interface Statistics

reset

public void reset()
Specified by:
reset in interface Statistics

restart

public void restart()
Specified by:
restart in interface Statistics

getProcessedMessageAverageTime

public double getProcessedMessageAverageTime()
Specified by:
getProcessedMessageAverageTime in interface Statistics

getProcessedMessageCount

public long getProcessedMessageCount()
Specified by:
getProcessedMessageCount in interface Statistics

statisticsProcess

public void statisticsProcess(long n)
Specified by:
statisticsProcess in interface Statistics

stop

public void stop()
Specified by:
stop in interface Statistics

getRecvMessageCount

public long getRecvMessageCount()
Specified by:
getRecvMessageCount in interface Statistics

getRecvMessageTotalSize

public long getRecvMessageTotalSize()
Specified by:
getRecvMessageTotalSize in interface Statistics

getRecvMessageAverageSize

public long getRecvMessageAverageSize()
Specified by:
getRecvMessageAverageSize in interface Statistics

getRecvMessageCountPerSecond

public double getRecvMessageCountPerSecond()
Specified by:
getRecvMessageCountPerSecond in interface Statistics

getWriteMessageCount

public long getWriteMessageCount()
Specified by:
getWriteMessageCount in interface Statistics

getWriteMessageTotalSize

public long getWriteMessageTotalSize()
Specified by:
getWriteMessageTotalSize in interface Statistics

getWriteMessageAverageSize

public long getWriteMessageAverageSize()
Specified by:
getWriteMessageAverageSize in interface Statistics

statisticsRead

public void statisticsRead(long n)
Specified by:
statisticsRead in interface Statistics

statisticsWrite

public void statisticsWrite(long n)
Specified by:
statisticsWrite in interface Statistics

getWriteMessageCountPerSecond

public double getWriteMessageCountPerSecond()
Specified by:
getWriteMessageCountPerSecond in interface Statistics

getAcceptCountPerSecond

public double getAcceptCountPerSecond()
Specified by:
getAcceptCountPerSecond in interface Statistics

statisticsAccept

public void statisticsAccept()
Specified by:
statisticsAccept in interface Statistics

setReceiveThroughputLimit

public void setReceiveThroughputLimit(double receivePacketRate)
Specified by:
setReceiveThroughputLimit in interface Statistics

isReceiveOverFlow

public boolean isReceiveOverFlow()
Description copied from interface: Statistics
Check session if receive bytes per second is over flow controll

Specified by:
isReceiveOverFlow in interface Statistics
Returns:

isSendOverFlow

public boolean isSendOverFlow()
Description copied from interface: Statistics
Check session if receive bytes per second is over flow controll

Specified by:
isSendOverFlow in interface Statistics
Returns:

getSendThroughputLimit

public double getSendThroughputLimit()
Specified by:
getSendThroughputLimit in interface Statistics

setSendThroughputLimit

public void setSendThroughputLimit(double sendThroughputLimit)
Specified by:
setSendThroughputLimit in interface Statistics

getReceiveThroughputLimit

public final double getReceiveThroughputLimit()
Specified by:
getReceiveThroughputLimit in interface Statistics


Copyright © 2011. All Rights Reserved.