* TunnelInfo: Change msg counter from long to int

This commit is contained in:
zzz
2012-06-21 19:59:29 +00:00
parent 6635448bda
commit f7656b0401
2 changed files with 5 additions and 3 deletions

View File

@@ -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);

View File

@@ -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;