Java bounded non-blocking buffer for high concurrent situation

前端 未结 5 1811
小蘑菇
小蘑菇 2021-02-06 05:25

Basically I need a data structure to store the temporary chatting messages on the server side. It should be:

  • bounded: because I don\'t need store too many messa

5条回答
  •  一向
    一向 (楼主)
    2021-02-06 06:10

    Did you take a look at ConcurrentLinkedQueue? The page says

    This implementation employs an efficient "wait-free" algorithm...

    Wait-freedom is one of the strongest guarantee you can obtain....

提交回复
热议问题