Package com.complexible.common.collect
Class BoundedBuffer<T>
java.lang.Object
com.complexible.common.collect.BoundedBuffer<T>
Adapted from the example in Java Concurrency in Practice to add new methods like pause, resume, size, and uninterruptibles.
- Author:
- Brian Goetz and Tim Peierls, Evren Sirin
-
Field Details
-
lock
-
-
Constructor Details
-
BoundedBuffer
public BoundedBuffer(int size)
-
-
Method Details
-
put
- Throws:
InterruptedException
-
take
- Throws:
InterruptedException
-
putUninterruptibly
-
takeUninterruptibly
-
clear
public void clear() -
size
public int size()
-