diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 46d39593e4..96cc43efa6 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,41 +1,22 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index f3527619c8..c82c6b64b8 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -38,7 +38,20 @@ - + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 12768205c7..3e5d2de7ad 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,78 +2,25 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/router/java/src/net/i2p/router/transport/udp/PeerState.java b/router/java/src/net/i2p/router/transport/udp/PeerState.java index d4ecee1048..9d8e136a1f 100644 --- a/router/java/src/net/i2p/router/transport/udp/PeerState.java +++ b/router/java/src/net/i2p/router/transport/udp/PeerState.java @@ -11,12 +11,14 @@ import java.util.Map; import java.util.Set; import java.util.Queue; import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.atomic.AtomicInteger; import net.i2p.data.Hash; import net.i2p.data.SessionKey; import net.i2p.router.OutNetMessage; import net.i2p.router.RouterContext; -import net.i2p.router.util.CachedIteratorAbstractCollection; +import net.i2p.router.util.CachedIteratorArrayList; +import net.i2p.router.util.CoDelPriorityBlockingQueue; import net.i2p.router.util.PriBlockingQueue; import net.i2p.util.Log; import net.i2p.util.ConcurrentHashSet; @@ -208,7 +210,7 @@ public class PeerState { * Mostly messages that have been transmitted and are awaiting acknowledgement, * although there could be some that have not been sent yet. */ - private final CachedIteratorAbstractCollection _outboundMessages; + private final List _outboundMessages; /** * Priority queue of messages that have not yet been sent. @@ -368,7 +370,7 @@ public class PeerState { _rtt = INIT_RTT; _rttDeviation = _rtt; _inboundMessages = new HashMap(8); - _outboundMessages = new CachedIteratorAbstractCollection(); + _outboundMessages = new CachedIteratorArrayList(32); //_outboundQueue = new CoDelPriorityBlockingQueue(ctx, "UDP-PeerState", 32); _outboundQueue = new PriBlockingQueue(ctx, "UDP-PeerState", 32); // all createRateStat() moved to EstablishmentManager @@ -1566,7 +1568,7 @@ public class PeerState { if (_dead) { dropOutbound(); return 0; - } + } int rv = 0; List succeeded = null; @@ -1584,7 +1586,6 @@ public class PeerState { iter.remove(); if (_retransmitter == state) _retransmitter = null; - _log.debug("CachedIteratorAbstractCollection: sendFailed update" + state); _context.statManager().addRateData("udp.sendFailed", state.getPushCount()); if (failed == null) failed = new ArrayList(4); failed.add(state); @@ -1592,7 +1593,6 @@ public class PeerState { iter.remove(); if (state == _retransmitter) _retransmitter = null; - _log.debug("CachedIteratorAbstractCollection: sendAggressiveFailed update" + state); _context.statManager().addRateData("udp.sendAggressiveFailed", state.getPushCount()); if (failed == null) failed = new ArrayList(4); failed.add(state);