From 211533f554413d81ab660c2f3dc66886a3bfe235 Mon Sep 17 00:00:00 2001 From: slumlord Date: Fri, 17 Aug 2018 10:05:17 +0000 Subject: [PATCH] Update PeerState to use CachedIteratorCollection as propagation from i2p.i2p appears to have wiped out changes --- .idea/compiler.xml | 53 +++++++++++++------ .idea/modules.xml | 53 +++++++++++++++++++ .mtn-ignore | 1 + .../i2p/router/transport/udp/PeerState.java | 9 ++-- 4 files changed, 95 insertions(+), 21 deletions(-) diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 96cc43efa..46d39593e 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,22 +1,41 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 3e5d2de7a..12768205c 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,25 +2,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.mtn-ignore b/.mtn-ignore index 41aa1db6e..ff66b9d01 100644 --- a/.mtn-ignore +++ b/.mtn-ignore @@ -71,5 +71,6 @@ sloccount.sc /.project$ /.settings # IDEA +^.idea$ \.iml$ 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 9d8e136a1..cb4e13b35 100644 --- a/router/java/src/net/i2p/router/transport/udp/PeerState.java +++ b/router/java/src/net/i2p/router/transport/udp/PeerState.java @@ -17,8 +17,9 @@ 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.CachedIteratorArrayList; -import net.i2p.router.util.CoDelPriorityBlockingQueue; +//import net.i2p.router.util.CachedIteratorArrayList; +import net.i2p.router.util.CachedIteratorCollection; +//import net.i2p.router.util.CoDelPriorityBlockingQueue; import net.i2p.router.util.PriBlockingQueue; import net.i2p.util.Log; import net.i2p.util.ConcurrentHashSet; @@ -210,7 +211,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 List _outboundMessages; + private final CachedIteratorCollection _outboundMessages; /** * Priority queue of messages that have not yet been sent. @@ -370,7 +371,7 @@ public class PeerState { _rtt = INIT_RTT; _rttDeviation = _rtt; _inboundMessages = new HashMap(8); - _outboundMessages = new CachedIteratorArrayList(32); + _outboundMessages = new CachedIteratorCollection(); //_outboundQueue = new CoDelPriorityBlockingQueue(ctx, "UDP-PeerState", 32); _outboundQueue = new PriBlockingQueue(ctx, "UDP-PeerState", 32); // all createRateStat() moved to EstablishmentManager