forked from I2P_Developers/i2p.i2p
add drainAllTo()
This commit is contained in:
@ -128,6 +128,9 @@ public class CoDelBlockingQueue<E extends CDQEntry> extends LinkedBlockingQueue<
|
|||||||
return codel(rv);
|
return codel(rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates stats and possibly drops while draining.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int drainTo(Collection<? super E> c) {
|
public int drainTo(Collection<? super E> c) {
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
@ -139,6 +142,9 @@ public class CoDelBlockingQueue<E extends CDQEntry> extends LinkedBlockingQueue<
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates stats and possibly drops while draining.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int drainTo(Collection<? super E> c, int maxElements) {
|
public int drainTo(Collection<? super E> c, int maxElements) {
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
@ -149,6 +155,13 @@ public class CoDelBlockingQueue<E extends CDQEntry> extends LinkedBlockingQueue<
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Drains all, without updating stats or dropping.
|
||||||
|
*/
|
||||||
|
public int drainAllTo(Collection<? super E> c) {
|
||||||
|
return super.drainTo(c);
|
||||||
|
}
|
||||||
|
|
||||||
/////// private below here
|
/////// private below here
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -139,6 +139,9 @@ public class CoDelPriorityBlockingQueue<E extends CDPQEntry> extends PriorityBlo
|
|||||||
return codel(rv);
|
return codel(rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates stats and possibly drops while draining.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int drainTo(Collection<? super E> c) {
|
public int drainTo(Collection<? super E> c) {
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
@ -150,6 +153,9 @@ public class CoDelPriorityBlockingQueue<E extends CDPQEntry> extends PriorityBlo
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates stats and possibly drops while draining.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int drainTo(Collection<? super E> c, int maxElements) {
|
public int drainTo(Collection<? super E> c, int maxElements) {
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
@ -160,6 +166,13 @@ public class CoDelPriorityBlockingQueue<E extends CDPQEntry> extends PriorityBlo
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Drains all, without updating stats or dropping.
|
||||||
|
*/
|
||||||
|
public int drainAllTo(Collection<? super E> c) {
|
||||||
|
return super.drainTo(c);
|
||||||
|
}
|
||||||
|
|
||||||
/////// private below here
|
/////// private below here
|
||||||
|
|
||||||
private void timestamp(E o) {
|
private void timestamp(E o) {
|
||||||
|
Reference in New Issue
Block a user