Changeset 7bac7aa


Ignore:
Timestamp:
Sep 28, 2011 5:05:26 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
273e940
Parents:
9f430bf1
Message:

save space

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/tunnel/HopConfig.java

    r9f430bf1 r7bac7aa  
    2727    private long _expiration;
    2828    private Map _options;
    29     private long _messagesProcessed;
    30     private long _oldMessagesProcessed;
    31     private long _messagesSent;
    32     private long _oldMessagesSent;
     29    // these 4 were longs, let's save some space
     30    // 2 billion * 1KB / 10 minutes = 3 GBps in a single tunnel
     31    private int _messagesProcessed;
     32    private int _oldMessagesProcessed;
     33    private int _messagesSent;
     34    private int _oldMessagesSent;
    3335   
    3436    /** IV length for {@link #getReplyIV} */
     
    111113    /** "processed" is for incoming and "sent" is for outgoing (could be dropped in between) */
    112114    public void incrementProcessedMessages() { _messagesProcessed++; }
    113     public long getProcessedMessagesCount() { return _messagesProcessed; }
    114     public long getRecentMessagesCount() {
    115         long rv = _messagesProcessed - _oldMessagesProcessed;
     115
     116    public int getProcessedMessagesCount() { return _messagesProcessed; }
     117
     118    public int getRecentMessagesCount() {
     119        int rv = _messagesProcessed - _oldMessagesProcessed;
    116120        _oldMessagesProcessed = _messagesProcessed;
    117121        return rv;
    118122    }
     123
    119124    public void incrementSentMessages() { _messagesSent++; }
    120     public long getSentMessagesCount() { return _messagesSent; }
    121     public long getRecentSentMessagesCount() {
    122         long rv = _messagesSent - _oldMessagesSent;
     125
     126    public int getSentMessagesCount() { return _messagesSent; }
     127
     128    public int getRecentSentMessagesCount() {
     129        int rv = _messagesSent - _oldMessagesSent;
    123130        _oldMessagesSent = _messagesSent;
    124131        return rv;
Note: See TracChangeset for help on using the changeset viewer.