forked from I2P_Developers/i2p.i2p
* TunnelInfo: Change msg counter from long to int
This commit is contained in:
@@ -68,10 +68,11 @@ public interface TunnelInfo {
|
||||
*/
|
||||
public void testSuccessful(int responseTime);
|
||||
|
||||
public long getProcessedMessagesCount();
|
||||
public int getProcessedMessagesCount();
|
||||
|
||||
/** we know for sure that this many bytes travelled through the tunnel in its lifetime */
|
||||
public long getVerifiedBytesTransferred();
|
||||
|
||||
/** we know for sure that the given number of bytes were sent down the tunnel fully */
|
||||
public void incrementVerifiedBytesTransferred(int numBytes);
|
||||
|
||||
|
@@ -29,7 +29,7 @@ public class TunnelCreatorConfig implements TunnelInfo {
|
||||
private List<Integer> _order;
|
||||
private long _replyMessageId;
|
||||
private final boolean _isInbound;
|
||||
private long _messagesProcessed;
|
||||
private int _messagesProcessed;
|
||||
private volatile long _verifiedBytesTransferred;
|
||||
private boolean _failed;
|
||||
private int _failures;
|
||||
@@ -127,7 +127,7 @@ public class TunnelCreatorConfig implements TunnelInfo {
|
||||
|
||||
/** take note of a message being pumped through this tunnel */
|
||||
public void incrementProcessedMessages() { _messagesProcessed++; }
|
||||
public long getProcessedMessagesCount() { return _messagesProcessed; }
|
||||
public int getProcessedMessagesCount() { return _messagesProcessed; }
|
||||
|
||||
public void incrementVerifiedBytesTransferred(int bytes) {
|
||||
_verifiedBytesTransferred += bytes;
|
||||
@@ -144,6 +144,7 @@ public class TunnelCreatorConfig implements TunnelInfo {
|
||||
_context.profileManager().tunnelDataPushed1m(_peers[i], (int)normalized);
|
||||
}
|
||||
}
|
||||
|
||||
public long getVerifiedBytesTransferred() { return _verifiedBytesTransferred; }
|
||||
|
||||
private static final int THROUGHPUT_COUNT = 3;
|
||||
|
Reference in New Issue
Block a user