public class IoServiceStatistics
extends java.lang.Object
AbstractIoService
instance.构造器和说明 |
---|
IoServiceStatistics(AbstractIoService service) |
限定符和类型 | 方法和说明 |
---|---|
void |
decreaseScheduledWriteMessages()
Decrements the count of messages scheduled for write.
|
long |
getCumulativeManagedSessionCount() |
int |
getLargestManagedSessionCount() |
double |
getLargestReadBytesThroughput() |
double |
getLargestReadMessagesThroughput() |
double |
getLargestWrittenBytesThroughput() |
double |
getLargestWrittenMessagesThroughput() |
long |
getLastIoTime() |
long |
getLastReadTime() |
long |
getLastWriteTime() |
long |
getReadBytes() |
double |
getReadBytesThroughput() |
long |
getReadMessages() |
double |
getReadMessagesThroughput() |
int |
getScheduledWriteBytes() |
int |
getScheduledWriteMessages() |
int |
getThroughputCalculationInterval() |
long |
getThroughputCalculationIntervalInMillis() |
long |
getWrittenBytes() |
double |
getWrittenBytesThroughput() |
long |
getWrittenMessages() |
double |
getWrittenMessagesThroughput() |
void |
increaseReadBytes(long nbBytesRead,
long currentTime)
Increases the count of read bytes by
nbBytesRead and sets
the last read time to currentTime . |
void |
increaseReadMessages(long currentTime)
Increases the count of read messages by 1 and sets the last read time to
currentTime . |
void |
increaseScheduledWriteBytes(int increment)
Increments by
increment the count of bytes scheduled for write. |
void |
increaseScheduledWriteMessages()
Increments the count of messages scheduled for write.
|
void |
increaseWrittenBytes(int nbBytesWritten,
long currentTime)
Increases the count of written bytes by
nbBytesWritten and
sets the last write time to currentTime . |
void |
increaseWrittenMessages(long currentTime)
Increases the count of written messages by 1 and sets the last write time
to
currentTime . |
protected void |
setLastReadTime(long lastReadTime)
Sets last time at which a read occurred on the service.
|
protected void |
setLastThroughputCalculationTime(long lastThroughputCalculationTime)
Sets the time at which throughput counters where updated.
|
protected void |
setLastWriteTime(long lastWriteTime)
Sets last time at which a write occurred on the service.
|
void |
setThroughputCalculationInterval(int throughputCalculationInterval)
Sets the interval (seconds) between each throughput calculation.
|
void |
updateThroughput(long currentTime)
Updates the throughput counters.
|
public IoServiceStatistics(AbstractIoService service)
public final int getLargestManagedSessionCount()
public final long getCumulativeManagedSessionCount()
public final long getLastIoTime()
public final long getLastReadTime()
public final long getLastWriteTime()
public final long getReadBytes()
public final long getWrittenBytes()
public final long getReadMessages()
public final long getWrittenMessages()
public final double getReadBytesThroughput()
public final double getWrittenBytesThroughput()
public final double getReadMessagesThroughput()
public final double getWrittenMessagesThroughput()
public final double getLargestReadBytesThroughput()
public final double getLargestWrittenBytesThroughput()
public final double getLargestReadMessagesThroughput()
public final double getLargestWrittenMessagesThroughput()
public final int getThroughputCalculationInterval()
public final long getThroughputCalculationIntervalInMillis()
public final void setThroughputCalculationInterval(int throughputCalculationInterval)
throughputCalculationInterval
- The interval between two calculationprotected final void setLastReadTime(long lastReadTime)
lastReadTime
- The last time a read has occurredprotected final void setLastWriteTime(long lastWriteTime)
lastWriteTime
- The last time a write has occurredpublic void updateThroughput(long currentTime)
currentTime
- The current timepublic final void increaseReadBytes(long nbBytesRead, long currentTime)
nbBytesRead
and sets
the last read time to currentTime
.nbBytesRead
- The number of bytes readcurrentTime
- The date those bytes were readpublic final void increaseReadMessages(long currentTime)
currentTime
.currentTime
- The time the message has been readpublic final void increaseWrittenBytes(int nbBytesWritten, long currentTime)
nbBytesWritten
and
sets the last write time to currentTime
.nbBytesWritten
- The number of bytes writtencurrentTime
- The date those bytes were writtenpublic final void increaseWrittenMessages(long currentTime)
currentTime
.currentTime
- The date the message were writtenpublic final int getScheduledWriteBytes()
public final void increaseScheduledWriteBytes(int increment)
increment
the count of bytes scheduled for write.increment
- The number of added bytes fro writepublic final int getScheduledWriteMessages()
public final void increaseScheduledWriteMessages()
public final void decreaseScheduledWriteMessages()
protected void setLastThroughputCalculationTime(long lastThroughputCalculationTime)
lastThroughputCalculationTime
- The time at which throughput counters where updated.