kirviq / dumbster

Dumbster - a simple fake SMTP server for unit testing
Apache License 2.0
70 stars 39 forks source link

Use ConcurrentLinkedQueue (FIFO) instead of ArrayList. #3

Open chiflux opened 6 years ago

chiflux commented 6 years ago

Use a unbounded FIFO Queue object (ConcurrentLinkedQueue) as backing data structure instead of ArrayList. This extends the current functionality with the possibility to pop/poll (i.e. get and remove) single received messages. Before, one could only clear all messages. The Queue Interface is more or less a superset of the List interface, so existing code can be adapted very easily.