public class ForwardSchedulerStatistics
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ForwardSchedulerStatistics()
Creates a new ForwardSchedulerStatistics instance.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
public ForwardSchedulerStatistics()
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()
Copyright © 2023. All rights reserved.