diff --git a/router/java/src/net/i2p/router/TunnelInfo.java b/router/java/src/net/i2p/router/TunnelInfo.java index 7e06e3463d739a71499478258980b32d44a765fa..be200069f75e007f28545c97c0b214707d8b9a59 100644 --- a/router/java/src/net/i2p/router/TunnelInfo.java +++ b/router/java/src/net/i2p/router/TunnelInfo.java @@ -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); diff --git a/router/java/src/net/i2p/router/tunnel/TunnelCreatorConfig.java b/router/java/src/net/i2p/router/tunnel/TunnelCreatorConfig.java index 68d733f82ca9d43ca6a309055e08b19786bf3dbb..5306179a350f9be8e34ac1da9539aa48d4c04d94 100644 --- a/router/java/src/net/i2p/router/tunnel/TunnelCreatorConfig.java +++ b/router/java/src/net/i2p/router/tunnel/TunnelCreatorConfig.java @@ -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;