Changeset c965a3d


Ignore:
Timestamp:
Sep 2, 2012 2:41:21 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8575437
Parents:
c48aca8
Message:

add drainAllTo()

Location:
router/java/src/net/i2p/router/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/util/CoDelBlockingQueue.java

    rc48aca8 rc965a3d  
    129129    }
    130130
     131    /**
     132     *  Updates stats and possibly drops while draining.
     133     */
    131134    @Override
    132135    public int drainTo(Collection<? super E> c) {
     
    140143    }
    141144
     145    /**
     146     *  Updates stats and possibly drops while draining.
     147     */
    142148    @Override
    143149    public int drainTo(Collection<? super E> c, int maxElements) {
     
    148154        }
    149155        return rv;
     156    }
     157
     158    /**
     159     *  Drains all, without updating stats or dropping.
     160     */
     161    public int drainAllTo(Collection<? super E> c) {
     162        return super.drainTo(c);
    150163    }
    151164
  • router/java/src/net/i2p/router/util/CoDelPriorityBlockingQueue.java

    rc48aca8 rc965a3d  
    140140    }
    141141
     142    /**
     143     *  Updates stats and possibly drops while draining.
     144     */
    142145    @Override
    143146    public int drainTo(Collection<? super E> c) {
     
    151154    }
    152155
     156    /**
     157     *  Updates stats and possibly drops while draining.
     158     */
    153159    @Override
    154160    public int drainTo(Collection<? super E> c, int maxElements) {
     
    159165        }
    160166        return rv;
     167    }
     168
     169    /**
     170     *  Drains all, without updating stats or dropping.
     171     */
     172    public int drainAllTo(Collection<? super E> c) {
     173        return super.drainTo(c);
    161174    }
    162175
Note: See TracChangeset for help on using the changeset viewer.