For example, a capped list which automatically delete the first inserted items if 开发者_如何学编程the total items pass the specified amount? Any builtin or 3rd party support?
Answered here in this Stackoverflow question:
Is there a bounded non-blocking Collection in Java?
It would be fairly trivial to implement this as a wrapper for any of the queue type java collections.
精彩评论