|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object forward.server.ForwardSchedulerStatistics
public class ForwardSchedulerStatistics
This is the implementation for the statistics of a ForwardScheduler.
Field Summary | |
---|---|
private static long |
BANDWIDTH_STATISTICS_INTERVAL
The backwards interval in milliseconds over which the current bandwidth usage statistics are created. |
private int |
m_acceptedConnections
Stores the number of accepted connections. |
private java.util.Vector |
m_lastTransferVolumes
Stores the list with the last transfered byte amounts. |
private int |
m_rejectedConnections
Stores the number of rejected connections. |
private long |
m_transferedBytes
Stores the number of transfered bytes. |
Constructor Summary | |
---|---|
ForwardSchedulerStatistics()
Creates a new ForwardSchedulerStatistics instance. |
Method Summary | |
---|---|
int |
getAcceptedConnections()
Returns the number of accepted connections. |
int |
getCurrentBandwidthUsage()
Returns the current bandwidth usage. |
int |
getRejectedConnections()
Returns the number of rejected connections. |
long |
getTransferedBytes()
Returns the total number of transfered bytes. |
void |
incrementAcceptedConnections()
Increments the number of accepted connections by one. |
void |
incrementRejectedConnections()
Increments the number of rejected connections by one. |
void |
incrementTransferVolume(int a_volume)
Increments the number of transfered bytes and adds the transfer volume to the list of volumes for calculating the current bandwidth usage. |
private void |
removeOutdatedTransferVolumes()
Removes all outdated values from the list of currently transfered volumes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long BANDWIDTH_STATISTICS_INTERVAL
private int m_rejectedConnections
private int m_acceptedConnections
private long m_transferedBytes
private java.util.Vector m_lastTransferVolumes
Constructor Detail |
---|
public ForwardSchedulerStatistics()
Method Detail |
---|
public void incrementRejectedConnections()
public int getRejectedConnections()
public void incrementAcceptedConnections()
public int getAcceptedConnections()
public void incrementTransferVolume(int a_volume)
a_volume
- A number of currently transfered bytes.public int getCurrentBandwidthUsage()
public long getTransferedBytes()
private void removeOutdatedTransferVolumes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |