Changeset 0b3abb3 for router


Ignore:
Timestamp:
Aug 6, 2018 8:54:44 AM (2 years ago)
Author:
slumlord <slumlord@…>
Branches:
master
Children:
4aff615
Parents:
775188a3
Message:

Add CachedIteratorAbstractCollection?
Update PeerState?.java to use CachedIteratorAbstract?
Add some debugging lines to determine cause(s) of higher udp.sendFailed/sendAggressiveFailed stats

Location:
router/java/src/net/i2p/router
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/udp/PeerState.java

    r775188a3 r0b3abb3  
    1212import java.util.Queue;
    1313import java.util.concurrent.LinkedBlockingQueue;
    14 import java.util.concurrent.atomic.AtomicInteger;
    1514
    1615import net.i2p.data.Hash;
     
    1817import net.i2p.router.OutNetMessage;
    1918import net.i2p.router.RouterContext;
    20 import net.i2p.router.util.CachedIteratorArrayList;
    21 import net.i2p.router.util.CoDelPriorityBlockingQueue;
     19import net.i2p.router.util.CachedIteratorAbstractCollection;
    2220import net.i2p.router.util.PriBlockingQueue;
    2321import net.i2p.util.Log;
     
    211209     *  although there could be some that have not been sent yet.
    212210     */
    213     private final List<OutboundMessageState> _outboundMessages;
     211    private final CachedIteratorAbstractCollection<OutboundMessageState> _outboundMessages;
    214212
    215213    /**
     
    371369        _rttDeviation = _rtt;
    372370        _inboundMessages = new HashMap<Long, InboundMessageState>(8);
    373         _outboundMessages = new CachedIteratorArrayList<OutboundMessageState>(32);
     371        _outboundMessages = new CachedIteratorAbstractCollection<OutboundMessageState>();
    374372        //_outboundQueue = new CoDelPriorityBlockingQueue(ctx, "UDP-PeerState", 32);
    375373        _outboundQueue = new PriBlockingQueue<OutboundMessageState>(ctx, "UDP-PeerState", 32);
     
    15691567            dropOutbound();
    15701568            return 0;
    1571         }
     1569        }
    15721570
    15731571        int rv = 0;
     
    15871585                    if (_retransmitter == state)
    15881586                        _retransmitter = null;
     1587                    _log.debug("CachedIteratorAbstractCollection: sendFailed update" + state);
    15891588                    _context.statManager().addRateData("udp.sendFailed", state.getPushCount());
    15901589                    if (failed == null) failed = new ArrayList<OutboundMessageState>(4);
     
    15941593                    if (state == _retransmitter)
    15951594                        _retransmitter = null;
     1595                    _log.debug("CachedIteratorAbstractCollection: sendAggressiveFailed update" + state);
    15961596                    _context.statManager().addRateData("udp.sendAggressiveFailed", state.getPushCount());
    15971597                    if (failed == null) failed = new ArrayList<OutboundMessageState>(4);
Note: See TracChangeset for help on using the changeset viewer.