The only one I can find is the BoundedFIFOBuffer, which is deprecated. Any others?
I've been using Google Collections recently. I think you could have a Java Generics solution pretty easily with it. There is a class called ForwardingList which I think you could implement this idea pretty easily. Obviously not as easy as just using BoundedFifoBuffer (non-generic) or ArrayBlockingQueue.
final ArrayList realList = Lists.newArrayList();
final List list = new ForwardingList() {
protected List delegate() {
return realList;
}
public boolean add(MyObject obj) {
if(delegate().size() > 100) return false;
return delegate().add(obj);
}
};